philips-airpurifier icon indicating copy to clipboard operation
philips-airpurifier copied to clipboard

Where are the services?

Open wolfhond opened this issue 4 years ago • 16 comments

Hello,

I have seen that this is a fork of xMrVizzy's component. xMrVizzy his component has services for Fan Speed etc. (philips_airpurifier.set_mode) But that component doesn't work because I need Protocol 3 CoAP.

Is there a way that I have also the service philips_airpurifier.set_mode. Now I can only set te purifier on and off.

wolfhond avatar Nov 14 '20 10:11 wolfhond

Hi, i need to rework the whole component, as there are several issues with it. I was not sure if anybody besides me uses this integration, as it was only intended for my private use at the current stage. (its very alpha, as you might experienced)

Now i know there is additional demand, i will try to get it updated sooner. While doing the rework, i will also integrate services to control Fan Speeds, Alergen Mode, Humidification etc.

shexbeer avatar Nov 14 '20 13:11 shexbeer

Hello,

I have search very long time to have a component that works with CoAP. And only your component worked. I think there are many people who wish this. Many forums ask for a component that works.

Thank you for integrating the services. I don't know how to get started.

wolfhond avatar Nov 14 '20 13:11 wolfhond

May i ask you what Model of the Philips Air Purifier you got? Would help me during testing, when i know somebody who may also have a unit different to mine.

I got the Philips AC2729/10 currently running Version 0.2.1

shexbeer avatar Nov 14 '20 13:11 shexbeer

I got Philips AC1214/10 Device version: 2.0.0 I think its the same without humidifier firmware: [email protected]

I still have this warning:

Logger: coapthon.client.coap Source: /usr/local/lib/python3.8/site-packages/coapthon/client/coap.py:219 First occurred: 14:04:26 (33 occurrences) Last logged: 14:15:53

Give up on message From None, To ('192.168.1.46', 5683), CON-32878, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload Give up on message From None, To ('192.168.1.46', 5683), CON-32880, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload Give up on message From None, To ('192.168.1.46', 5683), CON-32882, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload Give up on message From None, To ('192.168.1.46', 5683), CON-32884, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload Give up on message From None, To ('192.168.1.46', 5683), CON-32886, GET-None, [Uri-Path: sys, Uri-Path: dev, Uri-Path: status, Observe: 0, ] No payload

wolfhond avatar Nov 14 '20 13:11 wolfhond

Yes, exactly. Thats one of the issues. Homeassistant updates the component too often. So there seems to be a rate limit for purifier. So it will only answer a given number X of updates per 10 Minutes as it looks to me.

shexbeer avatar Nov 14 '20 13:11 shexbeer

that sounds great... I am using the fork https://github.com/mkuennek/philips-airpurifier because it has all needed dependencies to get it working with my AC2729/10 via coap. But its still very buggy, looking forward to your rework :)

nicx avatar Nov 14 '20 14:11 nicx

Hi, is it possible to run HA Supervisor installed in docker on ubuntu?

djanosz avatar Nov 14 '20 15:11 djanosz

hi, you can pull informations from the purifier as much as you want. there is no real limitation, at least not on mine. I have a very simple one liner that gives me the PM 2.5 value in a Terminal Window every second.

clear; while true; do pm=$(airctrl --ipaddr 192.168.xx.xx --protocol coap | grep PM25: | cut -c 37-); echo -ne "$(date) PM25: $pm\r"; sleep 1; done

BTW.: i am also very interested in your integration. And a lot more will be ;)

This my device:

airctrl --ipaddr 192.168.xx.xx --protocol coap [name] Name: Schlafzimmer [type] Type: AC2889 [modelid] ModelId: AC2889/10 [swversion] Version: 1.0.7 [om] Fan speed: silent [pwr] Power: ON [cl] Child lock: False [aqil] Light brightness: 0 [uil] Buttons light: OFF [mode] Mode: manual [pm25] PM25: 28 [iaql] Allergen index: 5 [aqit] Air quality notification threshold: 1 [ddp] Used index: PM2.5 [fltt1] HEPA filter type: NanoProtect Filter Series 3 (FY2422) [fltt2] Active carbon filter type: NanoProtect Filter AC (FY2420) [fltsts0] Pre-filter and Wick: clean in 181 hours [fltsts1] HEPA filter: replace in 4621 hours [fltsts2] Active carbon filter: replace in 2221 hours [range] range: Comfort [Runtime] Runtime: 13.64 hours [WifiVersion] WifiVersion: [email protected] [ProductId] ProductId: xx [DeviceId] DeviceId: xx [StatusType] StatusType: localcontrol [ConnectType] ConnectType: Localcontrol

lucatze avatar Nov 19 '20 14:11 lucatze

i got a AC4236 and I'm available for testing if you need :)

betaboon avatar Dec 19 '20 15:12 betaboon

@shexbeer i started reimplementing the integration using async_platform, aiocoap and coap-observations. this way the integration becomes Local Push instead of Local Pull.

I dropped using py-air-control for multiple reasons:

  • it is not async capable
  • coapthon3 which is being used is buggy and seems to be barely maintained

my fork is here: https://github.com/betaboon/philips-airpurifier

reading the code of py-air-control, and the several forks of philips-airpurifier creates the impression that the individual models use different keys in the retrieved data, different options for settings speeds etc. therefor i think it would be preferable to implement each model individually instead of a fit-all solution.

since i own a AC4236 i can only test for encrypted coap.

i see the following course of action:

  • rewrite py-air-control to be async capable (for http and coap) (aioaircontrol is currently part of my fork)
  • implement fan-entities for each individual supported model

i would very much be willing to cooperate in order to achieve this.

betaboon avatar Dec 22 '20 13:12 betaboon

Tryed it but not working for me. Have the same 4000i purifier.

spider7611 avatar Dec 22 '20 14:12 spider7611

Tryed it but not working for me. Have the same 4000i purifier.

@spider7611 if this comment was related to my fork please move the discussion to betaboon/philips-airpurifier#1

betaboon avatar Dec 22 '20 17:12 betaboon

Tryed it but not working for me. Have the same 4000i purifier.

@spider7611 if this comment was related to my fork please move the discussion to betaboon#1

Yes your fork. Ok.

spider7611 avatar Dec 23 '20 07:12 spider7611

tried both, @shexbeer and @betaboon integrations on both devices, AC2889 and AC2729. I'm using protocol: 3 which is encrypted coap. With both, I run into the same problem: HA doesn't update the state when I switch the devices off or on. Only minutes later, the state gets reflected. Could this be due to the rate limiting? Shouldn't the @betaboon solution solve this then?

kongo09 avatar Dec 24 '20 23:12 kongo09

@kongo09 my implementation doesn't pull the data but consumes it as published by the device. Could it be possible that you overlooked the platform string is different in mine? So are the configuration options. In my fork your models are not yet officially supported, but you can help getting them supported. There is some information on how to do that in the Readme.

betaboon avatar Dec 24 '20 23:12 betaboon

@betaboon you are absolutely right, I messed it up. I've now cleaned the system of the previous platform, made sure to have only yours, switched the platform string and pretended my devices to be your model. Indeed, the AC2729 now fails while the AC2889 for the first time is switchable. I'll take the discussion over to your your fork and will report the params there for proper integration.

kongo09 avatar Dec 24 '20 23:12 kongo09