Forced initialisation

Was wondering how to automatically force an initialisation of a flow after deployment. My flow won't function correctly until I enter information by moving a slider in the dashboard which then sends data to a function node which then uses this data to produce an output.


You can use an Inject node set to fire on startup to inject an appropriate initial value into the flow.

As Colin says, this indicates that you are not initialising your value. You should, in general, never make an assumption about the front-end (Dashboard in your case). You should always initialise all values to something sensible and/or to whatever value was last provided. That last part might need you to save the data to a flow/global variable that you read on startup or alternatively, you could use an MQTT topic with the retained flag and a suitable subscription.

Thanks for the advice chaps. Will look into the suggested options.