-
Notifications
You must be signed in to change notification settings - Fork 1
moonNode Event
The moonNode-Event node watches for changes to a user specified object in the Model. In addition, the node can control the frequency of updates by specifying the minimum time period (in seconds) between changes, and the amount the object's value has changed by (the delta). When a match is found and the conditions are met the node will send a msg to it's "Event Out" output.
The node requires the msg.payload.patchModel
in the incoming msg to the "Model In" input.
The node will pass through the original incoming msg object to the "Event Out" output when triggered, with the following additional objects:
-
msg.moonNode.eventValue
= the value of the matched object. -
msg.moonNode.lastEventValue
= the value of the last matching event.
Model Path : Enter the JSON path of the Model object to watch for. This is typically in the format object.object.object
, for example print_stats.filename
refers to the current file in use. If the path contains a space it should be formatted like this ["temperature_sensor chamber"].temperature
(example).
Interval (sec's) : The minimum amount of time between triggering matching events in seconds.
Change Delta : The amount the matched object's value must have changed by since the last event, before triggering the current event. For example entering a value of 5 would require the value to have changed by + or - 5 since the last event was triggered.