I have been continuing to try to get this work. I have made a bit of progress, but still not there yet.
issue 1:
the docker or my ubuntu server was missing some of the mosquitto components. These have now been installed and I can now see in a command line the messages. When I use this line inside the docker I get a response.
mosquitto_sub -d -v -h 192.168.0.4 -t ‘emon/emonesp/#’
issue 2:
You cannot set an anonymous userid/password via the container environment variables. I have eddited teh settings.ini file, and now I can start up the emoncms.
issue 3:
I tried to get my emontx3 to connect to the emon container via the http API. I then redirected it back to the emoncms.org service.
As I had left this device in the inout tab it would popup an error message. I think I need to remove the emontx3 device, then it should be able to pick up the same device via MQTT.
Having said that… it still does not work.
I have got my emontx3 setup as below. It sends messages like this. How should I configure the MQTT service and bas-topic?
[mqtt]
enabled = true
host = 192.168.0.4
user =
password =
basetopic = emon/emonesp/#
Subscribed (mid: 1): 0
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/MSG', ... (6 bytes))
emon/emonesp/MSG 354426
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/Vrms', ... (6 bytes))
emon/emonesp/Vrms 252.94
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/P1', ... (2 bytes))
emon/emonesp/P1 18
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/P2', ... (3 bytes))
emon/emonesp/P2 695
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/P3', ... (4 bytes))
emon/emonesp/P3 1743
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/P4', ... (3 bytes))
emon/emonesp/P4 997
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/E1', ... (5 bytes))
emon/emonesp/E1 77299
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/E2', ... (6 bytes))
emon/emonesp/E2 986033
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/E3', ... (7 bytes))
emon/emonesp/E3 2364868
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/E4', ... (7 bytes))
emon/emonesp/E4 1252132
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/pulse', ... (7 bytes))
emon/emonesp/pulse 2295202
Client mosqsub|34-e70260db6728 received PUBLISH (d0, q0, r0, m0, 'emon/emonesp/freeram', ... (5 bytes))
emon/emonesp/freeram 22480