Skip to content

DSF Event

Minty Trebor edited this page Mar 9, 2022 · 5 revisions

DSF-Event

The DSF-Event node watches for changes to a user specified object in the Machine 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.

Input

The node requires the msg.payload.patchModel in the incoming msg to the "Model In" input.

Output

The node will pass through the original incoming msg object to the "Event Out" output when triggered, with the following additional objects:

  • msg.dsf.eventValue = the value of the matched object.
  • msg.dsf.lastEventValue = the value of the last matching event.

Configuration

Model Path : Enter the JSON path of the Machine Model object to watch for. This is typically in the format object.object.object, for example heat.heaters[0].current or heat.heaters.0.current refers to the current Bed Temp, and state.status refers to the current machine state.

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.