My settings.js is like this:
I save context variables to file with:
- 17 change nodes
- 7 function nodes e.g.
flow.set("ct_mon_G", time1, "file");
I load context variables from file to:
- 17 dashboard nodes with 17 injection nodes
- 14 function nodes e.g.
flow.get("mon_time_G", "file");
- crontab pro node
And I use one "node-red-contrib-moment" node to show the current time on the dashboard.
I see in the context directory that this node also creates every minute a tmp file
I can't post the flow because of to much characters , but here is a link:
The google home alarm clock flows are made for 2 mobile android phones. When I save a shortcut of this page in google chrome to the mobiles home screen, the dashboard always shows the first tab and automaticaly fills the nodes. But when I switch to the other tab, the nodes are not automatically filled.
So I created a flow, using the ui_control node, which triggeres the nodes again when switching to the other tab.
[{"id":"5ea0c06fa7709de5","type":"ui_ui_control","z":"e2b6b5f54a987f70","name":"","events":"all","x":100,"y":80,"wires":[["7d9c29f0419c67fe"]]},{"id":"7d9c29f0419c67fe","type":"switch","z":"e2b6b5f54a987f70","name":"","property":"name","propertyType":"msg","rules":[{"t":"eq","v":"Wekker Gerben","vt":"str"}],"checkall":"true","repair":false,"outputs":1,"x":250,"y":80,"wires":[["a7e09627253fb76a"]]},{"id":"a7e09627253fb76a","type":"change","z":"e2b6b5f54a987f70","name":"Refresh Browser","rules":[{"t":"set","p":"payload","pt":"msg","to":"{\"tab\":\"\"}","tot":"json"},{"t":"delete","p":"socketid","pt":"msg"}],"action":"","property":"","from":"","to":"","reg":false,"x":450,"y":80,"wires":[["de960b742c49b829"]]},{"id":"de960b742c49b829","type":"trigger","z":"e2b6b5f54a987f70","name":"","op1":"","op2":"","op1type":"pay","op2type":"nul","duration":"5","extend":true,"overrideDelay":false,"units":"s","reset":"","bytopic":"all","topic":"topic","outputs":1,"x":640,"y":80,"wires":[["12d1e9659b28dc8c"]]},{"id":"12d1e9659b28dc8c","type":"ui_ui_control","z":"e2b6b5f54a987f70","name":"","events":"all","x":800,"y":80,"wires":[[]]}]