node-red-contrib-ecm1240
Version:
A node that receives input from a TCP node that is receiving data from a serial2Wifi communication being sent by a Brultech ECM1240 Energy Monitor.
85 lines (79 loc) • 3.1 kB
HTML
<script type="text/javascript">
RED.nodes.registerType('ecm1240',{
category: 'function',
color: '#a6bbcf',
defaults: {
name: {value:""}
},
inputs:1,
outputs:1,
icon: "file.png",
label: function() {
return this.name||"ecm1240";
}
});
</script>
<script type="text/x-red" data-template-name="ecm1240">
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> Name</label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="ecm1240">
<p>A node that receives input from a TCP node that is receiving data from a serial2Wifi communication being sent by a Brultech ECM1240 Energy Monitor.</p>
<h3>Inputs</h3>
<dl class="message-properties">
<dt>payload
<span class="property-type">Stream of buffer</span>
</dt>
<dd> coming from a TCP node connected to the output of the Brultech ECM1240. </dd>
<dt class="optional">topic <span class="property-type">string</span></dt>
<dd> Input in ASCII.</dd>
</dl>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Standard output
<dl class="message-properties">
<dt>payload <span class="property-type">JSON Object</span></dt>
<dd>myJSON["a_SecCntr"] - deltaSeconds <br>
myJSON["b_CH1Abs_Watts"] - (watt_seconds) - (prevous_watt_seconds) / deltaseconds<br>
myJSON["c_CH1Abs_wh"] - watts / 3600<br>
myJSON["d_CH2Abs_Watts"]<br>
myJSON["e_CH2Abs_wh"]<br>
myJSON["f_CH1Pol_Watts"]<br>
myJSON["g_CH1Pol_wh"]<br>
myJSON["h_CH2Pol_Watts"]<br>
myJSON["i_CH2Pol_wh"]<br>
myJSON["j_CH1_Amps"]<br>
myJSON["k_CH2_Amps"]<br>
myJSON["l_Aux1_Watts"]<br>
myJSON["m_Aux1_wh"]<br>
myJSON["n_Aux2_Watts"]<br>
myJSON["o_Aux2_wh"]<br>
myJSON["p_Aux3_Watts"]<br>
myJSON["q_Aux3_wh"]<br>
myJSON["r_Aux4_Watts"]<br>
myJSON["s_Aux4_wh"]<br>
myJSON["t_Aux5_Watts"]<br>
myJSON["u_Aux5_wh"]<br>
myJSON["v_qDCInput"]<br>
myJSON["w_ecm1240_Unit_ID"]<br>
myJSON["x_SerialNumber"]<br> </dd>
</dl>
</li>
<li>Standard error
<dl class="message-properties">
<dt>payload <span class="property-type">string</span></dt>
<dd>the standard error of the command.</dd>
</dl>
</li>
</ol>
<h3>Details</h3>
<p><code>msg.payload</code> is used as the payload of the output of the ECM1240.
The output of the ECM1240 node is a JSON string before being sent.</p>
<h3>References</h3>
<ul>
<li>Brultech (company that makes the ECM1240 Energy Monitor) <a href="http://www.brultech.com">here</a>.
<li>Brultech ECM1240 Packet Format Description <a href="https://www.brultech.com/software/files/getsoft/1/2">here</a>.
</ul>
</script>