Skip to content

Commit

Permalink
v2.8.0 Added S0 timeout setting (LS120 fw ^1.6.0). Documentation upda…
Browse files Browse the repository at this point in the history
…te BE water meter. (LS120 fw ^1.6.0)
  • Loading branch information
gruijter committed Nov 27, 2023
1 parent 67fa239 commit 1ff7f15
Show file tree
Hide file tree
Showing 7 changed files with 312 additions and 9 deletions.
1 change: 1 addition & 0 deletions changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
2.8.0 - 27-11-2023 Added S0 timeout setting (LS120 fw ^1.6.0). Documentation update BE water meter. (LS120 fw ^1.6.0)
2.7.1 - 31-05-2023 Fix for P1 data LS120 fw ^1.6.0
2.7.0 - 23-06-2022 Added P1Status method (3 phase P1 information, only for LS120 fw ^1.5.0)
2.6.0 - 27-03-2022 Improved and fixed autodiscovery.
Expand Down
150 changes: 148 additions & 2 deletions docs/Youless.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<nav>

<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#setS0Timeout">setS0Timeout</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<div id="main">
Expand Down Expand Up @@ -2776,6 +2776,152 @@ <h5>Parameters:</h5>



<h5>Returns:</h5>




<dl class="param-type">
<dt>
Type
</dt>
<dd>

<span class="param-type">Promise.&lt;finished></span>


</dd>
</dl>









<h4 class="name" id="setS0Timeout"><span class="type-signature">(async) </span>setS0Timeout<span class="signature">(value)</span><span class="type-signature"> &rarr; {Promise.&lt;finished>}</span></h4>






<dl class="details">
































</dl>





<div class="description">
<p>Set the Power pulses timeout</p>
</div>











<h5>Parameters:</h5>


<table class="params">
<thead>
<tr>

<th>Name</th>


<th>Type</th>





<th class="last">Description</th>
</tr>
</thead>

<tbody>


<tr>

<td class="name"><code>value</code></td>


<td class="type">


<span class="param-type">number</span>



</td>





<td class="description last"><p>the timeout in minutes. 0 = 30s.</p></td>
</tr>


</tbody>
</table>














<h5>Returns:</h5>


Expand Down Expand Up @@ -2913,7 +3059,7 @@ <h5>Returns:</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu Jun 23 2022 12:02:32 GMT+0200 (Midden-Europese zomertijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Mon Nov 27 2023 19:02:12 GMT+0100 (Midden-Europese standaardtijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
126 changes: 124 additions & 2 deletions docs/global.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<nav>

<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#setS0Timeout">setS0Timeout</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<div id="main">
Expand Down Expand Up @@ -218,6 +218,35 @@ <h5 class="subsection-title">Properties:</h5>



<tr>

<td class="name"><code>net</code></td>


<td class="type">


<span class="param-type">number</span>



</td>


<td class="attributes">



</td>




<td class="description last"><p>total energy counter, consumption - production</p></td>
</tr>



<tr>

<td class="name"><code>pwr</code></td>
Expand Down Expand Up @@ -546,6 +575,99 @@ <h5 class="subsection-title">Properties:</h5>
</tr>



<tr>

<td class="name"><code>wtr</code></td>


<td class="type">


<span class="param-type">number</span>



</td>


<td class="attributes">

&lt;optional><br>



</td>




<td class="description last"><p>counter water-meter (in m^3). e.g. 6161.243 NOTE: only for LS120 ^1.6 version firmware and BE meters</p></td>
</tr>



<tr>

<td class="name"><code>wts</code></td>


<td class="type">


<span class="param-type">number</span>



</td>


<td class="attributes">

&lt;optional><br>



</td>




<td class="description last"><p>time of the last water measurement (yyMMddhhmm). e.g. 1811182200 NOTE: only for LS120 ^1.6 version firmware and BE meters</p></td>
</tr>



<tr>

<td class="name"><code>wtm</code></td>


<td class="type">


<span class="param-type">number</span>



</td>


<td class="attributes">

&lt;optional><br>



</td>




<td class="description last"><p>time of the last gas measurement. unix-time-format. e.g. 1542574800 NOTE: NOTE: only for LS120 ^1.6 version firmware and BE meters</p></td>
</tr>


</tbody>
</table>

Expand Down Expand Up @@ -2620,7 +2742,7 @@ <h5>Example</h5>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu Jun 23 2022 12:02:32 GMT+0200 (Midden-Europese zomertijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Mon Nov 27 2023 19:02:12 GMT+0100 (Midden-Europese standaardtijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
5 changes: 3 additions & 2 deletions docs/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

<nav>

<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
<h2><a href="index.html">Home</a></h2><h3>Classes</h3><ul><li><a href="Youless.html">Youless</a><ul class='methods'><li data-type='method'><a href="Youless.html#discover">discover</a></li><li data-type='method'><a href="Youless.html#getAdvancedStatus">getAdvancedStatus</a></li><li data-type='method'><a href="Youless.html#getBasicStatus">getBasicStatus</a></li><li data-type='method'><a href="Youless.html#getGaslog">getGaslog</a></li><li data-type='method'><a href="Youless.html#getInfo">getInfo</a></li><li data-type='method'><a href="Youless.html#getP1Status">getP1Status</a></li><li data-type='method'><a href="Youless.html#getPowerlog">getPowerlog</a></li><li data-type='method'><a href="Youless.html#getRawP1Status">getRawP1Status</a></li><li data-type='method'><a href="Youless.html#getS0log">getS0log</a></li><li data-type='method'><a href="Youless.html#login">login</a></li><li data-type='method'><a href="Youless.html#reboot">reboot</a></li><li data-type='method'><a href="Youless.html#setLuminace">setLuminace</a></li><li data-type='method'><a href="Youless.html#setMeterType">setMeterType</a></li><li data-type='method'><a href="Youless.html#setPowerCounter">setPowerCounter</a></li><li data-type='method'><a href="Youless.html#setPowerPulses">setPowerPulses</a></li><li data-type='method'><a href="Youless.html#setS0Counter">setS0Counter</a></li><li data-type='method'><a href="Youless.html#setS0Pulses">setS0Pulses</a></li><li data-type='method'><a href="Youless.html#setS0Timeout">setS0Timeout</a></li><li data-type='method'><a href="Youless.html#syncTime">syncTime</a></li></ul></li></ul><h3><a href="global.html">Global</a></h3>
</nav>

<div id="main">
Expand Down Expand Up @@ -59,6 +59,7 @@ <h4>get:</h4>
<li>live energy and gas readings of P1 smart meters (LS120 only)</li>
<li>live readings of the S0 input (LS120 only)</li>
<li>live readings of the optical sensor</li>
<li>live P1 tariff, power, voltage, current readings per phase (LS120 only)</li>
<li>raw P1 data (Experimental and unstable!)</li>
<li>historic logs of power</li>
<li>historic log of gas (LS120 only)</li>
Expand Down Expand Up @@ -125,7 +126,7 @@ <h2>Detailed documentation:</h2>
<br class="clear">

<footer>
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Thu Jun 23 2022 12:02:32 GMT+0200 (Midden-Europese zomertijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.6.6</a> on Mon Nov 27 2023 19:02:12 GMT+0100 (Midden-Europese standaardtijd) using the <a href="https://github.com/clenemt/docdash">docdash</a> theme.
</footer>

<script>prettyPrint();</script>
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "youless",
"version": "2.7.1",
"version": "2.8.0",
"description": "Node package to interface with Youless energy monitor devices (LS110 and LS120)",
"main": "youless.js",
"scripts": {
Expand Down
9 changes: 7 additions & 2 deletions test/_test.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,15 +164,20 @@ async function doTest() {
// .catch((error) => logError(error));

// // set the S0 counter value (in KwH)
// log.push('trying to set the S0 counter (LS120-EL only)');
// log.push('trying to set the S0 counter (LS120 only)');
// await youless.setS0Counter(12345)
// .catch((error) => logError(error));

// // set the S0 pulses per KwH value NOTE: also resets powerPulses to 1000
// log.push('trying to set the S0 pulses (LS120-EL only)');
// log.push('trying to set the S0 pulses (LS120 only)');
// await youless.setS0Pulses(1000)
// .catch((error) => logError(error));

// set the S0 pulses timeout
log.push('trying to set the S0 timeout (LS120 only)');
await youless.setS0Timeout(5)
.catch((error) => logError(error));

// // set the Power counter value (in KwH) NOTE: also resets powerPulses to 1000
// await youless.setPowerCounter(12345)
// .catch((error) => logError(error));
Expand Down
Loading

0 comments on commit 1ff7f15

Please sign in to comment.