turbokongen / hass-AMS

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

Uncaught exception - IndexError: list index out of range #29

Closed maxgyver87 closed 4 years ago

maxgyver87 commented 4 years ago

First of thank you so much for your work on this integration.

I am for the past couple of weeks trying to get this to work but I am out of options now and hope you can point me to what I am doing wrong.

I have a Aidon 6515 Installed. Got the MBUS module you are using. HAN-port is open.

Log can be found here: AMS_error_1.txt

Setup with meter_manufacturer: 'auto' reports [custom_components.ams] No parser detected Setup with meter_manufacturer: 'auto' and parity: 'N' reports Invalid header CRC check - Uncaught exception - IndexError: list index out of range

Same result with other parity options except it doesn't report the Invalid header CRC check.

Please let me know if I can do anything else to get this sorted out.

turbokongen commented 4 years ago

I will have a look at it later today. On mobile now. Most probably it's a matter of adjusting the code according to your meter. It was made with only one meter type tested.

turbokongen commented 4 years ago

Please try the https://github.com/turbokongen/hass-AMS/tree/aidon_listtype_fix branch and see if that fixes the error for you. The autodetect I will have to adress separately. EDIT: Autodetect is also fixed in that branch now.

maxgyver87 commented 4 years ago

You sir are a hero :D Both Aidon and auto seem to work now.

~~The active and reactive_energy entities are not being populated as seen here.

Screenshot 2020-07-12 at 23 36 00

but so far it looks promising.~~

I included a minute of both meter_manufacturer: 'aidon' and 'auto' here. 1min_working_ams_log.txt

If you happen to have a link somewhere or vipps, id be happy to buy you a coffee or øl.

edit: active and reactive_energy entities are reporting the right value now.

Screenshot 2020-07-13 at 01 03 29
turbokongen commented 4 years ago

Yes, the energy sensor gets populated at the hour the first time. Good to see it's working 👌🏻Enjoy!

turbokongen commented 4 years ago

Fixed by #30