Comments (5)
Fixed in #91 v1.9.8 Thank you for reporting
from hass-ams.
Can you enable debug, and attach the log. I may have an Idea of what is wrong, but I need the logs to confirm. 👍
from hass-ams.
Attached log, from boot to having seen the issue at least once
from hass-ams.
I printed the parsed states as well, and it seems to happen when a larger chunk of data is read:
2022-11-07 09:44:38.838 DEBUG (Thread-3 (connect)) [custom_components.ams] data read from port=[126, 160, 39, 1, 2, 1, 16, 90, 135, 230, 231, 0, 15, 64, 0, 0, 0, 9, 12, 7, 230, 11, 7, 1, 9, 44, 38, 255, 128, 0, 0, 2, 1, 6, 0, 0, 2, 37, 242, 181, 126]
2022-11-07 09:44:38.839 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_import (state: 549)
2022-11-07 09:44:38.839 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_export (state: 0.0)
2022-11-07 09:44:38.840 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_import (state: 0)
2022-11-07 09:44:38.840 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_export (state: 81)
2022-11-07 09:44:38.840 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l1 (state: 0.787)
2022-11-07 09:44:38.840 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l2 (state: 1.874)
2022-11-07 09:44:38.841 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l3 (state: 2.108)
2022-11-07 09:44:38.841 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l1 (state: 231.7)
2022-11-07 09:44:38.841 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l2 (state: 0.0)
2022-11-07 09:44:38.841 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l3 (state: 234.8)
2022-11-07 09:44:41.291 DEBUG (Thread-3 (connect)) [custom_components.ams] data read from port=[126, 160, 121, 1, 2, 1, 16, 128, 147, 230, 231, 0, 15, 64, 0, 0, 0, 9, 12, 7, 230, 11, 7, 1, 9, 44, 40, 255, 128, 0, 0, 2, 13, 9, 7, 75, 70, 77, 95, 48, 48, 49, 9, 16, 54, 57, 55, 48, 54, 51, 49, 52, 48, 52, 49, 50, 57, 57, 53, 52, 9, 8, 77, 65, 51, 48, 52, 72, 51, 69, 6, 0, 0, 2, 34, 6, 0, 0, 0, 0, 6, 0, 0, 0, 0, 6, 0, 0, 0, 81, 6, 0, 0, 3, 13, 6, 0, 0, 7, 37, 6, 0, 0, 8, 14, 6, 0, 0, 9, 16, 6, 0, 0, 0, 0, 6, 0, 0, 9, 44, 111, 222, 126]
2022-11-07 09:44:41.291 DEBUG (Thread-3 (connect)) [custom_components.ams.parsers.kaifa] kaifa meter_type length is 8
2022-11-07 09:44:41.292 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_import (state: 100663298)
2022-11-07 09:44:41.292 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_export (state: 0.0)
2022-11-07 09:44:41.293 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_import (state: 0)
2022-11-07 09:44:41.293 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_export (state: 81)
2022-11-07 09:44:41.294 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l1 (state: 0.781)
2022-11-07 09:44:41.294 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l2 (state: 1.829)
2022-11-07 09:44:41.295 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l3 (state: 2.062)
2022-11-07 09:44:41.295 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l1 (state: 232.0)
2022-11-07 09:44:41.296 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l2 (state: 0.0)
2022-11-07 09:44:41.296 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l3 (state: 234.8)
2022-11-07 09:44:42.899 DEBUG (Thread-3 (connect)) [custom_components.ams] data read from port=[126, 160, 39, 1, 2, 1, 16, 90, 135, 230, 231, 0, 15, 64, 0, 0, 0, 9, 12, 7, 230, 11, 7, 1, 9, 44, 42, 255, 128, 0, 0, 2, 1, 6, 0, 0, 2, 48, 68, 253, 126]
2022-11-07 09:44:42.900 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_import (state: 560)
2022-11-07 09:44:42.901 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_active_power_export (state: 0.0)
2022-11-07 09:44:42.901 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_import (state: 0)
2022-11-07 09:44:42.901 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_reactive_power_export (state: 81)
2022-11-07 09:44:42.901 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l1 (state: 0.781)
2022-11-07 09:44:42.902 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l2 (state: 1.829)
2022-11-07 09:44:42.902 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_current_l3 (state: 2.062)
2022-11-07 09:44:42.902 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l1 (state: 232.0)
2022-11-07 09:44:42.902 DEBUG (Thread-3 (connect)) [custom_components.ams.sensor] Updating sensor ams_voltage_l2 (state: 0.0)
from hass-ams.
hass-AMS/custom_components/ams/parsers/kaifa.py
Lines 92 to 112 in 1738118
Changing the call on line 100 to byte_decode(fields=pkt[71:75])
seems to give correct results on my setup. I wouldn't presume to know the history of these parsers well enough to say it's a solution, but perhaps you have an opinion @turbokongen.
If this is merely an index issue, I can create a PR with the change. If this change brakes something else, we'll have to go a bit deeper.
from hass-ams.
Related Issues (20)
- No parser detected HOT 6
- AMS integration broken after installing core-24.3.0 HOT 2
- AMS integration sensors still missing HOT 2
- Connection broken after 2024.5.x update HOT 3
- Hydrocal M3 integrations HOT 1
- Frame sync problem in code version 1.9 HOT 5
- Feature request: Use serial.serial_for_url() instead of serial.Serial() HOT 8
- [custom_components.ams] Timeout waiting for end of packet. Flush current packet HOT 3
- Kaifa MA105H2E confirmed working. HOT 10
- User input malformed: value must be one of [] for dictionary value @ data['serial_port'] HOT 1
- No read out for meter, and error in Home Assistant HOT 28
- negative current getting corrupt values HOT 4
- using decryption keys possible ? HOT 1
- After upgrading to 1.9.4 integration stopped working swedish Kaifa meter. HOT 3
- Kaifa MA304H4 is working, but with several incorrect redouts HOT 4
- See only 5 entities after installation using aidon_se, see zero entities when using aidon HOT 27
- Integration is using deprecated `DEVICE_CLASS_*` constants HOT 1
- MA304H4 Swedish version. State class conflict with the device class. HOT 1
- sensors not generated Homa Assistant 2024.3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from hass-ams.