pyhomematic
pyhomematic copied to clipboard
HA 2021.7.0: IEC_ENERGY_COUNTER not found
Home Assistant version (if applicable): 2021.7.0
Home Assistant log output:
ERROR (SyncWorker_15) [pyhomematic.devicetypes.generic] HMDevice._getNodeData: IEC_ENERGY_COUNTER not found in {'GAS_ENERGY_COUNTER': [1], 'GAS_POWER': [1], 'ENERGY_COUNTER': [1], 'POWER': [1], 'IEC_ENERGY_COUNTER': [1, 2], 'IEC_POWER': [1, 2]},
ERROR (SyncWorker_11) [pyhomematic.devicetypes.generic] HMDevice._getNodeData: IEC_POWER not found in {'GAS_ENERGY_COUNTER': [1], 'GAS_POWER': [1], 'ENERGY_COUNTER': [1], 'POWER': [1], 'IEC_ENERGY_COUNTER': [1, 2], 'IEC_POWER': [1, 2]}
Describe the bug The error in the log appears every time I restart Home Assistant. This started with the update to 2021.7.0 (which includes the update of pyhomematic to 0.1.73). Although reporting this error, Home Assistant is able to read the power values from the sensor.
Additional context I use the HM-ES-TX-WM in combination with the Es-Fer sensor.
I think this is not a real issue. The HM-EX-TX-WM is able to output several values, depending on what actual sensor is connected to the unit. I used the ES-Fer sensor for a long time, and i had a similar error that HA could not read the gas counter value from the device, simply because it is not connected. Pyhomematic 0.1.73 introduced the two new channels mentioned in your snipped for the new smart meter sensor. Home Assistant does not know what sensor is connected to the TX-WM unit, so it queries every channel which the unit is theoretically able to support, and it only returns values for the sensor which is connected to the unit. The integration then complains that some queries do not return values, and thats it.
Last week I got my new Smart Meter and had to switch from the Es-Fer to the ES-IEC sensor. This made the message disappear.
But showing an ERROR message only because someone hasn't connected an IEC sensor should be fixed.
But showing an ERROR message only because someone hasn't connected an IEC sensor should be fixed.
This can't be fixed without adding startup delays and unnecessary RF-traffic. To know which sensor actually is attached, the library would have to ask the device. This takes time and also adds RF-traffic that raises the duty cycle. Hence we made the decision to just try once during startup, and if we don't get an answer for a specific parameter, we know it's not available.
We could lower the log-level to a warning. But then users wouldn't know about actual errors due to communication problems or similar that appear because of this query.
This shouldn't be an issue anymore once the HomeMatic integration is based on hahomematic, which caches the information needed to detect the attached sensor. But it will take an unknown amount of time until that will be released due to a lack of contributing developers.