-
Notifications
You must be signed in to change notification settings - Fork 30
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
Add full support for Dyson Pure Humidify+Cool #16
Comments
i am using HP-06 Dyson Pure Humidify+Cool Cryptomic air purifiers everything is ok but i cant turn on and off my fan with function
after 5 minute
its work now! thanks! |
@eide31 you can also use the helper methods to turn the fan on/off instead of passing the configuration parameters directly: fan.turn_on() and fan.turn_off(). |
Ok I prepared a branch with a test script for this model. For anyone that would like to help, can you please checkout the following branch: https://github.com/etheralm/libpurecool/tree/pure_humidify_cool It would also help if you can post a screenshot of the app with the screen where you can change the different settings, just to be sure that we are not missing some option that is available there. @alexbussa |
Test Log Output
@etheralm
|
Thanks @alexbussa, I'll have a look the messages you posted later today and I'll try to figure out what changed I'll let you know when I push a new version that's ready for testing. From the screenshot you posted I see 2 new buttons that we have to add support for (assuming that the purify under auto does the same thing as the auto button in the old fan models). Let me fix the environmental state update first and I'll post a new test script for those. For the filters, I have the TP04 model which reports the hepa and carbon filter state separately, but they always have the same value, you can't even buy a replacement carbon of hepa filter for them separately. I guess that the dyson devs figured out that it's pointless to have two properties with the same value and they changed the carbon filter state to 'INV' to all the new models, starting with the first cryptomic one. I'll leave it as it is for now. We fixed it for the DP06 model in home assistant, so that it shouldn't throw an error when the carbon filter state is not an integer. |
Hi guys! I've just bought PH01 model. Not sure if it's still needed, but this is my logs
Last two state changes are humidity setting changes from 60 to AUTO and back to 60. Let me know if there's anything I can do to help. |
I have the DP04 also, which uses the same filters as the TP04 you have. I know what you're referring to. It's physically two filters, but their usage metrics increment at the same rate. The filter in the HP01 is physically one combined filter. It's HEPA on the outside, charcoal on the inside, in a single form factor. |
Thanks for the screenshots, this with the deep clean cycle looks different than the cryptomic one, we have to figure out which message contains the value for the hours left. I was quite busy the last few days, but I think I’ll have some time to look into the logs you posted tomorrow. I’ll let you know if managed to find it there. |
Ok I just had a look at the logs you posted and this is what I found: The following new fields were added to the state message:
From the state change messages you posted I can assume that the humidity button shows OFF when the field This should be enough to add support for the humidity control. I'll let you know here when I add it so that you can test it. @alexbussa I'll try to find why the environment state is not updating next. |
ok just had a look at the "ENVIRONMENTAL-CURRENT-SENSOR-DATA" message from the logs you posted and its absolutely identical to the one from the previous models. @alexbussa may I ask how you are testing the air quality data update, in home-assistant or directly with the lib? |
OK I just added support for the humidifier functions to the branch. I did it quite quickly today and everything probably won't work on the first try, but let's give it a shot. I added the following methods:
I also updated the test.py script with some tests for the new functions. Can you please pull the latest changes from the branch, replace the user and pass in test.py and run it. It should pause for 10 seconds after calling each method. Can you verify in the app that it is actually doing what the method is supposed to do. You can also play around with the methods (passing different values to set_target_humidity, running the others from different states, etc.), let me know if you find any issues (or if it works at all). Also one question, what are the minimum and maximum values for the target humidity that you can set in the app? I assumed that the range is between 0 and 100, but I can be wrong. Cheers. |
Downloaded the latest, ran The humidity settings in the app are The air quality metrics not updating were noticed in Home Assistant, not directly within the lib. I seem to be getting updates in Home Assistant now. They're much less frequent on the HP01 than my DP04, but perhaps that's due to air quality remaining consistent in that room. |
I pulled down the previous commit to look into the other values you mentioned. The value within The value for Also searched for the corresponding number for the "actual humidity" and that looks to be |
Thanks for testing. Hmm you don't even see the first print Let's get the new class running first and then you can test if the fan will accept other values for target humidity, it could be quite possible that it does, for example the app has only a few settings for the oscillation angle, but you can set the exact angle through the lib. Good to hear that it's updating for you, otherwise I have no idea why it wouldn't. The environment message is exactly the same as with previous models. |
Awesome. I'll add this one too to the state tomorrow.
Temperature and humidity should be available in the environment state already since nothing changed in the message from the previous models. Thanks for verifying. |
Pulled the latest. This is the error it's giving.
|
oops, my bad I need some sleep. Can you pull and try again? |
I'm getting the "In device for loop" output, but it's hanging without an error after that.
|
Ok as I suspected its hanging when initializing the new object for some reason, I'll have a fresh look at it tomorrow, probably something stupid that I did. I'll let you know when I find it. This option with the breeze is definitely new. Can you please post the the state message using the previous commit when it is turned on, I'll try to add it to the lib. Also what is it actually doing when you turn it on? |
Ok I added 2 more debug prints at a lower level, can you please pull again and run it when you have the time, I'll have a look at it tomorrow. |
Nevermind I managed to reproduce the issue with my fan too, I'll let you know when I get it fixed. |
Snagged the The Breeze oscillation mode is a non-synchronous oscillation movement where both vents are pointing in different directions, and appear to move at different speeds. I believe the intent is to have a more constant airflow that mimics a breeze.
|
ok I think I found the issue (or at least one of them). It was a really stupid mistake on my part, passed the model number instead of the state message payload to the state object, because fat fingers copy-pasting... The test script should work now. Can you please pull the latest changes and run it again. About the breeze option: great I should be able to add it to the enable_oscillation method for this model. |
Running the latest code. I have a blinking cursor, no errors, nothing printed to the screen. |
damn thanks for testing and sorry for wasting your time. I'll have a better look later and I'll let you know when I find something. |
Hi @etheralm , I can also help around (also an owner of the Dyson Pure Humidify+Cool). Let me know if I could do some testing and coding. I'll have time later this week. |
Hi @liudger, sorry I've been quite busy last few days, haven't done anything for this. I'll have some free time off at the end of week too. I'll let you know when I have something. |
I am a new owner, as well, and am excited to see this in Home Assistant (where I'm one of the core developers). Let me know how I can assist! |
Same here, tried home assistant but keep getting message that device could not be found in my Dyson account. Anyway, also happy to help testing etc |
Hi, Using the latest commit 3374125 on branch pure_humidify_cool, the code deadlock on the device.connect() method: In this method: Note that this happens because the sensors are:
But here is the payload from my pure / humidify / cool: Firmware is: I connect correctly using a simple: I will play a bit more with the library and the device as soon as i can! (tonight, France time!) |
Hi @qdel Thanks for having a look at it, I've been quite busy lately and didn't have the time to check this. You actually pointed me to the reason for the deadlock. The code is trying to init the environment state object object using the The reason that this happens is that, where the code parses the env message (on_message method in dyson_pure_cool_link.py) it uses the I just added the model to the util method. Can you please pull the latest commit and run the test.py to see if all the fan functions are running correctly. |
Hello, Connection works correctly, But it seems the test do not pass:
Note that the test script never ends. |
I updated the test script for more functionality testing. from what i can check:
|
I have a HP02 (Dyson Pure Humidify Cool Cryptomic) and I get a error message of Unable to find device xxx-xx-xxxxxxxx in Dyson account. I see on the documentation page "Dyson Cool+Hot devices (HP02 and HP04)" so I'm curious if this is an issue with my Dyson account or something else? Thanks! |
I'm getting really itchy to add this to Home Assistant. What help is needed to push this across the finish line? Someone to put together a PR? I have this device and enough device integration experience to take a stab if it's helpful. |
Same here, I'm happy to provide more information or assist with debugging/integration. |
I’m happy to help out how ever I can as well! Would love to see this working. |
on a side note: HA seems to have added a humidifier integration since v0.112: https://www.home-assistant.io/integrations/humidifier/ |
Yes there is a dyson integration with this library but this integration doesn’t work correctly. |
Same issue on my end with the Pure Humidify + Cool, so I don’t think it’s related to your account. |
My Pure Humidify+Cool somehow shows up in Home Assistant and can be controlled. I did want to report a Home Assistant stacktrace that I received today: Logger: root
Source: /usr/src/homeassistant/homeassistant/bootstrap.py:315
First occurred: 7:09:23 PM (1 occurrences)
Last logged: 7:09:23 PM
Uncaught thread exception
Traceback (most recent call last):
File "/usr/local/lib/python3.8/threading.py", line 932, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.8/threading.py", line 870, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3452, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1779, in loop_forever
rc = self.loop(timeout, max_packets)
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1181, in loop
rc = self.loop_read(max_packets)
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 1572, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2310, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 2936, in _packet_handle
return self._handle_publish()
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3216, in _handle_publish
self._handle_on_message(message)
File "/usr/local/lib/python3.8/site-packages/paho/mqtt/client.py", line 3444, in _handle_on_message
self.on_message(self, self._userdata, message)
File "/usr/local/lib/python3.8/site-packages/libpurecool/dyson_pure_cool_link.py", line 104, in on_message
device_msg = DysonEnvironmentalSensorV2State(payload)
File "/usr/local/lib/python3.8/site-packages/libpurecool/dyson_pure_state_v2.py", line 157, in __init__
else int(particulate_matter_25)
ValueError: invalid literal for int() with base 10: 'FAIL' |
PureCool (and PureCool+Humidify) have filters that exposes a life remaining percentage, similarly to a printer's drum. Until etheralm/libpurecool#16 is merged, the PureCool+Humidify objects are not "aware" of the Combi filter directly, and instead expose its life as if it was the HEPA filter.
PureCool (and PureCool+Humidify) have filters that exposes a life remaining percentage, similarly to a printer's drum. Until etheralm/libpurecool#16 is merged, the PureCool+Humidify objects are not "aware" of the Combi filter directly, and instead expose its life as if it was the HEPA filter.
PureCool (and PureCool+Humidify) have filters that exposes a life remaining percentage, similarly to a printer's drum. Until etheralm/libpurecool#16 is merged, the PureCool+Humidify objects are not "aware" of the Combi filter directly, and instead expose its life as if it was the HEPA filter.
Add full support for the new Dyson Pure Humidify+Cool and Dyson Pure Humidify+Cool Cryptomic air purifiers.
Thank you @pfy for providing the preliminary implementation.
The text was updated successfully, but these errors were encountered: