node-red-contrib-ccu 4.4.4 → 4.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (60) hide show
  1. package/CHANGELOG.md +175 -0
  2. package/README.md +35 -0
  3. package/nodes/ccu-alexa.html +12 -14
  4. package/nodes/ccu-connection.html +63 -95
  5. package/nodes/ccu-connection.js +812 -115
  6. package/nodes/ccu-get-value.html +18 -15
  7. package/nodes/ccu-get-value.js +16 -0
  8. package/nodes/ccu-homeassistant.html +0 -48
  9. package/nodes/ccu-mqtt.html +0 -8
  10. package/nodes/ccu-poll.html +0 -17
  11. package/nodes/ccu-program.html +0 -53
  12. package/nodes/ccu-rpc-event.html +0 -34
  13. package/nodes/ccu-rpc.html +0 -64
  14. package/nodes/ccu-script.html +0 -8
  15. package/nodes/ccu-set-value.html +0 -62
  16. package/nodes/ccu-set-value.js +6 -11
  17. package/nodes/ccu-signal.html +0 -64
  18. package/nodes/ccu-switch.html +12 -24
  19. package/nodes/ccu-sysvar.html +0 -64
  20. package/nodes/ccu-value.html +23 -95
  21. package/nodes/ccu-value.js +8 -2
  22. package/nodes/lib/initretry.js +46 -9
  23. package/nodes/lib/localccu.js +21 -3
  24. package/nodes/lib/metaprovider.js +47 -19
  25. package/nodes/lib/party.js +103 -0
  26. package/nodes/lib/topic.js +22 -1
  27. package/nodes/lib/transport.js +80 -0
  28. package/nodes/locales/de/ccu-alexa.html +4 -0
  29. package/nodes/locales/de/ccu-connection.html +103 -0
  30. package/nodes/locales/de/ccu-get-value.html +16 -0
  31. package/nodes/locales/de/ccu-homeassistant.html +23 -0
  32. package/nodes/locales/de/ccu-mqtt.html +21 -0
  33. package/nodes/locales/de/ccu-poll.html +8 -0
  34. package/nodes/locales/de/ccu-program.html +26 -0
  35. package/nodes/locales/de/ccu-rpc-event.html +32 -0
  36. package/nodes/locales/de/ccu-rpc.html +31 -0
  37. package/nodes/locales/de/ccu-script.html +13 -0
  38. package/nodes/locales/de/ccu-set-value.html +46 -0
  39. package/nodes/locales/de/ccu-signal.html +29 -0
  40. package/nodes/locales/de/ccu-switch.html +18 -0
  41. package/nodes/locales/de/ccu-sysvar.html +43 -0
  42. package/nodes/locales/de/ccu-value.html +98 -0
  43. package/nodes/locales/de/ccu-value.json +1 -0
  44. package/nodes/locales/en-US/ccu-alexa.html +4 -0
  45. package/nodes/locales/en-US/ccu-connection.html +41 -0
  46. package/nodes/locales/en-US/ccu-get-value.html +13 -0
  47. package/nodes/locales/en-US/ccu-homeassistant.html +23 -0
  48. package/nodes/locales/en-US/ccu-mqtt.html +21 -0
  49. package/nodes/locales/en-US/ccu-poll.html +7 -0
  50. package/nodes/locales/en-US/ccu-program.html +25 -0
  51. package/nodes/locales/en-US/ccu-rpc-event.html +31 -0
  52. package/nodes/locales/en-US/ccu-rpc.html +30 -0
  53. package/nodes/locales/en-US/ccu-script.html +13 -0
  54. package/nodes/locales/en-US/ccu-set-value.html +45 -0
  55. package/nodes/locales/en-US/ccu-signal.html +29 -0
  56. package/nodes/locales/en-US/ccu-switch.html +6 -0
  57. package/nodes/locales/en-US/ccu-sysvar.html +42 -0
  58. package/nodes/locales/en-US/ccu-value.html +81 -0
  59. package/nodes/locales/en-US/ccu-value.json +1 -0
  60. package/package.json +1 -1
@@ -0,0 +1,98 @@
1
+ <script type="text/html" data-help-name="ccu-value">
2
+ <p>Geräte steuern und/oder Events von einem Gerät empfangen.</p>
3
+ <h3>Konfiguration</h3>
4
+ <ul>
5
+ <li><b>CCU:</b> Die zu verwendende CCU-Konfiguration.</li>
6
+ <li><b>Topic:</b> <code>msg.topic</code> ausgehender Nachrichten, mit Platzhaltern: <code>${CCU}</code>,
7
+ <code>${Interface}</code>, <code>${device}</code>, <code>${deviceName}</code>, <code>${deviceType}</code>,
8
+ <code>${channel}</code>, <code>${channelName}</code>, <code>${channelType}</code>, <code>${channelIndex}</code>,
9
+ <code>${datapoint}</code>, <code>${datapointName}</code>. Dieselbe Vorlage gibt es in jedem Node, der Nachrichten
10
+ ausgibt; wer überall z.&nbsp;B. <code>hm/${Interface}/${channel}/${datapoint}</code> einträgt, bekommt überall
11
+ dasselbe Topic-Schema.</li>
12
+ <li><b>Interface</b>: Hier wird das Interface gewählt, über welches das gewüschnte Geräte angebunden ist.</li>
13
+ <li><b>Channel</b>: Der Kanal dessen Datenpunkte verwendet werden sollen. Er besteht aus der Serien- sowie der Kanalnummer. Eine Autovervollständigung hilft bei der Auswahl anhand der Klarnamen.</li>
14
+ <li><b>Datapoint</b>: Der Datenpunkt des Kanals, auch hier wird über eine Autovervollständigung die Auswahl vereinfacht. Was ein Datenpunkt bedeutet, sein Wertebereich und seine Einheit:
15
+ die <a href="https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf" target="_blank">eQ-3 HmIP-Gerätedokumentation (PDF)</a>.</li>
16
+ <li><b>ON_TIME</b>:
17
+ Zeit in Sekunden nach der ein Schaltaktor/Dimmer nach dem anschalten wieder ausgeschaltet werden soll.<br>
18
+ Dabei ist:
19
+ <ul>
20
+ <li><code>undefined</code> Keine automatische Ausschaltung</li>
21
+ <li><code>number</code> Eine feste Verzögerung in Sekunden</li>
22
+ <li><code>global</code>, <code>flow</code> Die Verzögerung in Sekunden wird aus einer Context-Variablen übernommen</li>
23
+ <li><code>msg</code> Die Verzögerung in Sekunden wird kann über eine msg property übergeben werden</li>
24
+ </ul>
25
+
26
+ </li>
27
+ <li><b>set Mode</b>:
28
+ Eine Erweiterung für Geräte, die sowohl den rx_mode BURST als auch WAKEUP unterstützen wie z.B.:
29
+ Batterie-Schaltaktoren oder Rauchmelder mit Sirenenfunktion. Mit dem Parameter kann in diesem Fall angegeben
30
+ werden, ob der übergebene Wert über BURST oder WAKEUP übertragen werden soll.
31
+ <ul>
32
+ <li><b>WAKEUP</b> - Überträgt den Wert sobald sich der entsprechende Empfänger bei der Zentrale meldet.</li>
33
+ <li><b>BURST</b> - Versucht alle BURST-Empfänger für die Übertragung aufzuwecken was sich negativ auf den DutyCycle und die Batterielaufzeit aller Burst-Empfänger auswirkt.</li>
34
+ </ul>
35
+ </li>
36
+ <li><b>Flags</b>:
37
+ <ul>
38
+ <li><b>Nur geänderte Werte ausgeben</b> - Ein Event wird nur dann erzeugt, wenn sich der Wert seit dem letztn Event verändert hat.</li>
39
+ <li><b>Während WORKING keine Werte ausgeben</b> - Es gibt Aktoren, z.B. Dimmer oder Rolladen, die während einer Rampe (Öffnen/Schließen eines Rollladen, Dimmen einer Lampe) fortwährend den aktuellen Zustand ausgeben. Um nur den End-Status auszugeben kann diese Option benutzt werden. Gebräuchlich auch bei Verwendung mit Dashboard-Nodes um "springende" Slider zu verhindern.</li>
40
+ <li><b>Beim Start letzten bekannten Wert ausgeben</b> - Wenn Node-RED gestartet wird, dann wird der letzte Wert (sofern in der ReGaHSS bekannt) ausgegeben. Z.B. um beim Start einen korrekten Wert an das Dashboard zu übergeben. <b>Achtung:</b> </li>
41
+ </ul>
42
+
43
+ </li>
44
+ </ul>
45
+
46
+ <h3>Input</h3>
47
+ <p>
48
+ Für den Input des Value Node wird <code>msg.payload</code> als der Wert verwendet der in den Datenpunkt geschrieben wird.
49
+
50
+ Die Bestimmung des Datenpunkts sowie des Kanals und der Schnittstellen können hier dynamisch sein. Dazu werden die Eingabefelder leer gelassen und über die eingehende <code>msg</code> gesetzt.
51
+ </p>
52
+ <b>Option 1</b>: Interface, Channel und Datapoint können in der msg als Properties angegeben werden:
53
+ <code>
54
+ <pre>{
55
+ "interface": "BidCos-RF",
56
+ "channel": "OEQ1868878:1",
57
+ "datapoint": "STATE",
58
+ "payload": true
59
+ }</pre>
60
+ </code>
61
+
62
+ <b>Option 2</b>: Der Datenpunkt kann über <code>msg.topic</code> angegeben werden wobei Interface, Channel und Datapoint mit Punkt getrennt werden:
63
+ <code>
64
+ <pre>{
65
+ "topic": "BidCos-RF.OEQ1868878:1.STATE",
66
+ "payload": true
67
+ }</pre>
68
+ </code>
69
+ Oder in der Form, in der die Nodes ihre Topics ausgeben – mit Schrägstrichen, die letzten drei Teile zählen
70
+ (<code>ccu3/BidCos-RF/OEQ1868878:1/STATE</code>, <code>hm/BidCos-RF/OEQ1868878:1/STATE</code> und
71
+ <code>BidCos-RF/OEQ1868878:1/STATE</code> meinen denselben Datenpunkt), so dass das Topic eines Events unverändert
72
+ zurückgeschickt werden kann.
73
+
74
+
75
+ <h3>Output</h3>
76
+ <p>Der Value Node gibt nur Events aus, wenn Interface, Channel und Datapoint gesetzt sind. Die Nachricht ist die beim rpc-event Node beschriebene.</p>
77
+
78
+
79
+ <h3>Dynamische Konfiguration</h3>
80
+ <p><code>msg.config</code> ist ein Objekt, dessen Eigenschaften die Konfiguration dieses Nodes für genau diese Nachricht überschreiben. Die gespeicherte Konfiguration bleibt unverändert.</p>
81
+ <ul>
82
+ <li><code>iface</code></li>
83
+ <li><code>channel</code></li>
84
+ <li><code>datapoint</code></li>
85
+ <li><code>force</code></li>
86
+ </ul>
87
+ <p>Eine Nachricht ohne <code>payload</code> schreibt nichts, richtet aber die Ausgabe-Seite des Nodes neu aus.</p>
88
+ <h3>Party-/Urlaubsmodus (HmIP)</h3>
89
+ <p>Ein HmIP-Thermostat (eTRV, WTH) nimmt <code>PARTY_TIME_START</code>, <code>PARTY_TIME_END</code> und
90
+ <code>PARTY_SET_POINT_TEMPERATURE</code> nur gemeinsam an; einzeln geschrieben setzt er die anderen beiden zurück. Ein
91
+ Schreiben auf einen der drei Datenpunkte geht deshalb als ein <code>putParamset</code> mit allen dreien hinaus – die
92
+ beiden anderen aus dem letzten eigenen Schreiben, dem Wertecache oder einem Lesen vom Gerät. Die Zeiten können als
93
+ Gerätestring <code>YYYY_MM_DD HH:MM</code>, als JavaScript-Date, ISO-String oder Millisekunden angegeben werden; sie
94
+ werden in lokaler Zeit für das Gerät formatiert. Ältere HM-Thermostate (<code>PARTY_MODE_SUBMIT</code>) sind nicht
95
+ abgedeckt.</p>
96
+ <h3>Queue und Erzwingen</h3>
97
+ <p>Mit <i>Queue</i> werden Schreibbefehle nacheinander gesendet, und ein Wert, den der Cache schon von einer anderen Quelle kennt, wird nicht noch einmal gesendet. Ein Wert, den dieser Node selbst zuletzt geschrieben hat, wird immer gesendet: ein von Hand bewegter Rollladen meldet auf seinem Steuerkanal keinen neuen Sollwert. <i>Erzwingen</i> (auch <code>msg.config.force</code>) sendet in jedem Fall.</p>
98
+ </script>
@@ -9,6 +9,7 @@
9
9
  "cache": "Beim Start letzten bekannten Wert ausgeben",
10
10
  "working": "Während WORKING keine Werte ausgeben",
11
11
  "queue": "Queue",
12
+ "force": "Erzwingen (Cache ignorieren)",
12
13
  "certainOnly": "Unsichere Werte verwerfen"
13
14
  }
14
15
  }
@@ -0,0 +1,4 @@
1
+ <script type="text/html" data-help-name="ccu-alexa">
2
+ <p>Connect Homematic Devices with node-red-contrib-alexa-smart-home. Connect a Node "alexa smart home v3" to the
3
+ input and "alexa smart home v3 state" to the output.</p>
4
+ </script>
@@ -0,0 +1,41 @@
1
+ <script type="text/html" data-help-name="ccu-connection">
2
+ <p>The connection node manages the connection to the CCU's interface processes and to its logic layer.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>Name</b>: A name of your choice for this CCU configuration. It tells several CCUs apart and appears in every other CCU node.</li>
6
+ <li><b>CCU Address</b>: The IP address or host name of the CCU. With the RedMatic addon Node-RED runs on the CCU itself, so the loopback address <code>localhost</code> or <code>127.0.0.1</code> is the right one.</li>
7
+ <li><b>Listen Address</b>: The address of the network interface the RPC servers listen on for the CCU's events. On the CCU itself (RedMatic) this is <code>localhost</code> / <code>127.0.0.1</code> as well; <code>0.0.0.0</code> listens on every interface.</li>
8
+ <li><b>Init Address</b>: Normally the same as <i>Listen Address</i>: the address under which the CCU reaches Node-RED. It may stay empty.
9
+ <p>For advanced setups: when listening on every interface (<code>0.0.0.0</code>), when Node-RED runs in a container (Docker) behind NAT, or in other special networks, <i>Init Address</i> and <i>Listen Address</i> may have to differ.</p></li>
10
+ <li><b>BINRPC listening port</b>: The port of the BIN-RPC server the CCU sends its events to. Several connections (several connection nodes) each need a port of their own.</li>
11
+ <li><b>XMLRPC listening port</b>: The port of the XML-RPC server the CCU sends its events to. Several connections each need a port of their own.</li>
12
+ <li><b>Interfaces</b>: The interfaces to use. Untick what you do not have (no CUxD, no HmIP devices, say) to switch the unused parts off.
13
+ <ul>
14
+ <li>ReGaHSS: the CCU's logic layer, which holds the programs and system variables</li>
15
+ <li>BidCos-RF: Homematic radio</li>
16
+ <li>BidCos-Wired: Homematic wired</li>
17
+ <li>HmIP-RF: Homematic IP radio</li>
18
+ <li>VirtualDevices: heating groups and systems the CCU integrates, such as Osram Lightify</li>
19
+ <li>CUxD</li>
20
+ <li>CCU-Jack: the XML-RPC interface of the <a href="https://github.com/mdzio/ccu-jack" target="_blank">CCU-Jack</a> addon (port configurable, 2121 by default, 2122 with TLS)</li>
21
+ </ul>
22
+ </li>
23
+ <li><b>RPC ping</b> and <b>RPC ping timeout (s)</b>: How often the connection to the interface processes is checked with a ping, and after how many seconds without an answer it subscribes again. Off means no pings and no timeout-triggered re-init for this connection.</li>
24
+ <li><b>Rega poll</b>: Changes of system variables are not pushed by the CCU. With polling on, the variables and their values are read every <i>Rega poll interval</i> seconds.</li>
25
+ <li><b>Names/rooms refresh (min)</b>: How often channel names, rooms and functions are re-read; 0 never.</li>
26
+ <li><b>Queue timeout (ms)</b>, <b>Queue pause (ms)</b>: The write queue's timeout per write and the pause between two writes.</li>
27
+ <li><b>Context Store</b>: The Node-RED context store the states of all devices and variables are kept in. See <a target="_blank" href="https://nodered.org/docs/user-guide/context">Working with context</a> in the Node-RED documentation.</li>
28
+ <li><b>openccu-lite token</b>: Only for <a href="https://github.com/hobbyquaker/openccu-lite" target="_blank">openccu-lite</a>, a CCU firmware without ReGaHSS. Names, rooms and functions come from the system's metadata API there, which needs a token made under <i>Users</i> on the system. When Node-RED runs on the system itself (RedMatic) the field stays empty: the local token is read automatically. The token is kept, like the password, in Node-RED's credentials (encrypted in <code>flows_cred.json</code>, never in the flow, never in an export). A CCU, RaspberryMatic or OpenCCU ignores the field. openccu-lite has no system variables, programs or HM-Script; those nodes stay in the flow and report an error per message.</li>
29
+ <li><b>openccu-lite port</b>: Only needed when the system's web server is not on port 80 (443 with TLS).</li>
30
+ <li><b>Device data / Re-read device data</b>: Reads the device list of every connected interface again. New and changed devices (a channel whose type changed, say) get their datapoints fetched anew, removed ones leave the table. A device the CCU reports with a changed type or version is re-read without the button as well. The button needs a deployed connection.</li>
31
+ <li><b>Authentication</b>: Encryption and login for a CCU on the network (Node-RED not on the CCU). Both belong to the CCU's web server, which fronts the interface processes: on a CCU3 TLS and authentication are switched on in the firewall settings, on openccu-lite under <i>Remote access</i> (classic RPC). When Node-RED runs on the system itself (RedMatic; address <code>localhost</code> / <code>127.0.0.1</code>) the processes are reached directly on the loopback, BidCos over BIN-RPC, without TLS and without a login; these settings are then not used.
32
+ <ul>
33
+ <li>Enabled: The username and password are sent with every call (HTTP basic auth) to every XML-RPC interface (BidCos-RF, BidCos-Wired, HmIP-RF, VirtualDevices, CCU-Jack) and to the ReGaHSS. BIN-RPC (CUxD, the hidden BIN-RPC option for BidCos-RF) has no login. Without TLS the credentials travel in plain text, so the dialog switches TLS on with it.</li>
34
+ <li>TLS/SSL: Transport encryption. The interfaces are reached over the CCU's TLS ports (42000, 42001, 42010, 49292, ReGaHSS 48181, CCU-Jack 2122), openccu-lite's metadata API over 443. BIN-RPC has no TLS: with TLS on, BidCos-RF always goes over XML-RPC.</li>
35
+ <li>Ignore invalid TLS Certificates: Node-RED accepts an untrusted certificate too. Needed as long as the CCU uses its self-signed certificate.</li>
36
+ <li>Username: A user allowed to log in to the CCU.</li>
37
+ <li>Password: The user's password. It is kept in Node-RED's credentials (encrypted in <code>flows_cred.json</code>), not in the flow. A flow from a version before 4.4.6 that still carries it in plain text is taken over at the first start; the next deploy removes it from <code>flows.json</code>.</li>
38
+ </ul>
39
+ The other direction stays unencrypted: the CCU sends its events to the XML-RPC or BIN-RPC server Node-RED opens for it (<i>Listen Address</i>, <i>BINRPC</i> and <i>XMLRPC listening port</i>) without TLS and without a login - it cannot log in there or verify our certificate. Those ports should be open in the Node-RED host's firewall for the CCU only.</li>
40
+ </ul>
41
+ </script>
@@ -0,0 +1,13 @@
1
+ <script type="text/html" data-help-name="ccu-get-value">
2
+ <p>This Node outputs the current state of a datapoint or a ccu variable on any incoming message.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>Topic</b>: <code>msg.topic</code> of the outgoing message, the same template as in the other nodes
6
+ (<code>${CCU}</code>, <code>${Interface}</code>, <code>${device}</code>, <code>${deviceName}</code>,
7
+ <code>${channel}</code>, <code>${channelName}</code>, <code>${channelType}</code>, <code>${channelIndex}</code>,
8
+ <code>${datapoint}</code>; for a variable <code>${Name}</code>), e.g.
9
+ <code>${CCU}/${Interface}/${channel}/${datapoint}</code>. Empty (the default): <code>msg.topic</code> stays as it
10
+ came in.</li>
11
+ </ul>
12
+ <p>What a datapoint means, its range and unit: the <a href="https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf" target="_blank">eQ-3 HmIP device documentation (PDF)</a>.</p>
13
+ </script>
@@ -0,0 +1,23 @@
1
+ <script type="text/html" data-help-name="ccu-homeassistant">
2
+ <p>Publishes Home Assistant MQTT discovery configurations for selected devices.</p>
3
+ <p>The node is a companion to the <b>ccu-mqtt</b> node: it reuses that node's topic templates and
4
+ payload format, so the discovery configs point at the topics ccu-mqtt already publishes and
5
+ consumes. State and commands keep flowing through ccu-mqtt.</p>
6
+ <h3>Wiring</h3>
7
+ <p>Connect the output to the same <b>mqtt out</b> node as the ccu-mqtt node. The node sends
8
+ <code>msg.topic</code>, <code>msg.payload</code> and <code>msg.retain</code>.</p>
9
+ <h3>Device selection</h3>
10
+ <p>Only checked devices are announced to Home Assistant (one HA device per Homematic device).
11
+ Unchecking a previously checked device publishes an empty config on the next deploy, which
12
+ removes the device from Home Assistant.</p>
13
+ <h3>Entities</h3>
14
+ <p>Switches, dimmers (light), blinds/shutters (cover), thermostats (climate), contacts/motion/
15
+ smoke/water (binary_sensor), keys (event), KeyMatic (lock), energy/weather (sensor). With the
16
+ <i>other datapoints</i> option every remaining datapoint is included as an entity that is
17
+ disabled by default.</p>
18
+ <h3>Input</h3>
19
+ <p>Any incoming message republishes the discovery configs.</p>
20
+ <h3>Requirements</h3>
21
+ <p>Home Assistant ≥ 2024.11 (device-based discovery). Device availability is derived from the
22
+ UNREACH datapoint of the maintenance channel.</p>
23
+ </script>
@@ -0,0 +1,21 @@
1
+ <script type="text/html" data-help-name="ccu-mqtt">
2
+ <p>Connect the CCU to MQTT: device events and system variable changes go out as messages with a ready-made topic, incoming messages switch, read or call RPC methods. Wire the node between an <i>mqtt in</i> and an <i>mqtt out</i> node.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>CCU</b>: The CCU configuration to use.</li>
6
+ <li><b>Cache</b>: At start the cached values of all datapoints are emitted once.</li>
7
+ <li><b>Topics</b>, each a template with placeholders (<code>${channelName}</code>, <code>${channelNameOrAddress}</code>, <code>${datapoint}</code>, <code>${name}</code>, <code>${iface}</code>, <code>${paramset}</code>, <code>${param}</code>, <code>${method}</code>, <code>${callid}</code>, <code>${rxtx}</code>):
8
+ <ul>
9
+ <li><b>Event</b>: outgoing device events, default <code>hm/status/${channelName}/${datapoint}</code>.</li>
10
+ <li><b>setValue</b>: incoming, writes <code>payload</code> into the datapoint; <code>${channelNameOrAddress}</code> takes the channel's name or its address.</li>
11
+ <li><b>get</b>: incoming, emits the datapoint's cached value on the event topic.</li>
12
+ <li><b>Sysvar/Program Change</b>: outgoing, changes of system variables and programs; <b>Sysvar/Program Set</b>: incoming, sets a variable or starts a program.</li>
13
+ <li><b>putParam</b>, <b>putParamset</b>: incoming, writes one parameter or a whole paramset (<code>MASTER</code>, <code>VALUES</code>) given as JSON.</li>
14
+ <li><b>RPC</b>: incoming, calls an RPC method of the interface (<code>payload</code>: the parameters as a JSON array); the answer goes out on the <b>RPC Response</b> topic with the same <code>${callid}</code>.</li>
15
+ <li><b>Message Counters</b>: outgoing, the counters of received and sent messages per interface (<code>${rxtx}</code> = <code>rx</code>/<code>tx</code>).</li>
16
+ </ul>
17
+ </li>
18
+ <li><b>Output Payload</b>: <i>Plain</i> (the value only), <i>MQTT-Smarthome JSON Basic</i> (<code>{"val", "ts", "lc"}</code>) or <i>MQTT-Smarthome JSON Extended</i> (plus the message's Homematic properties: <code>hm.iface</code>, <code>hm.channel</code>, <code>hm.datapoint</code> and so on). Incoming, a bare value and an object with <code>val</code> are both understood.</li>
19
+ </ul>
20
+ <p>For Home Assistant the <i>ccu-homeassistant</i> node publishes the discovery configurations for these topics.</p>
21
+ </script>
@@ -0,0 +1,7 @@
1
+ <script type="text/html" data-help-name="ccu-poll">
2
+ <p>Triggers an immediate polling of Sysvars from ReGaHSS.</p>
3
+ <p>This node is intended to receive changes of variables with lower latency. You can create a CCU Program that
4
+ reacts to variable changes by pressing a virtual button, this virtual button presses can then be received by a
5
+ <i>value</i> or <i>rpc event</i> node that triggers an update of the variables through the <i>ccu poll</i>
6
+ node.</p>
7
+ </script>
@@ -0,0 +1,25 @@
1
+ <script type="text/html" data-help-name="ccu-program">
2
+ <p>Executes a ReGaHSS program.</p>
3
+ <h3>Inputs</h3>
4
+ <dl class="message-properties">
5
+ <dt>payload
6
+ <span class="property-type">*</span>
7
+ </dt>
8
+ <dd>
9
+ If the payload is of type boolean the program gets (de)activated. On activation it is executed also. In all
10
+ other cases the program will be executed.
11
+ </dd>
12
+ </dl>
13
+ <h3>Outputs</h3>
14
+ <ol class="node-ports">
15
+ <li>Output
16
+ <dl class="message-properties">
17
+ <dt>payload <span class="property-type">string</span></dt>
18
+ <dd>
19
+ The payload contains a timestamp of the last program run (property <code>ts</code> and the
20
+ information if the program is activated (property <code>active</code>).
21
+ </dd>
22
+ </dl>
23
+ </li>
24
+ </ol>
25
+ </script>
@@ -0,0 +1,31 @@
1
+ <script type="text/html" data-help-name="ccu-rpc-event">
2
+ <p>Emits the CCU's events: one message per datapoint change that passes the filters.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>CCU</b>: The CCU configuration to use.</li>
6
+ <li><b>Topic</b>: <code>msg.topic</code> of the outgoing messages, with placeholders: <code>${CCU}</code>,
7
+ <code>${Interface}</code>, <code>${device}</code>, <code>${deviceName}</code>, <code>${deviceType}</code>,
8
+ <code>${channel}</code>, <code>${channelName}</code>, <code>${channelType}</code>, <code>${channelIndex}</code>,
9
+ <code>${datapoint}</code>, <code>${datapointName}</code>. Every node that emits messages has the same template
10
+ (value, get value, sysvar, program, rpc, script).</li>
11
+ <li><b>Interface</b>: The interface the devices are connected through; <code>*</code> passes the events of every connected interface.</li>
12
+ <li><b>room</b>: Room filter, e.g. <code>Living room</code>.</li>
13
+ <li><b>function</b>: Function filter, e.g. <code>Buttons</code>.</li>
14
+ <li><b>device</b>: The serial number of the device, e.g. <code>OEQ1662328</code>.</li>
15
+ <li><b>deviceName</b>: The device's name in the CCU, e.g. <code>Smoke detector study</code>; every smoke detector with a regular expression: <code>Smoke detector.*</code>.</li>
16
+ <li><b>deviceType</b>: The device type, e.g. <code>HM-Sec-SD-2</code>.</li>
17
+ <li><b>channel</b>: The channel address - serial number and channel index, e.g. <code>OEQ1245312:4</code>.</li>
18
+ <li><b>channelName</b>: The channel's name in the CCU, e.g. <code>Bathroom ceiling light PIR</code>.</li>
19
+ <li><b>channelType</b>: The channel type, e.g. <code>VIRTUAL_KEY</code> or <code>DIMMER</code>.</li>
20
+ <li><b>channelIndex</b>: The channel index, e.g. <code>2</code>.</li>
21
+ <li><b>datapoint</b>: The channel's datapoint, e.g. <code>PRESS_SHORT</code> or <code>ACTUAL_TEMPERATURE</code>. What a datapoint means:
22
+ the <a href="https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf" target="_blank">eQ-3 HmIP device documentation (PDF)</a>.</li>
23
+ <li><b>Only changed values</b> - an event is emitted only when the value differs from the last event's.</li>
24
+ <li><b>No values while WORKING</b> - dimmers and blinds report their state continuously during a ramp (a blind moving, a lamp dimming). This option emits the end state only; useful with dashboard nodes to keep sliders from jumping.</li>
25
+ <li><b>Emit the last known value at start</b> - when Node-RED starts, the last value (as far as known) is emitted, e.g. to hand a dashboard a correct value at start. <b>Note:</b> if the emitted message ends in a Homematic write further down the flow, every (full) deploy costs duty cycle.</li>
26
+ </ul>
27
+ <p>Every filter is a text or, with the selector next to it, a regular expression; an empty filter matches everything. A message must pass all filters that are set.</p>
28
+
29
+ <h3>Output</h3>
30
+ <p>One message per event. Besides <code>payload</code> (the value) it carries the datapoint's context: <code>ccu</code>, <code>iface</code>, <code>device</code>, <code>deviceName</code>, <code>deviceType</code>, <code>channel</code>, <code>channelName</code>, <code>channelType</code>, <code>channelIndex</code>, <code>datapoint</code>, <code>datapointName</code>, <code>datapointType</code>, <code>datapointMin</code>, <code>datapointMax</code>, <code>datapointEnum</code>, <code>datapointDefault</code>, <code>datapointControl</code>, <code>value</code>, <code>valuePrevious</code>, <code>valueEnum</code>, <code>valueStable</code>, <code>rooms</code>/<code>room</code>, <code>functions</code>/<code>function</code>, <code>ts</code>, <code>tsPrevious</code> and <code>lc</code> (the event's time, the previous event's, the last change's), <code>change</code>, <code>cache</code> (true for a value emitted at start), <code>working</code>, <code>direction</code>, <code>uncertain</code>, and <code>topic</code> as configured.</p>
31
+ </script>
@@ -0,0 +1,30 @@
1
+ <script type="text/html" data-help-name="ccu-rpc">
2
+ <p>Executes a RPC method and outputs the return value.</p>
3
+ <h3>Inputs</h3>
4
+ <dl class="message-properties">
5
+ <dt>topic
6
+ <span class="property-type">String</span>
7
+ </dt>
8
+ <dd>
9
+ The method that should be called
10
+ </dd>
11
+ <dt>payload
12
+ <span class="property-type">Array|String</span>
13
+ </dt>
14
+ <dd>
15
+ An array or an JSON string containing an array of parameters for the rpc call.
16
+ </dd>
17
+
18
+ </dl>
19
+ <h3>Outputs</h3>
20
+ <ol class="node-ports">
21
+ <li>Output
22
+ <dl class="message-properties">
23
+ <dt>payload <span class="property-type">array</span></dt>
24
+ <dd>
25
+ The return value of the rpc call.
26
+ </dd>
27
+ </dl>
28
+ </li>
29
+ </ol>
30
+ </script>
@@ -0,0 +1,13 @@
1
+ <script type="text/html" data-help-name="ccu-script">
2
+ <p>Runs an HM-Script (ReGaHSS) on the CCU and emits its result.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>CCU</b>: The CCU configuration to use.</li>
6
+ <li><b>Topic</b>: <code>msg.topic</code> of the outgoing message, a template with placeholders (<code>${CCU}</code>, <code>${Interface}</code>), default <code>${CCU}/${Interface}</code>.</li>
7
+ <li><b>Script</b>: The script. Left empty, <code>msg.payload</code> of the incoming message is run as the script.</li>
8
+ </ul>
9
+ <h3>Input</h3>
10
+ <p>Every incoming message runs the script; without a configured script <code>msg.payload</code> is the script.</p>
11
+ <h3>Output</h3>
12
+ <p><code>msg.payload</code> is the script's output (what it writes with <code>WriteLine</code>), <code>msg.objects</code> the values of the variables the script set, plus <code>iface</code> (<code>ReGaHSS</code>) and <code>ccu</code>. A script that does not run to its end reports <i>Script call failed</i>. openccu-lite has no ReGaHSS; the node reports an error per message there.</p>
13
+ </script>
@@ -0,0 +1,45 @@
1
+ <script type="text/html" data-help-name="ccu-set-value">
2
+ <p>Write one value to several devices at once: every channel the filters match gets <code>msg.payload</code> written into the chosen datapoint.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>CCU</b>: The CCU configuration to use.</li>
6
+ <li><b>Interface</b>: The interface whose devices are addressed; <code>*</code> for every connected interface.</li>
7
+ <li><b>room</b>, <b>function</b>: Room and function filters, e.g. <code>Living room</code>, <code>Lights</code>.</li>
8
+ <li><b>device</b>, <b>deviceName</b>, <b>deviceType</b>: Filters on the device's serial number, CCU name and type, e.g. <code>OEQ1662328</code>, <code>Ceiling lamp.*</code>, <code>HM-LC-Sw1-FM</code>.</li>
9
+ <li><b>channel</b>, <b>channelName</b>, <b>channelType</b>, <b>channelIndex</b>: Filters on the channel address (<code>OEQ1245312:4</code>), channel name, channel type (<code>SWITCH</code>, <code>DIMMER</code>) and channel index.</li>
10
+ <li><b>datapoint</b>: The datapoint written to, e.g. <code>STATE</code> or <code>LEVEL</code>. What a datapoint means, its range and unit:
11
+ the <a href="https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf" target="_blank">eQ-3 HmIP device documentation (PDF)</a>.</li>
12
+ <li><b>force</b>: Writes even when the cache already holds the value (see <i>Queue and force</i> in the value node's help).</li>
13
+ </ul>
14
+ <p>Every filter is a text or, with the selector next to it, a regular expression; an empty filter matches everything. The value is written to every channel that passes all filters set and has the datapoint.</p>
15
+
16
+ <h3>Input</h3>
17
+ <p><code>msg.payload</code> is the value written. Filters left empty are filled from properties of the message with the same name (<code>msg.iface</code>, <code>msg.rooms</code>, <code>msg.channel</code>, <code>msg.datapoint</code> and so on); <code>msg.config</code> overrides the configuration for that one message (below).</p>
18
+
19
+ <h3>Party and holiday mode (HmIP)</h3>
20
+ <p>An HmIP thermostat (eTRV, WTH) takes <code>PARTY_TIME_START</code>, <code>PARTY_TIME_END</code> and
21
+ <code>PARTY_SET_POINT_TEMPERATURE</code> only together; written alone, one resets the other two. A write to one of the
22
+ three therefore goes out as one <code>putParamset</code> with all three - the other two from our own last write, the
23
+ value cache or a read from the device. The times may be the device's own <code>YYYY_MM_DD HH:MM</code> string, a
24
+ JavaScript Date, an ISO string or epoch milliseconds; they are formatted for the device in local time. The older HM
25
+ thermostats (<code>PARTY_MODE_SUBMIT</code>) are not covered.</p>
26
+
27
+ <h3>Dynamic configuration</h3>
28
+ <p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
29
+ <ul>
30
+ <li><code>iface</code></li>
31
+ <li><code>rooms</code></li>
32
+ <li><code>functions</code></li>
33
+ <li><code>device</code></li>
34
+ <li><code>deviceType</code></li>
35
+ <li><code>deviceName</code></li>
36
+ <li><code>channel</code></li>
37
+ <li><code>channelType</code></li>
38
+ <li><code>channelIndex</code></li>
39
+ <li><code>channelName</code></li>
40
+ <li><code>datapoint</code></li>
41
+ <li><code>force</code></li>
42
+ <li>and the matching <code>...Rx</code> selectors</li>
43
+ </ul>
44
+ <p>Properties of the message itself (<code>msg.rooms</code> and so on) also fill in fields left empty in the dialog, as they always did.</p>
45
+ </script>
@@ -0,0 +1,29 @@
1
+ <script type="text/html" data-help-name="ccu-signal">
2
+ <p>Send LED- and Sound-Signals.</p>
3
+
4
+ <h3>Dynamic configuration</h3>
5
+ <p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
6
+ <ul>
7
+ <li><code>iface</code></li>
8
+ <li><code>channel</code></li>
9
+ <li><code>channelType</code></li>
10
+ <li><code>chime</code></li>
11
+ <li><code>led</code></li>
12
+ <li><code>signal</code></li>
13
+ <li><code>volume</code></li>
14
+ <li><code>repeat</code></li>
15
+ <li><code>repetitions</code></li>
16
+ <li><code>durationUnit</code></li>
17
+ <li><code>durationValue</code></li>
18
+ <li><code>rampTimeUnit</code></li>
19
+ <li><code>rampTimeValue</code></li>
20
+ <li><code>acousticAlarmSelection</code></li>
21
+ <li><code>opticalAlarmSelection</code></li>
22
+ <li><code>dimmerLevel</code></li>
23
+ <li><code>dimmerColor</code></li>
24
+ <li><code>dimmerList</code></li>
25
+ <li><code>soundLevel</code></li>
26
+ <li><code>soundList</code></li>
27
+ </ul>
28
+ <p><code>soundList</code> and <code>dimmerList</code> also accept a plain array of values, e.g. <code>msg.config.soundList = [1, 2]</code>.</p>
29
+ </script>
@@ -1,4 +1,10 @@
1
1
  <script type="text/html" data-help-name="ccu-switch">
2
+ <p>Route a message depending on the state of an actuator or a system variable.</p>
3
+ <h3>Details</h3>
4
+ <p>The ccu switch node behaves like Node-RED's own switch node: it routes a message depending on the state of an actuator (a datapoint's property) or a system variable, to different outputs per rule if wanted. <i>Interface</i>, <i>Channel</i>/<i>Datapoint</i> or <i>Sysvar</i> and <i>Property</i> pick the value the rules are checked against.</p>
5
+ <h4>Documentation</h4>
6
+ <a target="_blank" href="https://github.com/rdmtc/RedMatic/wiki/CCU-Nodes#ccu-switch-node">ccu switch node in the RedMatic wiki</a> (German)
7
+
2
8
  <h3>Dynamic configuration</h3>
3
9
  <p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
4
10
  <ul>
@@ -0,0 +1,42 @@
1
+ <script type="text/html" data-help-name="ccu-sysvar">
2
+ <p>Set and read ReGaHSS system variables.</p>
3
+ <h3>Inputs</h3>
4
+ <dl class="message-properties">
5
+ <dt>payload
6
+ <span class="property-type">*</span>
7
+ </dt>
8
+ <dd>
9
+ The value that should be assigned to the variable.
10
+ </dd>
11
+ </dl>
12
+
13
+ <h3>Outputs</h3>
14
+ <ol class="node-ports">
15
+ <li>Output - every change of the variable (with <i>Rega poll</i> on in the connection) and, after a write, its new state. <code>msg</code> example:<br>
16
+ <pre><code>
17
+ {
18
+ "ccu": "localhost",
19
+ "iface": "ReGaHSS",
20
+ "type": "SYSVAR",
21
+ "name": "Presence",
22
+ "payload": false,
23
+ "value": false,
24
+ "valueType": "boolean",
25
+ "valueEnum": "absent",
26
+ "ts": 1525197999611,
27
+ "lc": 1525197999611,
28
+ "enum": ["absent", "present"],
29
+ "id": 950,
30
+ "topic": "ReGaHSS/Presence"
31
+ }
32
+ </code></pre>
33
+ </li>
34
+ </ol>
35
+
36
+ <h3>Dynamic configuration</h3>
37
+ <p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
38
+ <ul>
39
+ <li><code>name</code></li>
40
+ </ul>
41
+ <p>The <em>Value from</em> field selects where the value to write comes from (msg/flow/global/env); it no longer has to be <code>msg.payload</code>.</p>
42
+ </script>
@@ -0,0 +1,81 @@
1
+ <script type="text/html" data-help-name="ccu-value">
2
+ <p>Control a device and/or receive its events: one datapoint of one channel.</p>
3
+ <h3>Configuration</h3>
4
+ <ul>
5
+ <li><b>CCU</b>: The CCU configuration to use.</li>
6
+ <li><b>Topic</b>: <code>msg.topic</code> of the outgoing messages, with placeholders: <code>${CCU}</code>,
7
+ <code>${Interface}</code>, <code>${device}</code>, <code>${deviceName}</code>, <code>${deviceType}</code>,
8
+ <code>${channel}</code>, <code>${channelName}</code>, <code>${channelType}</code>, <code>${channelIndex}</code>,
9
+ <code>${datapoint}</code>, <code>${datapointName}</code>. Every node that emits messages has the same template;
10
+ enter e.g. <code>hm/${Interface}/${channel}/${datapoint}</code> everywhere for one topic scheme.</li>
11
+ <li><b>Interface</b>: The interface the device is connected through.</li>
12
+ <li><b>Channel</b>: The channel whose datapoint is used - its serial number and channel index. Autocomplete finds it by its name.</li>
13
+ <li><b>Datapoint</b>: The channel's datapoint, with autocomplete as well. What a datapoint means, its range and unit:
14
+ the <a href="https://www.eq-3.de/Downloads/eq3/download%20bereich/hm_web_ui_doku/HmIP_Device_Documentation.pdf" target="_blank">eQ-3 HmIP device documentation (PDF)</a>.</li>
15
+ <li><b>ON_TIME</b>: Seconds after which a switch or dimmer is switched off again once switched on:
16
+ <ul>
17
+ <li><code>undefined</code> no automatic switch-off</li>
18
+ <li><code>number</code> a fixed delay in seconds</li>
19
+ <li><code>global</code>, <code>flow</code> the delay in seconds comes from a context variable</li>
20
+ <li><code>msg</code> the delay in seconds comes from a message property</li>
21
+ </ul>
22
+ </li>
23
+ <li><b>set Mode</b>: For devices that support both the BURST and the WAKEUP rx_mode, such as battery switch actuators or smoke detectors with a siren: whether the value goes out through BURST or WAKEUP.
24
+ <ul>
25
+ <li><b>WAKEUP</b> - sends the value once the receiver reports to the CCU.</li>
26
+ <li><b>BURST</b> - wakes every BURST receiver up for the transmission, which costs duty cycle and the battery life of all burst receivers.</li>
27
+ </ul>
28
+ </li>
29
+ <li><b>Flags</b>:
30
+ <ul>
31
+ <li><b>Only changed values</b> - an event is emitted only when the value differs from the last event's.</li>
32
+ <li><b>No values while WORKING</b> - dimmers and blinds report their state continuously during a ramp (a blind moving, a lamp dimming). This option emits the end state only; useful with dashboard nodes to keep sliders from jumping.</li>
33
+ <li><b>Emit the last known value at start</b> - when Node-RED starts, the last value (as far as known) is emitted, e.g. to hand a dashboard a correct value at start. <b>Note:</b> if the emitted message ends in a Homematic write further down the flow, every (full) deploy costs duty cycle.</li>
34
+ </ul>
35
+ </li>
36
+ </ul>
37
+
38
+ <h3>Input</h3>
39
+ <p><code>msg.payload</code> is the value written to the datapoint. Interface, channel and datapoint may come from the message: leave the fields empty and set them through the incoming <code>msg</code>.</p>
40
+ <b>Option 1</b>: as message properties:
41
+ <code>
42
+ <pre>{
43
+ "interface": "BidCos-RF",
44
+ "channel": "OEQ1868878:1",
45
+ "datapoint": "STATE",
46
+ "payload": true
47
+ }</pre>
48
+ </code>
49
+ <b>Option 2</b>: through <code>msg.topic</code>, interface, channel and datapoint separated by dots:
50
+ <code>
51
+ <pre>{
52
+ "topic": "BidCos-RF.OEQ1868878:1.STATE",
53
+ "payload": true
54
+ }</pre>
55
+ </code>
56
+ Or in the shape the nodes emit their topics in - with slashes, the last three segments count
57
+ (<code>ccu3/BidCos-RF/OEQ1868878:1/STATE</code>, <code>hm/BidCos-RF/OEQ1868878:1/STATE</code> and
58
+ <code>BidCos-RF/OEQ1868878:1/STATE</code> address the same datapoint), so an event's topic can be fed straight back.
59
+
60
+ <h3>Output</h3>
61
+ <p>The value node emits events only when interface, channel and datapoint are set. The message is the one described for the rpc-event node.</p>
62
+
63
+ <h3>Dynamic configuration</h3>
64
+ <p><code>msg.config</code> is an object whose properties override this node's configuration for that one message. The stored configuration is never modified.</p>
65
+ <ul>
66
+ <li><code>iface</code></li>
67
+ <li><code>channel</code></li>
68
+ <li><code>datapoint</code></li>
69
+ <li><code>force</code></li>
70
+ </ul>
71
+ <p>A message without a <code>payload</code> writes nothing but retargets the node's output side.</p>
72
+ <h3>Party and holiday mode (HmIP)</h3>
73
+ <p>An HmIP thermostat (eTRV, WTH) takes <code>PARTY_TIME_START</code>, <code>PARTY_TIME_END</code> and
74
+ <code>PARTY_SET_POINT_TEMPERATURE</code> only together; written alone, one resets the other two. A write to one of the
75
+ three therefore goes out as one <code>putParamset</code> with all three - the other two from our own last write, the
76
+ value cache or a read from the device. The times may be the device's own <code>YYYY_MM_DD HH:MM</code> string, a
77
+ JavaScript Date, an ISO string or epoch milliseconds; they are formatted for the device in local time. The older HM
78
+ thermostats (<code>PARTY_MODE_SUBMIT</code>) are not covered.</p>
79
+ <h3>Queue and force</h3>
80
+ <p>With <i>Queue</i> the writes go out one after another, and a value the cache already knows from another source is not sent again. A value this node itself wrote last is always sent: a blind moved by hand does not report a new set point on its control channel. <i>Force</i> (also <code>msg.config.force</code>) always sends.</p>
81
+ </script>
@@ -9,6 +9,7 @@
9
9
  "cache": "Emit cached value on start",
10
10
  "working": "Don't emit values while actuator is in WORKING state",
11
11
  "queue": "Queue Commands",
12
+ "force": "Force (ignore the value cache)",
12
13
  "certainOnly": "Discard uncertain values"
13
14
  }
14
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "node-red-contrib-ccu",
3
- "version": "4.4.4",
3
+ "version": "4.5.0",
4
4
  "license": "MIT",
5
5
  "main": "none",
6
6
  "keywords": [