Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where are the services? #1

Open
wolfhond opened this issue Nov 14, 2020 · 16 comments
Open

Where are the services? #1

wolfhond opened this issue Nov 14, 2020 · 16 comments
Labels
enhancement New feature or request

Comments

@wolfhond
Copy link

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.

@shexbeer
Copy link
Owner

shexbeer commented Nov 14, 2020

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.

@wolfhond
Copy link
Author

wolfhond commented Nov 14, 2020

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.

@shexbeer
Copy link
Owner

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

@wolfhond
Copy link
Author

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

@shexbeer
Copy link
Owner

shexbeer commented Nov 14, 2020

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.

@nicx
Copy link

nicx commented Nov 14, 2020

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 :)

@djanosz
Copy link

djanosz commented Nov 14, 2020

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

@lucatze
Copy link

lucatze commented Nov 19, 2020

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

@betaboon
Copy link

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

@betaboon
Copy link

betaboon commented Dec 22, 2020

@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.

@spider7611
Copy link

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

@betaboon
Copy link

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

@spider7611
Copy link

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.

@kongo09
Copy link

kongo09 commented Dec 24, 2020

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?

@betaboon
Copy link

@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.

@kongo09
Copy link

kongo09 commented Dec 24, 2020

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants