Context to file creating temp files

Hi,

I have created a flow which has 24 context variables saved to file.
When I browse to the context directory of that flow (Raspberry Pi with Raspbian Buster), I notice that every minute a tmp file is created.

/home/pi/.node-red/context/8b2862b307a292bb

What is causing that?

I have injectors in the flow that restore the context values to the dash board objects after restart node-red or reset the raspberry, but repeat is set to "none" the only inject once after 0.1s

How are you saving the context variables to file? Using a file node? Using a contrib node? Using file backed store set in settings.js?

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":[[]]}]

I figured it out, it was a domoticz mqtt node causing a loop trying to sync the dashboard ON/OFF button with a switch in Domoticz. I used it to turn off the ON/OFF switch with google home voice

1 Like

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.