time span - rdmtc/node-red-contrib-sun-position GitHub Wiki

A enhanced node for time span calculation and time span comparison.

time-span-example

tbd

time-span - Node settings

A simple node that routes messages depending on the time. If the current time falls within the range specified in the node configuration, the message is routed to output 1. Otherwise the message is routed to output 2.

time-span-settings

  • Position connects to the central configuration node, which contains the current position, but also handles internal shared functions
  • Input 1 defines the first input parameter for the time span calculation
    • parse format defines the format for the first input parameter, more information see input parse formats.
    • Offset allows to define a positive or negative offset to the given Input 1 Time.
  • Input 2 defines the second input parameter for the time span calculation
    • parse format defines the format for the second input parameter, more information see input parse formats.
    • Offset allows to define a positive or negative offset to the given Input 2 Time.
  • compare with here can be defined various time spams to which the time span between timestamp of input 1 and input 2 should be compared.
    • operator Drop down to define operator for comparison
    • time defines a number to which should be the timespan be compared
    • time type the unit of the given time
  • result ** as result of an incoming message, data could be written to that destination. This could be a message property, a flow or a global context.
    • result value defines the value which should be written to the result destination. Could be the timestamp, one of the Input times or any other time/data. For timestamp or times the output format or maybe an offset could be defined.

Without defining any comparison, the node allows by only defining inputs and result a simply timespan calculation.