Skip to content

Use dashboard input to alter scheduled time. #79

Answered by jensrossbach
deek042 asked this question in Q&A
Discussion options

You must be logged in to vote

Hi @deek042, there are several possibilities. One way that I went already in the past was to setup a text input widget configured as time picker in a Node-RED dashboard. The output of such widget is the time in milliseconds since midnight. This time can be written to a context variable in the following JSON format:

{
    "type":   "time",
    "value":  time_value_from_widget,
    "offset": 0,
    "random": false
}

Then you can configure the scheduler node to use that context variable as trigger for an event and it will fire as soon as the time has been reached. You can additionally use a switch widget on the dashboard to turn the scheduler node on or off (by sending a message with payload…

Replies: 2 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
2 replies
@jensrossbach
Comment options

@deek042
Comment options

Answer selected by jensrossbach
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants