betaboon / philips-airpurifier-coap

💨 Philips AirPurifier custom component for Home Assistant. With support for new Devices with CoAP protocol. Tested on AC2729/10 (bought early 2020)
70 stars 31 forks source link

AC2889: initial support #6

Closed betaboon closed 3 years ago

betaboon commented 3 years ago

this issue is the place to discuss the initial AC2889 support.

references

raw-data (provided by @kongo09): https://github.com/betaboon/philips-airpurifier/issues/3#issuecomment-751245825

cc: @kongo09, @tunip

kongo09 commented 3 years ago

First experiments show that your new code works. However, when I use the speed setting in the lovelace fan card it also changes the light setting. That's not expected for a fan speed setting.

kongo09 commented 3 years ago

Interestingly, HA created new entities with new entity IDs so that I now have duplicates. Is that expected behaviour?

betaboon commented 3 years ago

the entity-id issue is somewhat expected as this integration generates the unique_id from {model}-{product_id}.

as for the light settings: i don`t have a clue how that is happening as the code doesn't even touch that setting.

edit: i just checked with my device (AC4236) using the official app: all speed modes enable the light+background-light, even the sleep-mode. the sleep mode disables it quickly after tho. so i would consider this to be expected

kongo09 commented 3 years ago

I just checked the AirMatters app: changing the fan speed or mode definitely does not change the light setting.

betaboon commented 3 years ago

@kongo09 that's interesting. maybe the app remembers the light setting and sends a separate request. or it uses another interface. I'm unsure what i can do here, as the requests that we send when setting the speed don't touch the light settings at all.

maybe a pcap of the network-traffic between the app and the device could help ?

kongo09 commented 3 years ago

This drives me crazy. Now I see the same erratic behaviour with this device as I saw with the AC2729. Using the HS on/off switch to switching it off indeed switches the device off, but the toggle goes back on again. Working just with the fan-speed setting seems to be more stable.

betaboon commented 3 years ago

Could you provide a debug log of the situation?

betaboon commented 3 years ago

i just pushed services for:

it would be great if you could test it :)

kongo09 commented 3 years ago

Could you provide a debug log of the situation?

I did that over at #4 . However, for whatever reason, this morning the device started to behave. All seems to work.

i just pushed services for:

This device does not have a humidifier function or humidity readings.

tunip commented 3 years ago

AC2889 seems to work fine. As kongo09 wrote, the AC2889 doesnt have humidity functions/sensors.

ronaldt80 commented 3 years ago

Brilliant! I have 2 http purifiers (which work very well with other plugins) but could not get the COAP one to work consistently. Will test for a few days and report back but so far all speed settings seem to work. Not much luck with services yet.

@kongo09 - my devices all turn of light and display light (where applicable) when set to sleep mode. Suspect this is built in and kind of makes sense to me.

tunip commented 3 years ago

Can still switch on the purifier in Home Assistant (also after days), but the switch in Lovelace goes back to off (Purifier still runs). To switch the purifier off, I need then to switch it on and right away off in Lovelace. Will check the log.

ronaldt80 commented 3 years ago

@tunip see issue #15 which I just opened. Your description seems in line with my issue, can you check if a home assistant restart works and if you can find the same "handshake" in your logs?

tunip commented 3 years ago

@ronaldt80 home assistant restart is a temporary workaround. A few hours/days later, same behavior. Enabled debug logging and lets wait, what happens.

riker09 commented 3 years ago

@kongo09 - my devices all turn of light and display light (where applicable) when set to sleep mode. Suspect this is built in and kind of makes sense to me.

It is a (built-in) feature, not a bug. You don't want to illuminate your whole bedroom at night, at least I don't. 🙂

Anyway, I've integrated my AC2889/10 with this custom component only yesterday. Biggest issue was the security setting in my WiFi that was set to WPA2/WPA3 and I had to downgrade it to WPA2 (CCMP) or the purifier wouldn't connect.

Can I help you with anything?

betaboon commented 3 years ago

I'm closing this issue as the initial support for this model seems to be working.

if any new issues arise feel free to open new dedicated issues