kongo09/philips-airpurifier-coap

AC2729/10 only sensors showing, no fan entity

Closed this issue · 9 comments

AC2729/10
von Philips
Firmware: AWS_Philips_AIR@73.1

Hello, I recently switched to this plugin for the philips AC AC2729/10. The sensors work fine but a fan entity is not detected.

System log shows this:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht

Logger: custom_components.philips_airpurifier_coap.fan
Source: custom_components/philips_airpurifier_coap/fan.py:45
Integration: Philips AirPurifier (with CoAP) (documentation, issues)
First occurred: 16:08:33 (2 occurrences)
Last logged: 16:12:25

Unsupported model: AC2729/10

Is there anything I can do to get the fan entity working?

Thanks in advance!

This is strange. I have that model myself and it is working. Is this on a fresh installation?

Can you go back to version v0.11.6 and check if that works? Maybe I broke something in the lastest update.

This integration is based on betaboon's work, so the core is not fundamentally different.

The device should work, as I said, I have it myself.

I did change some things in the lates release, so that might be the problem. If you can try the previous v0.11.6 one that would be helpful. Please remove all device related entities before you try the older version.

v0.11.6 is even worse, I cannot even set it up - error log shows

2023-03-22 19:44:59.891 WARNING (SyncWorker_1) [homeassistant.loader] We found a custom integration philips_airpurifier_coap which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-03-22 19:46:54.584 ERROR (MainThread) [homeassistant.config_entries] Error setting up entry AC2729 My Device for philips_airpurifier_coap
File "/config/custom_components/philips_airpurifier_coap/init.py", line 119, in async_setup_entry
File "/config/custom_components/philips_airpurifier_coap/philips.py", line 102, in async_first_refresh

v0.12.0 i can set it up, but still no fan entity is detected - error log shows this
Logger: custom_components.philips_airpurifier_coap.select
Source: custom_components/philips_airpurifier_coap/select.py:68
Integration: Philips AirPurifier (with CoAP) (documentation, issues)
First occurred: 19:54:59 (1 occurrences)
Last logged: 19:54:59
Unsupported model: AC2729/10

Can you please enable debug logging with v0.11.6 so that I get more details.

Test on v0.11.6 AC2729/10 work.
self._model = AC2729 [:6]
file: custom_components/philips_airpurifier_coap/config_flow.py

# autodetect model and name
self._model = list(filter(None, map(status.get, [PHILIPS_MODEL_ID, PHILIPS_NEW_MODEL_ID])))[0][:6]

Test in v0.12.0 AC2729/10 only sensors.
self._model = AC2729/10 [:9]

user_input[CONF_MODEL] = self._model need move after 'check if model is supported'
file: custom_components/philips_airpurifier_coap/config_flow.py lines: 200-217

# autodetect model and name
self._model = list(filter(None, map(status.get, [PHILIPS_MODEL_ID, PHILIPS_NEW_MODEL_ID])))[0][:9]
self._name = list(filter(None, map(status.get, [PHILIPS_NAME, PHILIPS_NEW_NAME])))[0]
self._device_id = status[PHILIPS_DEVICE_ID]
# self._model = status['type']
# self._name = status['name']
# device_id = status['DeviceId']
user_input[CONF_MODEL] = self._model
user_input[CONF_NAME] = self._name
user_input[CONF_DEVICE_ID] = self._device_id
_LOGGER.debug("Detected host %s as model %s with name: %s", self._host, self._model, self._name)

# check if model is supported
if not self._model in model_to_class.keys():
    _LOGGER.info(f"Model {self._model} not supported. Trying model family.")
    self._model = self._model[:6]
    if not self._model in model_to_class.keys():
        return self.async_abort(reason="model_unsupported")

fixed in upcoming release

try: v0.12.1