I am having a struggle getting a Shelly device to send MQTT messages to my MQTT server, which is within my emonPi. Looking within the MQTT section in emonCMS on a browser, it says Version 1.4.10, Host localhost: 1883 (127.0.0.1)
Question: what does the 127.0.0.1 mean, as as far as I thought, the IP of the emonPi was 192.168.2.50, and the MQTT port was :1883.
I have checked on an emonTx MQTT dashboard, and that communicates fine to 192.168.2.50:1883.
If you are using the MQTT broker on the same device (i.e. emonhub using the broker on the same emonPi) you can use 127.0.0.1. This IP address always points to the local device.
If you want to access the broker from a different machine, use that machines IP Address. Port is the same but you must supply user/password as well as anonymous access is disabled.
There is no such thing as the emonTX does not have a webUI and does not communicate via MQTT.
I should have referred to the MQTT section within the espwifi UI.
I wonder whether the lack of anywhere to tick / untick anonymous access in the Shelly dashboard is the issue? (In the example below, I have tried QoS at 0, 1 & 2)
You can edit the MQTT config on the emonPi to enable anonymous access if necessary - I had to do that to support a bit of kit that didn’t provide for authentication details.