I’m not yet skilled enough 'cause, as I said, I’m new on MQTT… I saw topics are very different so I’d have to see where to configure this. It’s all a work in progress, I never used Emonpi before so I’m trying to understand how it works… before it I was using a OWL CM119 with a 433MHz transceiver, for me getting Watt is enough, (voltage is an optional )
ok I’m following your suggestion, it seems to be the right way but I have to better understand how to fix… I added the MQTT2 section and, reading on Domoticz the topic sent I can read passed values, infact it receives:
(the topic in Domoticz is "domoticz/in/)
$IDX is the ID of the connected device I want to update, and $VALUE is obviously the value
I think I have to write some code to convert info I get… there is in Domoticz a plugin for Shelly MQTT that uses its syntax, I think I’ll have to do something similar, changing the topic with (for example) emonhub and working on data with this topic…
infact here in Italy we call it “a bath of blood”
for this my first idea was reading directly from the ttyAMA0 device and use these value to update Domoticz… at the end, thinking about it, should be the same as how it works right now:
on crontab on Domoticz I put this:
With Python, the script could just sit and wait for the single JSON message. When a new one is published, get it with an on_message trigger, parse it (easy enough to convert string to an object), and publish the new values.
With cron you don’t know if a new message has actually arrived (10s gap is not absolute and can fluctuate).
Other way, being able, I could set another port on the section MQTT2 (for domoticz) and, on domoticz raspberry use python (or something else) to open a socket, get data from the Emonhub MQTT, parse it and send to the domoticz MQTT standard port…
this could get and forward data quickly