You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Now flow script have to use the shared KV store to share data such as entity metadata or measurement units
Signed-off-by: Didier Wenzek <[email protected]>
@@ -92,11 +88,6 @@ The `onMessage` function is called for each message to be transformed
92
88
- The config as read from the flow config or updated by the script
93
89
- The function is expected to return zero, one or many transformed messages `[{ topic:string, payload:string }]`
94
90
- An exception can be thrown if the input message cannot be transformed.
95
-
- If defined and associated in the step config with `meta_topics`, the `onConfigUpdate` function is called on each message received on these `meta_topics`.
96
-
- The arguments are:
97
-
- The message to be interpreted as a config update `{ topic:string, payload:string }`
98
-
- The current config
99
-
- The returned value (an arbitrary JSON value) is then used as the new config for the flow script.
100
91
- A flow script can also export a `onInterval` function
101
92
- This function is called at a regular pace with the current time and config.
102
93
- The flow script can then return zero, one or many transformed messages
@@ -112,18 +103,15 @@ The `onMessage` function is called for each message to be transformed
112
103
- A step is defined by a JavaScript file with an `.mjs` or `.js` extension.
113
104
- This can also be a TypeScript module with a `.ts` extension.
114
105
- The definition of flow defines its input, output and error sink as well as a list of transformation steps.
115
-
- Each step is built from a javascript and is possibly given a config (arbitrary json that will be passed to the script)
116
-
- Each step can also subscribe to a list of MQTT meta topics where the metadata about the actual data message is stored
117
-
(e.g, meta topic of a measurement type where its units threshold values are defined).
118
-
The messages received on these topics will be passed to the `onConfigUpdate` letting the script update its config.
106
+
- Each step is built from a javascript and is possibly given a config (arbitrary json that will be passed to the script)
0 commit comments