forked from robertsLando/node-red-contrib-m-bus
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmbus-out.html
72 lines (62 loc) · 2.38 KB
/
mbus-out.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
<script type="text/javascript">
RED.nodes.registerType('mbus-out', {
category: 'M Bus',
color: '#03A9F4',
defaults: {
name: {value: ''},
client: {type: 'mbus-client', required: true},
},
inputs: 0,
outputs: 1,
align: "right",
icon: 'bridge.png',
paletteLabel: 'M-Bus',
label: function () {
return this.name || 'M-Bus'
},
oneditprepare: function () {
}
})
</script>
<script type="text/x-red" data-template-name="mbus-out">
<div class="form-row">
<label for="node-input-client"><i class="icon-globe"></i> <span data-i18n="mbus.label.client"></span></label>
<input type="text" id="node-input-client">
</div>
<div class="form-row">
<label for="node-input-name"><i class="icon-tag"></i> <span data-i18n="node-red:common.label.name"></span></label>
<input type="text" id="node-input-name" placeholder="Name">
</div>
</script>
<script type="text/x-red" data-help-name="mbus-out">
<p>Subscribes to a M-Bus client events and publishes updates to output.</p>
<h3>Outputs</h3>
<ol class="node-ports">
<li>Output
<dl class="message-properties">
<dt>payload <span class="property-type">Json</span></dt>
<dd>The data of the event.</dd>
</dl>
<dl class="message-properties">
<dt>topic <span class="property-type">String</span></dt>
<dd>Event name.</dd>
</dl>
</li>
</ol>
<h3>Output</h3>
<code>msg.topic</code> contains the event name. Used topics are are:
<ul>
<li><b>scanComplete</b> - When the scan is completed, <code>msg.payload</code>
will contains an array of <code>string</code> with secondary IDs of found devices</li>
<li><b>deviceUpdated</b> - When the a device is updated, <code>msg.payload</code>
will contains an <code>Object</code> with device data</li>
<li><b>devicesLoaded</b> - When the client has `storeDevices` option set to <code>true</code> this event is triggered once the Array of devices is loaded, <code>msg.payload</code>
will contains an <code>Array</code> of Devices found</li>
</ul>
<p>For more info about the payload of messages check
<a href="https://github.com/robertsLando/node-red-contrib-m-bus#nodes">Nodes</a> section</p>
<h3>References</h3>
<ul>
<li><a href="https://github.com/robertsLando/node-red-contrib-m-bus">GitHub</a> - the node github repository</li>
</ul>
</script>