Community
OpenEnergyMonitor

OpenEnergyMonitor Community

How a device can publish data using MQTT only?

Tags: #<Tag:0x00007fc9ca3613e8> #<Tag:0x00007fc9ca3612d0> #<Tag:0x00007fc9ca361168>

I recently migrated my emoncms server and put all on a docker instance, all is working fine. Now I have a device (tasmota) where I integrated French Teleinfo decoding into. This is working fine also.
Now Tasmota can publish data using MQTT (and not HTTP) and here is my question. How can I do that? I already have MQTT broker on my server working for other process so this part is no problem.

Reading doc, I think I need to use emonhub but it’s not on the docker image. Anyway I could add in somewhere on my server, but looks like emonhub listen to serial to send back data to emoncms.

I’m a little bit disapointed because I thought that what I need would be easy and the emonhub would have it as basic configuration. I think I may have missed something not succeeding doing so basic stuff.

Thanks for any help

Self answering, need to run emoncms_mqtt

for now dirty hack but it works :slight_smile:

docker exec -it emoncms_web_1 php /var/www/emoncms/scripts/services/emoncms_mqtt/emoncms_mqtt.php &

now need to investigate how to link the input to the correct user, with HTTP it was with API key, not sure how to handle that with MQTT

I think the API key is the same for all users - it is an instance API key.

Interesting, I saw multi users


but rather more complicated on server side than using user api key in topic :slight_smile: