toreamun / amshan-homeassistant

Home Assistant integrasjon for strømmålere (AMS/HAN/P1). Integrasjonen støter både streaming (serieport/TCP-IP) og MQTT (Tibber Pulse, energyintelligence.se etc)
MIT License
150 stars 10 forks source link

Timeout when trying to read from Kamstrup via MQTT (amsleser, k-pow) #34

Closed fribse closed 2 years ago

fribse commented 2 years ago

Version of the custom_component

2022.4.0

Configuration

The MQTT data looks like this {"id":"xx","name":"amsleser","up":7059,"t":1650649460,"vcc":3.309,"rssi":-75,"temp":-127.00,"data":{"lv":"","id":"","type":"","P":1091,"Q":0,"PO":0,"QO":423,"I1":0.37,"I2":3.97,"I3":1.32,"U1":230.00,"U2":233.00,"U3":234.00,"PF":0.93,"PF1":0.83,"PF2":0.92,"PF3":0.97,"tPI":27086.02,"tPO":0.00,"tQI":20.90,"tQO":9414.54,"rtc":1650649460}}

Describe the bug

I have a K-Pow module with AMSLeser 2.1 on it, it delivers JSON data to MQTT. When I try to use the amshan integration, I get a mesage that says timeout:

billede

Is it not compatible?

Debug log

No logs
toreamun commented 2 years ago

The integration is compatible when Amsleser is configured to publish the data from the meter unparsed. I think the option in Amsleser is called "Raw data (bytes)".

fribse commented 2 years ago

Hi @toreamun Thankyou for getting back to me. The ams2mqtt has four different ways of posting to MQTT. JSON Raw (minimal) Raw (Full) Domoticz I've tried both Raw (minimal) and Raw (Full) but it still just times out.

The raw minimal format as read by MQTT-Explorer: billede The raw full format: billede

I don't see anything in the log regarding this integration...

fribse commented 2 years ago

Problem solved, upgraded amstomqtt to 2.1.2, it has a home assistant format, and is now auto discovered in HA.