node-red-contrib-myhome-bticino-v2
Version:
Control Bticino / Legrand MyHome components from Node-RED
73 lines (70 loc) • 5.6 kB
HTML
<script type="text/x-red" data-help-name="myhome-eventsession">
<p>The monitoring node used to trigger flows based on any command read on the MyHome system BUS.</p>
<ul>
<li><strong>Name</strong> (mandatory) is the name of the node</li>
<li><strong>Gateway</strong> is the gateway to be configured in order to connect to MyHome system</li>
<li><strong>Command family filters</strong> allows you to define which kind of MyHome commands have to trigger new flows.</li>
</ul>
<h3>Input</h3>
<p>(none)</p>
<h3>Output</h3>
<p>The <strong>primary output</strong> is a <em>[string]</em> containing the OpenWebNet command read on the MyHome BUS.</p>
<p>
The <strong>secondary output</strong> contains detailled analyzed information as if the node was working in 'universal mode' (i.e. processing all received BUS frames).
Content of msg will vary based on family type :
</p>
<ul>
<li><strong>Lights</strong> : payload object details :</li>
<ul>
<li> <code>payload.command_received</code> <em>[string]</em> contains the command which was read in OpenWebNet protocol (ex: <em>'*1*5*25##'</em> means load 2.5 was turned on at 50% brightness)</li>
<li> <code>payload.buslevel</code> <em>[string]</em> : bus level ('private_riser', '01', '02', ... '15')</li>
<li> <code>payload.state</code> <em>[string]</em> value is 'ON' or 'OFF'</li>
<li> <code>payload.brightness</code> <em>[integer]</em> represents current brightness percentage of the load. When non-dimmmable is 0 or 100. </li>
<li> <code>payload.lightid</code> <em>[string]</em> : light ID</li>
<li> <code>payload.isgroup</code> <em>[boolean]</em> : group call (true) or single light point call (false)</li>
</ul>
<li><strong>Shutters</strong> : payload object details :</li>
<ul>
<li> <code>payload.command_received</code> <em>[string]</em> contains the command which was read in OpenWebNet protocol (ex: <em>'*2*2*25##'</em> means shutter 2.5 'close' action was started)</li>
<li> <code>payload.buslevel</code> <em>[string]</em> : bus level ('private_riser', '01', '02', ... '15')</li>
<li> <code>payload.state</code> <em>[string]</em> value is 'STOP', 'OPEN' or 'CLOSE'</li>
<li> <code>payload.shutterid</code> <em>[string]</em> : shutter ID</li>
<li> <code>payload.isgroup</code> <em>[boolean]</em> : group call (true) or single shutter point call (false)</li>
</ul>
<li><strong>Temperature</strong> : payload object details (only reads 'current temperature' of zone mode) :</li>
<ul>
<li> <code>payload.command_received</code> <em>[string]</em> contains the command which was read in OpenWebNet protocol</li>
<li> <code>payload.zoneid</code> <em>[string]</em> the ID of zone [1-99])</li>
<li> <code>payload.state</code> <em>[number]</em> the current measured temperature ()°C)</li>
</ul>
<li><strong>Scenario CEN/CEN+</strong> : payload object details :</li>
<ul>
<li> <code>payload.command_received</code> <em>[string]</em> contains the command which was read in OpenWebNet protocol (ex: <em>'*25*24#14*287##'</em> means button 14 of scenario 87 finalized a long press)</li>
<li> <code>payload.buslevel</code> <em>[string]</em> : bus level ('private_riser', '01', '02', ... '15')</li>
<li> <code>payload.scenariotype</code> <em>[string]</em> value is 'CEN' or 'CEN+'</li>
<li> <code>payload.scenarioid</code> <em>[string]</em> the ID of scenario (for CEN is an A/P value, for CEN+ is [0-2047])</li>
<li> <code>payload.buttonID</code> <em>[string]</em> : the button which was pressed [00-31]</li>
<li> <code>payload.actionType</code> <em>[string]</em> : the action type (can be 'SHORT', 'LONG', 'LONG_ONGOING',...)</li>
</ul>
<li><strong>Energy management</strong> : payload object details (only reads 'instant' consumption mode) :</li>
<ul>
<li> <code>payload.command_received</code> <em>[string]</em> contains the command which was read in OpenWebNet protocol</li>
<li> <code>payload.metertype</code> <em>[string]</em> value is 'meter' or 'actuator''</li>
<li> <code>payload.meterscope</code> <em>[string]</em> is always 'instant' in universal mode</li>
<li> <code>payload.meterid</code> <em>[string]</em> : address (1 to 255) of the meter</li>
<li> <code>payload.metered_Power</code> <em>[integer]</em> : the instant power (W) measured</li>
</ul>
</ul>
<p>
<strong>Both outputs</strong> also include an additional object <code>msg.mh_nodeConfigInfo</code> which includes data from node configuration.
This can be used in flows to redirect messages based on how (i.e. which node) they come from without having to include 'change nodes' at every stage.
</p>
<p>
The <code>msg.mh_nodeConfigInfo</code> contains node configuration values :
</p>
<ul>
<li> <code>mh_nodeConfigInfo.name</code> <em>[string]</em> : name</li>
<li> <code>mh_nodeConfigInfo.ownFamilyName</code> <em>[string]</em> : the OpenWebNet famaily name (such as 'OWN_LIGHTS', 'OWN_SCENARIO',...)</li>
<li> <code>mh_nodeConfigInfo.gateway</code> <em>[object]</em> : linked gateway info : name (<code>.name</code>), Host/IP (<code>.host</code>) and port (<code>.port</code>)</li>
</ul>
</script>