-
Notifications
You must be signed in to change notification settings - Fork 114
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 dmaker.airfresh.t2017 support #32
Comments
Could you provide some details about the device? |
It is a Mijia Air Fresher |
I also have this device. Please let me know if I can help anything @syssi . |
I also have this device. @syssi . |
php miio-cli.php --ip 192.168.2.230 --info --token xxx php miio-cli.php --ip 192.168.2.230 --token xxx --sendcmd '{"method":"get_prop",,"params":[],"id":1}' php miio-cli.php --ip 192.168.2.230 --token xxx --sendcmd '{"method":"get_prop",,"params":["pm25","co2","temperature_outside","favourite_speed","filter_intermediate","filter_inter_day","filter_efficient","filter_effi_day","control_speed","power","mode","ptc_on","ptc_level","ptc_status","child_lock","sound","display","screen_direction"],"id":1}' {"id":1,"result":[1,550,24,241,100,90,100,180,241,true,"favourite",false,"low",false,false,true,false,"forward"]} properties = ["pm25","co2","temperature_outside","favourite_speed","filter_intermediate","filter_inter_day","filter_efficient","filter_effi_day","control_speed","power","mode","ptc_on","ptc_level","ptc_status","child_lock","sound","display","screen_direction"] set_mode |
I also have this device. @syssi . |
Came accross the same issue. @syssi kindly ask you to add dmaker.airfresh.t2017 support. |
Subscribe! |
I also have that device. @syssi, if you need any information I would be happy to provide it |
Also wait desperatelly! This device needs smarter automation via HA. |
Got it! |
Could somebody explain the |
Unlike the XFXT01ZM model, this device has a built-in PTC (Positive Temperature Coefficient) heater. So I assume these values related to heater control. Unfortunately, my fresh air system still in transit and I can't assist with troubleshooting. |
get_timer: unit can set a weekly operation timer [Daily, Working days, Weekends, Custom MON-SUN], power-on time and power-off time. PTC is auxiliary heater for inlet air. get_ptc_level: unit has 3 heating level [Level 1 (less heat), Level 2, Level 3 (more heat)]. get_ptc_timer: auxiliary heater can set a weekly timer [Daily, Working days, Weekends, Custom MON-SUN], power-on time and power-off time. ptc_status: auxiliary heat function will be temporary turned off if outside temperature is above 20c. |
Could you provide some response examples for
plus description? I want to understand the format of the responses. This is all in know:
|
Currently I have no timer / ptc_timer set. I will set various timer and get value again to find a format.
|
Could you set some timer just for testing? If you change the favorite area setting which property changes? |
|
Favorite area settings will change |
Good job! Thanks for your support! |
I tested each command and here are results. commands that work: commands with errors:
set_ptc_level to
Some status has extra prefix. This Airfresh has 2 filters, in APP they are called Filter and Filter Pro. If we call one filter as
Spelling is not inline with other usage (should map raw returned
No help text explain possible value (60-300)
Command that not test yet: Missing command |
Any update on this one? edit: Seems that python-miio has full support of dmaker.airfresh.t2017 now. Only lack of time to learn python stops me currently of making merge request :_( |
Excuse me, just to make things clear: you plan no support for this model? |
The device will be supported some day. |
If I send a command |
2020-11-05 19:05:11 DEBUG (SyncWorker_6) [miio.miioprotocol] 192.168.1.108:54321 >>: {'id': 1266, 'method': 'set_power', 'params': ['true']} |
Alright. I've fixed all toggles at python-miio. |
I can't understand why the 'power' status is not displayed in the HA. |
Because it's not exposed as attribute. It's the state of the entity. |
@syssi You're right. Added. |
@syssi Added more commands vartom@a80be99 |
@syssi Can you see what's wrong here? 2020-11-05 20:18:17 ERROR (MainThread) [homeassistant.components.automation.air_fresh_ptc_level_change] Air Fresh ptc level change: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['level']
|
The component doesn't have a |
Added more commands to fan.py vartom/xiaomi_airpurifier@a80be99 |
Got it. You are working with a fork. You have to implement a new service to control the PTC. |
set_favorite_speed works fine |
If you prepare a PR already as draft I can help to bring your feature branch forward. |
What do you have in mind? |
Goto "https://github.com/syssi/xiaomi_airpurifier/pulls" and create a new pull request of your feature branch. As soon you have created a PR I've access to your repository to improve your code. |
input_select: Xiaomi Air Freshxiaomi_airfresh_level:
2020-11-06 00:55:59 ERROR (MainThread) [homeassistant.components.automation.air_fresh_ptc_level_change] Air Fresh ptc level change: Error executing script. Invalid data for call_service at pos 1: extra keys not allowed @ data['level'] |
I will fix this issue in the next hour or two. |
I've pushed a fix. Please give it a try. |
We are done. I've added a |
I can check in ten to eleven hours. |
It worked twice right after the fix and after the next restart the server stopped working. |
@vartom Thanks for the fix! Good catch! |
Any idea why i'm getting this? I tried both fan and climate platform. I'm on latest develop branch.
Tried to search for dmaker:
Config entry:
|
There is no official release supporting the device yet. I will prepare a new release as soon the underlying library (python-miio 0.5.4) is released. |
Oh :D that's pretty confusing as it is in the readme already, can't wait for release! |
@syssi, thanks for the version 0.6.2. It works perfect with the config provided below. Although, few services are incorrect in the readme. They should be changed from
|
@skvalex I added you advanced configuration example here: https://github.com/syssi/xiaomi_airpurifier/blob/develop/docs/dmaker-airfresh-t2017.md I'm happy if you provide some YAML markup and a screenshot of your lovelace setup. |
@syssi here's the complete config for this device:
Here's the lovelace screenshot and the config itself:
|
Unsupported device found! Please create an issue at https://github.com/syssi/xiaomi_airpurifier/issues and provide the following data: dmaker.airfresh.t2017
The text was updated successfully, but these errors were encountered: