How to change stop and start time in Time input widget using Node-Red

Hi, I need help with the Time input widget. I want to change the start and stop time using node-red, but I don’t know what the data format should look like. Please help me.

Here’s my test thread, which can only clear the current time, but that’s not what I need:

image

image

[{"id":"8c670e240c47aabb","type":"function","z":"ab90fb61010dee7a","name":"func","func":"let arr = [\"21600\", \"43200\", \"Europe/Kiev\", \"\", \"10800\"];\n\nmsg.arrayOfValues = arr;\n\nreturn msg;","outputs":1,"timeout":0,"noerr":0,"initialize":"","finalize":"","libs":[],"x":530,"y":820,"wires":[["f9d807422bb6660f","e878c22af2ce3ed6"]]},{"id":"a2be366c28640d66","type":"inject","z":"ab90fb61010dee7a","name":"","props":[{"p":"payload"}],"repeat":"","crontab":"","once":false,"onceDelay":0.1,"topic":"","payload":"","payloadType":"date","x":360,"y":820,"wires":[["8c670e240c47aabb"]]},{"id":"f9d807422bb6660f","type":"blynk-iot-out-write","z":"ab90fb61010dee7a","name":"","pin":"39","pinmode":0,"client":"86deb1cc846a319e","x":720,"y":820,"wires":[]},{"id":"e878c22af2ce3ed6","type":"debug","z":"ab90fb61010dee7a","name":"debug 372","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"true","targetType":"full","statusVal":"","statusType":"auto","x":710,"y":760,"wires":[]},{"id":"86deb1cc846a319e","type":"blynk-iot-client","name":"","path":"blynk.cloud","key":"-Ca80Bvu3eMfeTwR-0Y_zCh-NFVRIhY8","tmpl":"TMPL4xRymDlb6","dbg_all":false,"dbg_log":false,"dbg_prop":false,"dbg_sync":false,"dbg_low":false,"dbg_pins":"","multi_cmd":false,"enabled":true}]

Here is the current configuration of the Time input widget:

The only way that I know of when using the Blynk IoT contrib is to do the update via an API call…

These are the nodes from left to right…

image

image

image

This is the URL text:
https://lon1.blynk.cloud/external/api/update?token={{{token}}}&{{{pin}}}={{{value0}}}&{{{pin}}}={{{value1}}}&{{{pin}}}={{{value2}}}&{{{pin}}}={{{value3}}}&{{{pin}}}={{{value04}}}

You will need to change the server name if you’re using a different region.

Pete.

1 Like