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

Add dmaker.airfresh.a1 support #97

Merged
merged 8 commits into from
Mar 13, 2021
Merged

Conversation

syssi
Copy link
Owner

@syssi syssi commented Nov 6, 2020

TODO:

  • set_filter_rate 100 to reset the filter lifetime.
  • What about: switch_power, switch_mode, get_sensor, get_speed?

Supported methods:

  • set_power [power] on/off
  • set_mode [mode] sleep/auto/favourite
  • set_favourite_speed 0...150
  • get_sensor [sensor] pm25/co2 (at the mihome app pm25 values above 999 are capped to 999)
  • set_ptc_on [on/off]
  • get_timer []
  • get_ptc_timer []
  • set_ptc_timer [ptcTime]
  • set_timer [time]
  • get_light_timer []
  • set_light_timer [lightTime]
  • delete_timer [time]
  • set_display [light] on/off(?)
  • set_sound [sound] on/off
  • set_child_lock [lock] on/off
  • set_filter_reset [filter]

Supported properties:

  • pm25
  • co2
  • temperature_outside
  • favourite_speed
  • filter_rate
  • filter_day
  • control_speed
  • power
  • mode
  • ptc_on
  • ptc_status
  • child_lock
  • sound
  • display

Getter and setter of ptc_level and screen_direction is not supported!

Example get_prop response:

$ miiocli device --ip IP --token TOKEN raw_command get_prop '["power", "pm25", "co2", "temperature_outside", "favourite_speed", "filter_rate", "filter_day", "control_speed", "ptc_on", "ptc_status", "child_lock", "sound", "display", "mode"]'
Running command raw_command
[True, 2, 554, 12, 150, 45, 81, 60, False, False, False, False, False, 'auto']

@syssi syssi changed the title Add dmaker airfresh a1 support Add dmaker.airfresh.a1 support Nov 6, 2020
@skvalex
Copy link
Contributor

skvalex commented Nov 14, 2020

Filters on this device have RFID-tag, so the device knows itself when the filter is being changed. So method set_filter_reset does not work at all.
Range is 0-150 for set_favourite_speed.
Also, this device accepts true/false instead of on/off, just like dmaker.airfresh.t2017 model does: rytilahti/python-miio#854

@syssi syssi force-pushed the add-dmaker-airfresh-a1-support branch from 2b35a2e to faba0fe Compare November 15, 2020 10:39
@syssi
Copy link
Owner Author

syssi commented Nov 16, 2020

@skvalex Are you aware of this command (rate vs reset) to reset the filter lifetime: rytilahti/python-miio#662 (comment)

@syssi syssi force-pushed the add-dmaker-airfresh-a1-support branch from 003af40 to 987b4c7 Compare November 16, 2020 08:31
@skvalex
Copy link
Contributor

skvalex commented Nov 16, 2020

@syssi I don't have access to this device now, but I have played with it in January and have added support for openhab then.
So, according to the config I created, filter_rate is for filter life remaining in percents and filter_day is for days remaining.
As I said before, set_filter_reset doesn't work there at all, so it can be removed completely. At the time of writing config for openhab I couldn't test it, because the filter was 100%, that's why set_filter_reset exists in my config.

@syssi syssi force-pushed the add-dmaker-airfresh-a1-support branch from a8eacb0 to ff894f5 Compare November 17, 2020 13:02
@alexmorbo
Copy link

alexmorbo commented Dec 5, 2020

Any news? A have dmaker.airfresh.a1
From https://github.com/NikolayBorisov/xiaomi_airfresh a got works:

  • Turn on / off
  • fan.airfresh_set_favourite_speed - from 1 to 200
  • switch.xiaomi_a1_display - on / off
  • switch.xiaomi_a1_sound - on / off
  • switch.xiaomi_a1_ptc - on / off (heat)
  • sensor.xiaomi_a1_co2
  • sensor.xiaomi_a1_pm25

Not works:

  • fan.set_speed - [miio.protocol] Unable to decrypt, returning raw bytes: b''

image

@rdhlb
Copy link

rdhlb commented Mar 1, 2021

Hey guys

Any news on this one? Is there anything I can do to help this going (e.g. provide logs, debug, test, etc)?

I've got this device and would really like to integrate it into HA.

@rdhlb
Copy link

rdhlb commented Mar 7, 2021

Hey @syssi

Sorry for being annoying here. Just trying to figure out if I can do something to help finish this up and get merged.

@syssi
Copy link
Owner Author

syssi commented Mar 7, 2021

The next step is to prepare a python-miio release. As soon the new version is released this PR can be merged.

@syssi syssi merged commit 0388bc3 into develop Mar 13, 2021
@syssi syssi deleted the add-dmaker-airfresh-a1-support branch June 9, 2023 16:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants