chamberlain2007 / aprilaire-ha

A custom component for Home Assistant to interact with Aprilaire thermostats.
MIT License
12 stars 5 forks source link

themostats unavailable after HA restart #42

Closed jonoberheide closed 7 months ago

jonoberheide commented 9 months ago

Just recently set up Aprilaire 8000 series with HA and the aprilaire-ha integration. I've found that I lose the thermostats and their associated entities each time HA is restarted (eg. during a HA version update).

The workaround is to remove them from HA and re-add them, which is do-able, but painful.

Here are the logs:

2024-01-05 13:17:51.875 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:51.945 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:51.976 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.084 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.130 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.313 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.332 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.360 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.382 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:52.946 ERROR (MainThread) [custom_components.aprilaire.coordinator] Received NACK for attribute 7
2024-01-05 13:17:53.958 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:53.958 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:53.958 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:53.958 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:53.958 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:53.991 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:53.991 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:53.991 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:53.992 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:53.992 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.100 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.100 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.100 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.101 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.101 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.142 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.142 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.142 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.142 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.142 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.323 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.323 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.324 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.324 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.324 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.341 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.341 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.341 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.341 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.341 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.391 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.391 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.391 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.392 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.392 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.446 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.446 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.446 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.446 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.446 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status
2024-01-05 13:17:54.956 ERROR (MainThread) [homeassistant.components.binary_sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_fan_status already exists - ignoring binary_sensor.3rd_guest_bedroom_thermostat_fan_status
2024-01-05 13:17:54.957 ERROR (MainThread) [homeassistant.components.climate] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_thermostat already exists - ignoring climate.3rd_guest_bedroom_thermostat_thermostat
2024-01-05 13:17:54.957 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_humidity_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_humidity_controlling_sensor
2024-01-05 13:17:54.957 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_indoor_temperature_controlling_sensor already exists - ignoring sensor.3rd_guest_bedroom_thermostat_indoor_temperature_controlling_sensor
2024-01-05 13:17:54.957 ERROR (MainThread) [homeassistant.components.sensor] Platform aprilaire does not generate unique IDs. ID b4_82_55_51_95_e0_humidification_status already exists - ignoring sensor.3rd_guest_bedroom_thermostat_humidification_status

Let me know if I can help debug in any way!

chamberlain2007 commented 8 months ago

Do you happen to have multiple thermostats added, or have you added the same thermostat multiple times?

jonoberheide commented 8 months ago

10x 8840 thermostats total. The issue is fairly reproducible, as in, every time I restart HA I need to delete and then re-add all 10 devices.

chamberlain2007 commented 8 months ago

Ok interesting. Well glad to hear it at least in theory works with that many devices! I only have one device so it's a little hard for me to test.

Could you go into the Device in HA and check the MAC address that is listed and see if any of them have the same MAC address? Obviously they shouldn't, but I wouldn't put it past Aprilaire!

jonoberheide commented 8 months ago

Ha, I did check that previously, just in case, given the error message. But no, no colliding MACs. I've since enabled the debug logging, so I could capture the full debug logs if you think that would be useful

jonoberheide commented 8 months ago

Also, note that the MAC address-derived identifier in the log (ending in :e0) is indeed the MAC of the "3rd_guest_bedroom" thermostat. However, all of them fail to recover after a restart, not just this specific one.

chamberlain2007 commented 8 months ago

Interesting, thanks for that info. It's very possible that it's something on the integration side, most likely in the unique ID generation. I am working on getting things merged into the main HA repo (eventually!) and part of the work there is around identifiers. I am going to be working on getting some more of those changes over here in the meantime so that might resolve the issue. Otherwise I'll do some testing.

jonoberheide commented 8 months ago

Thanks!

jonoberheide commented 8 months ago

I saw the thread on upstreaming the integration and the MAC/identifier generation. Thanks for your effort on that front! Is there a way to try out that dev branch via HACS to see if that resolves the issue?

nberardi commented 7 months ago

I have been having this same issue with my two thermostats. Posting here so that I can follow for updates.

jonoberheide commented 7 months ago

@nberardi On the plus side, it looks like the Aprilaire integration is super close to being merged upstream: https://github.com/home-assistant/core/pull/95093

chamberlain2007 commented 7 months ago

That's the goal, but it's been very difficult getting it over the edge. I'm not sure what more I can do to try to push them to release it.

jonoberheide commented 7 months ago

Congrats on getting it merged!

jonoberheide commented 7 months ago

With 2024.3.0 and the official integration, this issue appears to be resolved. Closing!