hi, i recently started using nodered to automate the transitions from different harmony scenes when turning on different inputs for my tv ( ex if i ask alexa to turn off the pc it runs a mqtt command to send a shutdown to the machine and launches the scene to switch input to the fire tv and turn on some bias lights behind the tv) and it all works fine except that after a couple of days it usually stops responding. when this happens nodered is still running but i get no response from the routines i set up and it only starts working again if i redeploy the flows, which brings us to the question , how can i make nodered auto redeploy the flows at a scheduled time? i tried setting up a flow to restart nodered but i am running on a qnap nas and i only managed to get nodered running in a docker container and i cant get it to restart. if anyone has a suggestion i wold really appreciate it
Before doing that -which I guess will work - how about you check if Node-Red is still alive?
debug node on an input from alexa and deploy.
Get alexa to send a command and see if you get an output in the
By the way: What do you mean by:
... only starts working again if I redeply the flows, which ......
A better question to find the answer to it might be work out what is going wrong. I have node red installations that run for months at a time with no problems, and have no reason to believe that they would not run for years if I left them to it.
Start by describing exactly what happens when it stops. Is the node red editor still active? If so are there any errors in the debug window.
Also, in a terminal, run
node-red-log when it has failed and see what it says.
Also if the editor is still active then add some debug nodes at critical points in the flow and then when it fails look in the debug panel and see if you can work out which node or nodes are not working correctly.
what happens is every couple of days i come back home from work and i launch a routine ( like the one to turn on the tv as described in the first post) and it just does the stuff that are natively supported by alexa ( like turn on the smart plug for the tv) and all the rest thas should trigger ( the harmony switching scene) does not work . at this point if i log in to the nodered editor it is online and in the top right corner it says deployed if i then press the little arrow button, press the redeploy button and then relaunch the alexa routine then the flow works as expected.
edit : i said redeploy but the button says restart flows
OK, so something in the flow is not responding, and if you restart then it recovers, so the next thing to do is as I suggested in my previous post.
When it fails, in a terminal, run
node-red-log and see what it says.
Immediately, though, add some debug nodes at critical points in the flow and then when it fails look in the debug panel and see if you can work out which node or nodes are not working correctly. Once you tie it down to a particular node it should be clearer what is going on. Give the debug nodes names so it is easier to see what the debug output means.
Also it would also be interesting to know, if you make a minor change such as adding a debug node and then do a 'modified nodes only' deploy whether that kicks it into life. If it doesn't then that makes the diagnosis easier as you can add debug nodes into the flow till you find the first node that is not responding.
so this morning i had the issue again and i went to check on nodered and the debug nodes i just didnt recieve signals from the alexa devices, so i went on the alexa app and all the nodered devices were loading and after a couple minutes they started working again. so i guess the issue is node-red-contrib-amazon-echo. also i could not get the node red log sice i have it running on a docker container on qnap container app and running node-red-log i get an error
I don't know how to get the log in that case but I suspect searching the forum may help.
It might be worth starting a new thread with something like amazon echo lockup in the title, then someone who has experience of that node may be see it and be able to help.
This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.