turbokongen / hass-AMS

Custom component reading AMS through MBus adapter into HomeAssistant
42 stars 10 forks source link

Alternative methods of reading data #66

Open yurgh opened 2 years ago

yurgh commented 2 years ago

Not an issue, but a suggestion:

I've modified my Tibber Pulse to send data to my MQTT-server (explained here: https://github.com/iotux/ElWiz#oppsett-av-pulse ). Unfortunately that project doesn't support my Kamstrup Omnipower 1 Phase Direct meter. However; with my limited Python skills I've been unable to modify hass-AMS to use the binary data from the MQTT server instead of reading from serial.

So; any plans on adding alternative input methods your component? I vote for MQTT-support, but could be anything that delivers binary data! :-)

sandos commented 2 years ago

This method should work for this?

https://www.zigbee2mqtt.io/advanced/remote-adapter/connect_to_a_remote_adapter.html#_1-install-ser2net

Hmm, ok, it does look like zigbee2mqtt has some specific support for a tcp-protocol for the serial port, so likely some work to get it to work.

Hellowlol commented 2 years ago

Tried using https://github.com/toreamun/amshan-homeassistant ?

I fixed this by using a rpi that reads the serial (it has been running since ha 0.7 or so) and statestream to get the info to my real ha install

yurgh commented 2 years ago

Thanks for suggestions!

I was able to hack the parser to match what my meter is sending. The meter suddenly changed the format, thus all my sensors just reported bogus values. Seems to have started sending more bytes, because the offset for some of the values was changed by four. I guess thats what you get for hardcoding offsets instead of looking for the OBIS-codes and their corresponding data... :P