EmonTx Node Red MQTT node 'disconnected'

Another problem.

This is an out of the box emonBase I am setting up (not the previous one), including the pre loaded SD card.

I fired it up, changed the root password, and went into node red to add an MQTT node I have used on my previous emonBase to subscribe to emon/# topic as I have done before. This time however, it is saying ‘disconnected’

In my log file, it is saying it is it is publishing:

2017-12-07 00:35:15,188 DEBUG MQTT Publishing: emon/powerNode-2-1/vrms 4.57

I had a dig around some log files and in mosquitto.log I found this:

pi@emonpi(ro):mosquitto$ sudo tail mosquitto.log

1512606261: Socket error on client , disconnecting.
1512606284: New connection from 127.0.0.1 on port 1883.
1512606284: New connection from 127.0.0.1 on port 1883.
1512606284: Socket error on client , disconnecting.
1512606284: Socket error on client , disconnecting.
1512606371: New connection from 127.0.0.1 on port 1883.
1512606371: New connection from 127.0.0.1 on port 1883.
1512606371: Socket error on client , disconnecting.
1512606371: Socket error on client , disconnecting.

emoncms.log

  2017-12-07 10:22:04.346|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:04.415|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' in /var/www/emoncms/scripts/phpmqtt_input.php:121

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(121): Mosquitto\Client->connect('localhost', 1883, 5)

#1 {main}

2017-12-07 10:22:04.416|WARN|phpmqtt_input.php|Not connected, retrying connection

2017-12-07 10:22:05.418|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:06.420|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:07.423|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:08.425|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.428|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.430|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.431|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.433|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.435|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.436|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.438|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

2017-12-07 10:22:09.440|ERROR|phpmqtt_input.php|exception 'Mosquitto\Exception' with message 'The client is not currently connected.' in /var/www/emoncms/scripts/phpmqtt_input.php:112

Stack trace:

#0 /var/www/emoncms/scripts/phpmqtt_input.php(112): Mosquitto\Client->loop()

#1 {main}

Any ideas?

all fixed thanks

Glad you sorted it. Are other users likely to hit the same issue? What was the fix? Please share if you think it might be useful to others.

Only to be aware when you export/import nodes, it for some reason does not bring over your security information for MQTT nodes (password/username).

My latest SD’s all came with node-red with no example nodes for some odd reason, so I had nothing to reference against in that workspace, but I flagged that on the phone earlier.

Once I put the password in security tab (the one in the config file NOT the node red one), it was alright.

I have the same problem.
Where do you have to put the password, exactly?

Do you mean EmonBase or EmonPi? They are different.

Node-red on a different machine?

You will need to explain the whole setup more fully I think.