rytilahti / python-miio

Python library & console tool for controlling Xiaomi smart appliances
https://python-miio.readthedocs.io
GNU General Public License v3.0
3.7k stars 553 forks source link

Add support of new device Mi Smart Humidifer (deerma.humidifier.jsq3) #953

Open tam-wh opened 3 years ago

tam-wh commented 3 years ago

Device information:

This version of humidifier does not have UV-C light Screenshot_20210217-211838_Mi Home

Untitled

tam-wh commented 3 years ago

https://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:humidifier:0000A00E:deerma-jsq3:1

{"type":"urn:miot-spec-v2:device:humidifier:0000A00E:deerma-jsq3:1","description":"Humidifier","services":[{"iid":1,"type":"urn:miot-spec-v2:service:device-information:00007801:deerma-jsq3:1","description":"Device Information","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:manufacturer:00000001:deerma-jsq3:1","description":"Device Manufacturer","format":"string","access":["read"]},{"iid":2,"type":"urn:miot-spec-v2:property:model:00000002:deerma-jsq3:1","description":"Device Model","format":"string","access":["read"]},{"iid":3,"type":"urn:miot-spec-v2:property:serial-number:00000003:deerma-jsq3:1","description":"Device Serial Number","format":"string","access":["read"]},{"iid":4,"type":"urn:miot-spec-v2:property:firmware-revision:00000005:deerma-jsq3:1","description":"Current Firmware Version","format":"string","access":["read"]}]},{"iid":2,"type":"urn:miot-spec-v2:service:humidifier:00007818:deerma-jsq3:1","description":"Humidifier","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:deerma-jsq3:1","description":"Switch Status","format":"bool","access":["read","write","notify"]},{"iid":2,"type":"urn:miot-spec-v2:property:fault:00000009:deerma-jsq3:1","description":"Device Fault","format":"uint8","access":["read","notify"],"unit":"none","value-list":[{"value":0,"description":"No Faults"},{"value":1,"description":"Insufficient Water"},{"value":2,"description":"Water Separation"}]},{"iid":5,"type":"urn:miot-spec-v2:property:fan-level:00000016:deerma-jsq3:1","description":"Fan Level","format":"uint8","access":["read","write","notify"],"unit":"none","value-list":[{"value":1,"description":"Level1"},{"value":2,"description":"Level2"},{"value":3,"description":"Level3"},{"value":4,"description":"Humidity"}]},{"iid":6,"type":"urn:miot-spec-v2:property:target-humidity:00000022:deerma-jsq3:1","description":"Target Humidity","format":"uint8","access":["read","write","notify"],"unit":"percentage","value-range":[40,80,1]},{"iid":7,"type":"urn:miot-spec-v2:property:target-temperature:00000021:deerma-jsq3:1","description":"Target Temperature","format":"float","access":["read","write","notify"],"unit":"celsius","value-range":[16,32,1]}]},{"iid":3,"type":"urn:miot-spec-v2:service:environment:0000780A:deerma-jsq3:1","description":"Environment","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:relative-humidity:0000000C:deerma-jsq3:1","description":"Relative Humidity","format":"uint8","access":["read","notify"],"unit":"percentage","value-range":[0,100,1]},{"iid":7,"type":"urn:miot-spec-v2:property:temperature:00000020:deerma-jsq3:1","description":"Temperature","format":"int8","access":["read","notify"],"unit":"celsius","value-range":[-30,100,1]}]},{"iid":5,"type":"urn:miot-spec-v2:service:alarm:00007804:deerma-jsq3:1","description":"Alarm","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:alarm:00000012:deerma-jsq3:1","description":"Alarm","format":"bool","access":["read","write","notify"]}]},{"iid":6,"type":"urn:miot-spec-v2:service:indicator-light:00007803:deerma-jsq3:1","description":"Indicator Light","properties":[{"iid":1,"type":"urn:miot-spec-v2:property:on:00000006:deerma-jsq3:1","description":"Switch Status","format":"bool","access":["read","write","notify"]}]},{"iid":7,"type":"urn:deerma-spec:service:custom:00007801:deerma-jsq3:1","description":"custom","properties":[{"iid":1,"type":"urn:deerma-spec:property:water-shortage-fault:00000001:deerma-jsq3:1","description":"water-shortage-fault","format":"bool","access":["read","notify"],"unit":"none"},{"iid":2,"type":"urn:deerma-spec:property:the-tank-filed:00000002:deerma-jsq3:1","description":"the-tank-filed","format":"bool","access":["read","notify"],"unit":"none"}],"events":[{"iid":1,"type":"urn:deerma-spec:event:lack-of-water:00005001:deerma-jsq3:1","description":"lack-of-water","arguments":[1]},{"iid":2,"type":"urn:deerma-spec:event:bring-water-tank:00005002:deerma-jsq3:1","description":"bring-water-tank","arguments":[2]}]}]}

al-one commented 3 years ago

You can try https://github.com/al-one/hass-xiaomi-miot for HomeAssistant.

tam-wh commented 3 years ago

You can try https://github.com/al-one/hass-xiaomi-miot for HomeAssistant.

Looks good! I will have a try. thanks