WeDo 2.0 voltage reporting
This commit is contained in:
parent
adaac287cc
commit
110f65b291
@ -338,139 +338,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -5597,7 +5464,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -338,139 +338,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -4200,7 +4067,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
121
docs/Hub.html
121
docs/Hub.html
@ -318,125 +318,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -2586,7 +2467,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -327,134 +327,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -4460,7 +4332,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
135
docs/PUPHub.html
135
docs/PUPHub.html
@ -338,139 +338,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -5169,7 +5036,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -338,139 +338,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<dt class="tag-overrides">Overrides:</dt>
|
||||
<dd class="tag-overrides"><ul class="dummy"><li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li></ul></dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -3421,7 +3288,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -860,7 +860,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -331,134 +331,6 @@
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
<hr>
|
||||
<dt class="name" id="current">
|
||||
<h4 id="current"><span class="type-signature"><readonly> </span>current<span class="type-signature"></span></h4>
|
||||
|
||||
|
||||
</dt>
|
||||
<dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dl class="details">
|
||||
|
||||
|
||||
<h5 class="subsection-title">Properties:</h5>
|
||||
|
||||
<dl>
|
||||
|
||||
<table class="props table table-striped">
|
||||
<thead>
|
||||
<tr>
|
||||
|
||||
<th>Name</th>
|
||||
|
||||
|
||||
<th>Type</th>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<th class="last">Description</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
|
||||
|
||||
<tr>
|
||||
|
||||
<td class="name"><code>current</code></td>
|
||||
|
||||
|
||||
<td class="type">
|
||||
|
||||
|
||||
<span class="param-type">number</span>
|
||||
|
||||
|
||||
|
||||
|
||||
</td>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<td class="description last"><p>Current usage of the hub (Amps)</p></td>
|
||||
</tr>
|
||||
|
||||
|
||||
</tbody>
|
||||
</table>
|
||||
</dl>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="inherited-from method-doc-label method-doc-details-label">Inherited From:</dt>
|
||||
<dd class="inherited-from">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="Hub.html#current">Hub#current</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<dt class="tag-source method-doc-label method-doc-details-label">Source:</dt>
|
||||
<dd class="tag-source">
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="hub.js.html">hub.js</a>,
|
||||
<a href="hub.js.html#sunlight-1-line-82">line 82</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</dl>
|
||||
|
||||
|
||||
@ -4438,7 +4310,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-309">line 309</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-307">line 307</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -4747,7 +4619,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-298">line 298</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-296">line 296</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -4909,7 +4781,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-339">line 339</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-337">line 337</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -5095,7 +4967,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-327">line 327</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-325">line 325</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -5174,7 +5046,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -349,7 +349,7 @@ exports.BoostMoveHub = BoostMoveHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -5945,7 +5945,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-309">line 309</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-307">line 307</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -6254,7 +6254,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-298">line 298</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-296">line 296</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -6416,7 +6416,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-339">line 339</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-337">line 337</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -6602,7 +6602,7 @@
|
||||
<ul class="dummy">
|
||||
<li>
|
||||
<a href="wedo2smarthub.js.html">wedo2smarthub.js</a>,
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-327">line 327</a>
|
||||
<a href="wedo2smarthub.js.html#sunlight-1-line-325">line 325</a>
|
||||
</li>
|
||||
</ul>
|
||||
</dd>
|
||||
@ -6681,7 +6681,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -277,7 +277,7 @@ var BLECharacteristic;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -298,7 +298,7 @@ exports.DuploTrainBase = DuploTrainBase;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -3272,7 +3272,7 @@
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -161,13 +161,13 @@ class Hub extends events_1.EventEmitter {
|
||||
get voltage() {
|
||||
return this._voltage;
|
||||
}
|
||||
/**
|
||||
* @readonly
|
||||
* @property {number} current Current usage of the hub (Amps)
|
||||
*/
|
||||
get current() {
|
||||
return this._current;
|
||||
}
|
||||
// /**
|
||||
// * @readonly
|
||||
// * @property {number} current Current usage of the hub (Amps)
|
||||
// */
|
||||
// public get current () {
|
||||
// return this._current;
|
||||
// }
|
||||
/**
|
||||
* Connect to the Hub.
|
||||
* @method Hub#connect
|
||||
@ -480,7 +480,7 @@ exports.Hub = Hub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -314,7 +314,7 @@ poweredUP.scan(); // Start scanning for Hubs</code></pre><p>More examples are av
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -298,25 +298,25 @@ class LPF2Hub extends hub_1.Hub {
|
||||
if ((data[3] === 0x3b && this.type === Consts.HubType.POWERED_UP_REMOTE)) { // Voltage (PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const voltage = data.readUInt16LE(4) / 500;
|
||||
this._voltage = Math.floor(voltage);
|
||||
this._voltage = voltage;
|
||||
return;
|
||||
}
|
||||
else if (data[3] === 0x3c && this.type === Consts.HubType.POWERED_UP_REMOTE) { // Current (PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const current = data.readUInt16LE(4) / 1000;
|
||||
const current = data.readUInt16LE(4);
|
||||
this._current = current;
|
||||
return;
|
||||
}
|
||||
else if (data[3] === 0x3c && this.type !== Consts.HubType.POWERED_UP_REMOTE) { // Voltage (Non-PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const voltage = data.readUInt16LE(4) / 400;
|
||||
this._voltage = Math.floor(voltage);
|
||||
this._voltage = voltage;
|
||||
return;
|
||||
}
|
||||
else if (data[3] === 0x3b && this.type !== Consts.HubType.POWERED_UP_REMOTE) { // Current (Non-PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const current = data.readUInt16LE(4) / 4096;
|
||||
this._current = current * 100;
|
||||
const current = data.readUInt16LE(4) / 1000;
|
||||
this._current = current;
|
||||
return;
|
||||
}
|
||||
const port = this._getPortForPortNumber(data[3]);
|
||||
@ -493,7 +493,7 @@ exports.LPF2Hub = LPF2Hub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -273,7 +273,7 @@ exports.PoweredUP = PoweredUP;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -306,7 +306,7 @@ exports.PUPHub = PUPHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
@ -236,7 +236,7 @@ exports.PUPRemote = PUPRemote;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
File diff suppressed because one or more lines are too long
@ -361,14 +361,12 @@ class WeDo2SmartHub extends hub_1.Hub {
|
||||
// Voltage
|
||||
if (data[1] === 0x03) {
|
||||
const voltage = data.readInt16LE(2);
|
||||
this._voltage = voltage;
|
||||
console.log("Voltage", voltage);
|
||||
this._voltage = voltage / 40;
|
||||
// Current
|
||||
}
|
||||
else if (data[1] === 0x04) {
|
||||
const current = data.readInt16LE(2);
|
||||
this._current = current;
|
||||
console.log("Current", current);
|
||||
this._current = current / 1000;
|
||||
}
|
||||
const port = this._getPortForPortNumber(data[1]);
|
||||
if (!port) {
|
||||
@ -480,7 +478,7 @@ exports.WeDo2SmartHub = WeDo2SmartHub;
|
||||
<span class="jsdoc-message">
|
||||
Documentation generated by <a href="https://github.com/jsdoc3/jsdoc">JSDoc 3.5.5</a>
|
||||
|
||||
on Fri Jan 18th 2019
|
||||
on Tue Jan 22nd 2019
|
||||
|
||||
using the <a href="https://github.com/docstrap/docstrap">DocStrap template</a>.
|
||||
</span>
|
||||
|
14
src/hub.ts
14
src/hub.ts
@ -104,13 +104,13 @@ export class Hub extends EventEmitter {
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @readonly
|
||||
* @property {number} current Current usage of the hub (Amps)
|
||||
*/
|
||||
public get current () {
|
||||
return this._current;
|
||||
}
|
||||
// /**
|
||||
// * @readonly
|
||||
// * @property {number} current Current usage of the hub (Amps)
|
||||
// */
|
||||
// public get current () {
|
||||
// return this._current;
|
||||
// }
|
||||
|
||||
|
||||
/**
|
||||
|
@ -254,22 +254,22 @@ export class LPF2Hub extends Hub {
|
||||
if ((data[3] === 0x3b && this.type === Consts.HubType.POWERED_UP_REMOTE)) { // Voltage (PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const voltage = data.readUInt16LE(4) / 500;
|
||||
this._voltage = Math.floor(voltage);
|
||||
this._voltage = voltage;
|
||||
return;
|
||||
} else if (data[3] === 0x3c && this.type === Consts.HubType.POWERED_UP_REMOTE) { // Current (PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const current = data.readUInt16LE(4) / 1000;
|
||||
const current = data.readUInt16LE(4);
|
||||
this._current = current;
|
||||
return;
|
||||
} else if (data[3] === 0x3c && this.type !== Consts.HubType.POWERED_UP_REMOTE) { // Voltage (Non-PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const voltage = data.readUInt16LE(4) / 400;
|
||||
this._voltage = Math.floor(voltage);
|
||||
this._voltage = voltage;
|
||||
return;
|
||||
} else if (data[3] === 0x3b && this.type !== Consts.HubType.POWERED_UP_REMOTE) { // Current (Non-PUP Remote)
|
||||
data = this._padMessage(data, 6);
|
||||
const current = data.readUInt16LE(4) / 4096;
|
||||
this._current = current * 100;
|
||||
const current = data.readUInt16LE(4) / 1000;
|
||||
this._current = current;
|
||||
return;
|
||||
}
|
||||
|
||||
|
@ -320,13 +320,11 @@ export class WeDo2SmartHub extends Hub {
|
||||
// Voltage
|
||||
if (data[1] === 0x03) {
|
||||
const voltage = data.readInt16LE(2);
|
||||
this._voltage = voltage;
|
||||
console.log("Voltage", voltage);
|
||||
this._voltage = voltage / 40;
|
||||
// Current
|
||||
} else if (data[1] === 0x04) {
|
||||
const current = data.readInt16LE(2);
|
||||
this._current = current;
|
||||
console.log("Current", current);
|
||||
this._current = current / 1000;
|
||||
}
|
||||
|
||||
const port = this._getPortForPortNumber(data[1]);
|
||||
|
Loading…
x
Reference in New Issue
Block a user