merdok / homebridge-miot

Homebridge plugin for devices supporting the Xiaomi miot protocol
MIT License
388 stars 61 forks source link

Favourite speed dmaker.airfresh.a1 #67

Closed blastoma closed 3 years ago

blastoma commented 3 years ago

Hello! Can you add Speed regulator for dmaker.airfresh.a1 like here https://github.com/syssi/xiaomi_airpurifier/blob/develop/docs/dmaker.airfresh.a1.yaml https://github.com/NikolayBorisov/xiaomi_airfresh?

merdok commented 3 years ago

The dmaker.airfresh.a1 does not support favorite speed with the miot protocol. At least i do not see it in the spec: https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-fresh:0000A012:dmaker-a1:1

blastoma commented 3 years ago

It works for me with miio protocol

image

I saw this service https://python-miio.readthedocs.io/en/latest/_modules/miio/airfresh_t2017.html?highlight=dmaker.airfresh.a1#

blastoma commented 3 years ago

Commands: get_ptc_timer Returns a list of PTC timers. get_timer Response unknown. info Get miIO protocol information from the device. off Power off. on Power on. raw_command Send a raw command to the device. reset_dust_filter Resets filter lifetime of the dust filter. set_buzzer Set sound on/off. set_child_lock Set child lock on/off. set_display Turn led on/off. set_favorite_speed Sets the fan speed in favorite mode. set_mode Set mode. set_ptc Turn ptc on/off. set_ptc_timer value = time.index + '-' + time.hexSum + '-' +... status Retrieve properties. test_properties Helper to test device properties.

merdok commented 3 years ago

The old miio protocol is unfortunately not supported by this plugin. Some devices like this one you have are mapped over micloud to the miot protocol, but unfortunately only with limited property support and that is the case here. As long as a property is exposed under the miot protocol then i can implement it, if not then unfortunately not...