NodeRed publish to MQTT stops updating after closing NodeRed visual editor

I have created a NodeRed flow that publishes to a topic on the emonPi MQTT broker. This works fine as long as the NodeRed visual editor is open. When I close this down the updates stop. When I launch it again and hit deploy everything works again until the next time I close it down. Is there something other than Deploy that I need to do?

There’s not enough background information here for other members to help you.
You are not telling us anything about your system - hardware/OS/version/etc - etc.
What tests have you done to resolve this and the results?

Paul

My hardware is emonPI

My running software is as follows:

  • Node-RED version: v0.15.2
  • Node.js version: v0.10.29
  • mosquitto version 1.4.10
  • Linux 4.4.26-v7+ arm LE
  • Emoncms V9.7.7

To test I have “deployed” the node-red flow and saw the MQTT topics update as expected. When I close the node-red browser based visual editor the updates of the MQTT topics stops until I launch the editor again and “deploy” again. I haven’t been able to figure out the dependency

Can you SSH into your pi and stop node-red from running;
node-red-stop
then restart node-red;
node-red-start
You should now see the log being written in the console, so try opening and closing the node-red browser, and see what (if any) messages appear in the log.

You can also select the level of logging by changing the level in node-red’s settings.js file, and restarting node-red.

Paul

The root was something with the MQTT client I was using to subscribe to my topics and not node-red or MQTT broker on emonPi. When I used the mosquitto_sub client instead I was able to reliably subscribe to the messages from the topic. Thanks for the suggestions @Paul

1 Like