rytilahti / python-miio

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

xiaomi.aircondition.ma1 Support #743

Open anhnvme opened 4 years ago

anhnvme commented 4 years ago

Hello,

I'm tried dump all prop at this device, please check if it can support anything for you

"params":["power","settemp","mode","wind_percent","swing"]}
"result": [0, 24, 2, 101, 0]
"params":["energysave","light","beep","clean","wind_level"]}
"result": [0, 0, 1, "0,0,0,1", 0]
"params":["auxheat","dry","timer","sleep","temperature"]}
"result": [0, 0, "0,0,0,0", 0, 32]
"params":["examine"]}
"result": ["0,0,'none'"]

Thanks

anhnvme commented 4 years ago

Update xiaomi Spec: http://miot-spec.org/miot-spec-v2/instance?type=urn:miot-spec-v2:device:air-conditioner:0000A004:xiaomi-ma1:1

rezmus commented 4 years ago

spec is useless here, because it does not use miot.

anhnvme commented 4 years ago

spec is useless here, because it does not use miot.

yes, it's use miio man

[root@lab homeassistant]# miiocli device --ip xxxxx --token xxxxx info Model: xiaomi.aircondition.ma1 Hardware version: esp32 Firmware version: 2.0.9 Network: {'localIp': 'xxxxx', 'mask': '255.255.255.0', 'gw': 'xxxxxxxx'} AP: {'ssid': 'xxxxxxxx', 'bssid': 'xxxxxxxxx', 'rssi': -39, 'primary': 4}

anhnvme commented 4 years ago

[root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["power"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["settemp"]' Running command raw_command [24.0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["mode"]' Running command raw_command [2] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["wind_percent"]' Running command raw_command [101] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["swing"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["energysave"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["light"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["beep"]' Running command raw_command [1] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["clean"]' Running command raw_command ['0,0,0,1'] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["wind_level"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["auxheat"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["dry"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["timer"]' Running command raw_command ['0,0,0,0'] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["sleep"]' Running command raw_command [0] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["temperature"]' Running command raw_command [32] [root@lab homeassistant]# miiocli device --ip ip --token token raw_command get_prop '["examine"]' Running command raw_command ["0,0,'none'"]

Request dump by miio_cli

rytilahti commented 4 years ago

Feel free to create a PR and ask for any help you need for that :-) It is useful to find out how many properties can be requested at once to optimize it, other than that adding support should be pretty straightforward.

anhnvme commented 2 years ago

It's over year but i still need support this device. how can i help to add it ?