RPi Home Automation Software

Hello I’m new on the Community. A friend of mine gave me a not used “EMONPI” (the aluminum chassis with display, shield and stuffs) I added a RPI, a power sensor and I’m playing with it.

I’m a Domoticz user, I use it since years ago and I use it for whatever I can in my home automation and I’m trying to use Emonpi for energy meter.
At the moment I’m able to read voltage and power usage (I had to correct scale in emonhub.conf) and it seems it’s ok,
I’m reading data with MQTT and I’m updating Domoticz via curl/json with a crontab script.

It works, but it’s a workaround: reading via MQTT takes seconds, crontab script is not realtime, so I’d like to write these data directly in my Domoticz (using MQTT or json).
I think the way is reading /dev/ttyAMA but… I was not able to understand HOW the data are calculated… I tried to understand the output but… no way, looking for info I just became more confused… is there anyone can give me some suggestion? I’d like to understand protocol to write code directly reading ttyAMA output and not reading it via MQTT.
What I get with (for example minicom) is:
OK 5 145 0 0 0 145 0 193 85 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 (-0)

my “scale” is:
scales = 1.3,1,1.3,0.01,0.1,0.1,0.1,0.1,0.1,0.1,1

but I’m stuck…

thanks a lot for any support, Leo

1 Like