libpurecool
libpurecool copied to clipboard
Add full support for Dyson Pure Humidify+Cool
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.
i am using HP-06 Dyson Pure Humidify+Cool Cryptomic air purifiers
everything is ok thanks for this lib very much
but i cant turn on and off my fan with function
fan.set_configuration(fan_mode=FanMode.OFF)
after 5 minute i found i can use
fan.set_configuration(fan_power=FanPower.POWER_ON)
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 and then edit the test.py file in the root folder with your credentials and run it. it should log all incoming messages from the fan. After it's connected and running change the humidity setting and paste the log here.
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 It looks like you have the cryptomic model. As far as I can remember from the ticket for the TP06 model, the app reports the state of the HEPA filter and only shows if the cryptomic filter is installed or not, but this was not reflected in the state message, I have no idea where it is getting the information if it is installed or not in the app, maybe it's a new type of message that was implemented for the new models. We can find this out if you run the script above once with the cryptomic filter installed and once without it.
Test Log Output
{"msg":"CURRENT-STATE","time":"2020-04-28T20:15:15.000Z","mode-reason":"NONE","state-reason":"MODE","rssi":"-41","channel":"1","fqhp":"103808","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0096","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0135","osau":"0225","ancp":"0090","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1948","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}**
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:15.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:15.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:18.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"CURRENT-STATE","time":"2020-04-28T20:15:30.000Z","mode-reason":"NONE","state-reason":"MODE","rssi":"-41","channel":"1","fqhp":"103032","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0096","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0135","osau":"0225","ancp":"0090","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1948","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:30.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"CURRENT-STATE","time":"2020-04-28T20:15:30.000Z","mode-reason":"NONE","state-reason":"MODE","rssi":"-41","channel":"1","fqhp":"102184","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0096","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0135","osau":"0225","ancp":"0090","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1948","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:30.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:30.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"CURRENT-STATE","time":"2020-04-28T20:15:30.000Z","mode-reason":"NONE","state-reason":"MODE","rssi":"-41","channel":"1","fqhp":"102952","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0096","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0135","osau":"0225","ancp":"0090","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1948","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:30.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:45.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"STATE-CHANGE","time":"2020-04-28T20:15:46.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["ON","ON"],"fnst":["FAN","FAN"],"ercd":["31U2","31U2"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0005","0005"],"bril":["0002","0002"],"corf":["OFF","OFF"],"cflr":["INV","INV"],"hflr":["0096","0096"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0135","0135"],"osau":["0225","0225"],"ancp":["0090","0090"],"hume":["OFF","HUMD"],"haut":["OFF","OFF"],"humt":["0050","0050"],"rect":["0035","0035"],"msta":["OFF","HUMD"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["1948","1948"],"wath":["2025","2025"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:15:49.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"CURRENT-STATE","time":"2020-04-28T20:16:00.000Z","mode-reason":"LAPP","state-reason":"MODE","rssi":"-42","channel":"1","fqhp":"103464","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0096","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0135","osau":"0225","ancp":"0090","hume":"HUMD","haut":"OFF","humt":"0050","rect":"0035","msta":"HUMD","clcr":"CLNO","cdrr":"0060","cltr":"1948","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:16:00.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"STATE-CHANGE","time":"2020-04-28T20:16:02.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["ON","ON"],"fnst":["FAN","FAN"],"ercd":["31U2","31U2"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0005","0005"],"bril":["0002","0002"],"corf":["OFF","OFF"],"cflr":["INV","INV"],"hflr":["0096","0096"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0135","0135"],"osau":["0225","0225"],"ancp":["0090","0090"],"hume":["HUMD","HUMD"],"haut":["OFF","OFF"],"humt":["0050","0050"],"rect":["0035","0035"],"msta":["HUMD","HUMD"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["1948","1948"],"wath":["2025","2025"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"STATE-CHANGE","time":"2020-04-28T20:16:06.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["ON","ON"],"fnst":["FAN","FAN"],"ercd":["31U2","31U2"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0005","0006"],"bril":["0002","0002"],"corf":["OFF","OFF"],"cflr":["INV","INV"],"hflr":["0096","0096"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0135","0135"],"osau":["0225","0225"],"ancp":["0090","0090"],"hume":["HUMD","HUMD"],"haut":["OFF","OFF"],"humt":["0050","0050"],"rect":["0035","0035"],"msta":["HUMD","HUMD"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["1948","1948"],"wath":["2025","2025"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:16:15.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"STATE-CHANGE","time":"2020-04-28T20:16:18.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["ON","ON"],"fnst":["FAN","FAN"],"ercd":["31U2","31U2"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0006","0006"],"bril":["0002","0002"],"corf":["OFF","OFF"],"cflr":["INV","INV"],"hflr":["0096","0096"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0135","0135"],"osau":["0225","0225"],"ancp":["0090","0090"],"hume":["HUMD","OFF"],"haut":["OFF","OFF"],"humt":["0050","0050"],"rect":["0035","0035"],"msta":["HUMD","OFF"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["1948","1948"],"wath":["2025","2025"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-04-28T20:16:19.000Z","data":{"tact":"2994","hact":"0034","pm25":"0000","pm10":"0000","va10":"0008","noxl":"0000","p25r":"0000","p10r":"0000","sltm":"OFF"}}
{"msg":"STATE-CHANGE","time":"2020-04-28T20:16:20.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["ON","ON"],"fnst":["FAN","FAN"],"ercd":["31U2","31U2"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0006","0005"],"bril":["0002","0002"],"corf":["OFF","OFF"],"cflr":["INV","INV"],"hflr":["0096","0096"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0135","0135"],"osau":["0225","0225"],"ancp":["0090","0090"],"hume":["OFF","OFF"],"haut":["OFF","OFF"],"humt":["0050","0050"],"rect":["0035","0035"],"msta":["OFF","OFF"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["1948","1948"],"wath":["2025","2025"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
Application Remote Screen

@etheralm I have the regular PH01 model. I recall seeing someone had the cryptomic model, but I cannot recall where I saw that. I'm successfully using the recent update with @pfy's changes with Home Assistant.
- Basic automations are working for on/off, speed, night mode.
- It returns air quality metrics on startup, but does not update those metrics.
- The combination filter's lifespan metric is returned in the HEPA filter parameter, the carbon filter displays "INV".
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
{"msg":"CURRENT-STATE","time":"2020-05-01T18:55:11.000Z","mode-reason":"LAPP","state-reason":"MODE","rssi":"-48","channel":"64","fqhp":"97224","fghp":"65872","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"OFF","fnst":"FAN","ercd":"NONE","wacd":"NONE","nmdv":"0004","fnsp":"0002","bril":"0002","corf":"ON","cflr":"INV","hflr":"0100","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0180","osau":"0180","ancp":"BRZE","hume":"HUMD","haut":"OFF","humt":"0060","rect":"0045","msta":"HUMD","clcr":"CLNO","cdrr":"0060","cltr":"0670","wath":"0675","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-05-01T18:55:11.000Z","data":{"tact":"2959","hact":"0052","pm25":"0000","pm10":"0000","va10":"0009","noxl":"0000","p25r":"0001","p10r":"0001","sltm":"OFF"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-05-01T18:55:11.000Z","data":{"tact":"2959","hact":"0052","pm25":"0000","pm10":"0000","va10":"0009","noxl":"0000","p25r":"0001","p10r":"0001","sltm":"OFF"}}
{"msg":"CURRENT-STATE","time":"2020-05-01T18:55:12.000Z","mode-reason":"LAPP","state-reason":"MODE","rssi":"-47","channel":"64","fqhp":"97344","fghp":"65872","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"OFF","fnst":"FAN","ercd":"NONE","wacd":"NONE","nmdv":"0004","fnsp":"0002","bril":"0002","corf":"ON","cflr":"INV","hflr":"0100","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0180","osau":"0180","ancp":"BRZE","hume":"HUMD","haut":"OFF","humt":"0060","rect":"0045","msta":"HUMD","clcr":"CLNO","cdrr":"0060","cltr":"0670","wath":"0675","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"ENVIRONMENTAL-CURRENT-SENSOR-DATA","time":"2020-05-01T18:55:13.000Z","data":{"tact":"2959","hact":"0052","pm25":"0000","pm10":"0000","va10":"0009","noxl":"0000","p25r":"0001","p10r":"0001","sltm":"OFF"}}
{"msg":"STATE-CHANGE","time":"2020-05-01T18:55:16.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["OFF","OFF"],"fnst":["FAN","FAN"],"ercd":["NONE","NONE"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0002","0002"],"bril":["0002","0002"],"corf":["ON","ON"],"cflr":["INV","INV"],"hflr":["0100","0100"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0180","0180"],"osau":["0180","0180"],"ancp":["BRZE","BRZE"],"hume":["HUMD","HUMD"],"haut":["OFF","ON"],"humt":["0060","0060"],"rect":["0045","0045"],"msta":["HUMD","OFF"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["0670","0670"],"wath":["0675","0675"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
{"msg":"STATE-CHANGE","time":"2020-05-01T18:55:24.000Z","mode-reason":"LAPP","state-reason":"MODE","product-state":{"fpwr":["ON","ON"],"auto":["OFF","OFF"],"oscs":["ON","ON"],"oson":["ON","ON"],"nmod":["OFF","OFF"],"rhtm":["OFF","OFF"],"fnst":["FAN","FAN"],"ercd":["NONE","NONE"],"wacd":["NONE","NONE"],"nmdv":["0004","0004"],"fnsp":["0002","0002"],"bril":["0002","0002"],"corf":["ON","ON"],"cflr":["INV","INV"],"hflr":["0100","0100"],"cflt":["NONE","NONE"],"hflt":["GCOM","GCOM"],"sltm":["OFF","OFF"],"osal":["0180","0180"],"osau":["0180","0180"],"ancp":["BRZE","BRZE"],"hume":["HUMD","HUMD"],"haut":["ON","OFF"],"humt":["0060","0060"],"rect":["0045","0045"],"msta":["OFF","HUMD"],"clcr":["CLNO","CLNO"],"cdrr":["0060","0060"],"cltr":["0670","0670"],"wath":["0675","0675"],"psta":["OFF","OFF"],"fdir":["ON","ON"]},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
Last two state changes are humidity setting changes from 60 to AUTO and back to 60. App screenshots:

Let me know if there's anything I can do to help. offtop: I'm new into this topic, how do you install integration to Home Assistant directly from branch (I mean not official release)? Could you please point me out where I can find some documentation about it?
It occurred to me that there is another "filter" in this model. It's not replaced, but instead cleaned during the deep clean cycle. Looks like the HEPA/Charcoal is referred to as "Combi". I'm not sure what the orange colored filter is called, but I've included app screenshots for both.

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.
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:
"hume": "OFF",
"haut": "OFF",
"humt": "0050",
"rect": "0035",
"msta": "OFF",
"clcr": "CLNO",
"cdrr": "0060",
"cltr": "1948",
"wath": "2025",
"psta": "OFF",
From the state change messages you posted I can assume that the humidity button shows OFF when the field
"hume" is "OFF" and and the number from "humt" when "hume" is set to "HUMD".
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
From the other fields the one closest to the value shown on the deep clean cycle screenshot is "cltr": "1948", can you please run the script again and try to verify that the value of cltr in the "CURRENT-STATE" message is the same as what you see in the maintenance screen for the deep clean cycle hours left.
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:
enable_humidifier
disable_humidifier
enable_humidifier_auto
disable_humidifier_auto
set_humidity_target
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 test.py. I'm not seeing any logging output, Just a blinking cursor.
The humidity settings in the app are off, 30, 40, 50, 60, 70. The app doesn't allow for smaller than 10% increments. Not sure if smaller than 10% increments are accepted programmatically.
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 CURRENT-STATE for cltr matches the value in the app under "deep clean cycle".
The value for hume looks to be inline with your observation. It's set to OFF when humidity is off, and HUMD when humidity is on. The value for humt matches the humidity percentage as I change it in the app.
Also searched for the corresponding number for the "actual humidity" and that looks to be hact within ENVIRONMENTAL-CURRENT-SENSOR-DATA.
Thanks for testing.
Hmm you don't even see the first print Running tests... ?
I guess I messed something up during the initialization of the new class. I added some debug print statements throughout the code. Can you please pull again and run test.py.
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.
The value within
CURRENT-STATEforcltrmatches the value in the app under "deep clean cycle".
Awesome. I'll add this one too to the state tomorrow.
Also searched for the corresponding number for the "actual humidity" and that looks to be
hactwithinENVIRONMENTAL-CURRENT-SENSOR-DATA.
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.
# python test.py
Traceback (most recent call last):
File "test.py", line 21, in <module>
devices = dyson_account.devices()
File "/config/python/libpurecool/libpurecool/dyson.py", line 96, in devices
print("In device for loop: " + device_v2)
TypeError: can only concatenate str (not "dict") to str
oops, my bad I need some sleep. Can you pull and try again?
For oscillation angle in the app, here's a screenshot. Before this fan, I hadn't seen breeze before.

I'm getting the "In device for loop" output, but it's hanging without an error after that.
# python test.py
In device for loop:
{'Serial': 'xxxxxxxxxxxx', 'Name': 'Bedroom', 'Version': 'ECG2PF.46.00.007.0003', 'LocalCredentials': 'xxxxxxxxxxxxxx', 'AutoUpdate': True, 'NewVersionAvailable': False, 'ProductType': '358', 'ConnectionType': 'wss'}
In is_dyson_pure_humidifycool_device if statement
In device for loop:
{'Serial': 'xxxxxxxxxxxx', 'Name': 'Kitchen', 'Version': 'ECG2PF.02.06.003.0002', 'LocalCredentials': 'xxxxxxxxxxxxxx', 'AutoUpdate': True, 'NewVersionAvailable': False, 'ProductType': '520', 'ConnectionType': 'wss'}
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 CURRENT-STATE for oscillation in Off, 45º, and Breeze. Not sure what the difference is between oscs and oson. They're both OFF when oscillation is off, both ON when oscillation is on regardless of the mode. Looks like the differences is in ancp. When set to breeze, ancp is BRZE.
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.
// OFF
# python test.py
{"msg":"CURRENT-STATE","time":"2020-05-10T22:36:26.000Z","mode-reason":"NONE","state-reason":"MODE","rssi":"-42","channel":"1","fqhp":"100736","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"OFF","oson":"OFF","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0090","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0148","osau":"0148","ancp":"0090","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1819","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
// 45º
{"msg":"CURRENT-STATE","time":"2020-05-10T22:39:10.000Z","mode-reason":"LAPP","state-reason":"MODE","rssi":"-40","channel":"1","fqhp":"100752","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0090","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0148","osau":"0148","ancp":"0045","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1819","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
// Breeze
{"msg":"CURRENT-STATE","time":"2020-05-10T22:38:13.000Z","mode-reason":"LAPP","state-reason":"MODE","rssi":"-41","channel":"1","fqhp":"100752","fghp":"73104","product-state":{"fpwr":"ON","auto":"OFF","oscs":"ON","oson":"ON","nmod":"OFF","rhtm":"ON","fnst":"FAN","ercd":"31U2","wacd":"NONE","nmdv":"0004","fnsp":"0005","bril":"0002","corf":"OFF","cflr":"INV","hflr":"0090","cflt":"NONE","hflt":"GCOM","sltm":"OFF","osal":"0148","osau":"0148","ancp":"BRZE","hume":"OFF","haut":"OFF","humt":"0050","rect":"0035","msta":"OFF","clcr":"CLNO","cdrr":"0060","cltr":"1819","wath":"2025","psta":"OFF","fdir":"ON"},"scheduler":{"srsc":"0000000000000000","dstv":"0001","tzid":"0001"}}
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!