Open daznik opened 7 years ago
I'm also want to see this device supported. Plan to buy if it will be controlled somehow.
It could be controlled by miio already. miio --control 57992992 --method set_mode --params '[“toggle”]' and etc…
Thank you for the detailed information! This looks pretty similar to some other lights so basic support shouldn't be too hard to add. Pull requests welcome!
I'd be glad to help, but I'm not a software programmer so unfortunately no help from me there. Here the script I'm using: https://pastebin.com/XdKEcZTy If it helps somehow.
after
miio configure id-or-address --ssid network-ssid --passwd network-password
prints 'Error: Failed updating wireless' but goes to new network and changes token.
I can't understand how to get valid token.
Hi there, At first lamp:
I've got some data for this lamp. At first I've tried to capture packets but couldn't get any data using miio -- json-dump, data always was N/A. The lamp itself descovered by miio --discover, but with no token. ( I got it with resetting device and also compared it with the one in android). I've tried different capture methods, using wireshark with android emulator, wireshark with remote tcpdump from my router, wireshark with arpspoofing lamp and phone with mihome app but no luck. I see the packets (udp port 54321) but they all goes through xiaomi cloud and this data couldn't be used with miio --json-dump .(always N/A) So I first created rules to control lamp via xiaomi button (via xiaomi gateway), blocked internet access to them (lamp and gateway) so I couldn't use them via mihome app, it says that devices disconnected, and only after when I pressed button i see packets flowing from gateway to lamp and finnaly they could be read by miio --json dump and I got the data :))) then I just enabled internet, created new rules, disconnect them, capture... few times. So what I've got:
miio --inspect INFO Attempting to inspect 57992992 Device ID: 57992992 Model info: philips.light.ceiling (generic) Address: #### Token: #### via stored token Support: At least basic
Firmware version: 1.4.5 Hardware version: MTK7697 MCU firmware version: 0027
WiFi: ##### RSSI: -47 WiFi firmware version: 4.0.0
Remote access (Mi Home App): Maybe
Turn on/off light data= {"method":"set_power","params":["on"],"from":"nbl.52273049","id":108981800} data= {"method":"set_power","params":["off"],"from":"nbl.52273049","id":108981800}
Toggle on/off data= {"method":"toggle","params":[],"from":"nbl.52273049","id":105969770}
Increase/Decrease Brightness data= {"method":"auto_bri_inc","params":[],"from":"nbl.52273049","id":107126017} data= {"method":"auto_bri_dec","params":[],"from":"nbl.52273049","id":107126017}
Increase/Descrease Color Temperature data= {"method":"auto_cct_inc","params":[],"from":"nbl.52273049","id":107126037} data= {"method":"auto_cct_dec","params":[],"from":"nbl.52273049","id":107126037}
Set Brightness + ColorTemp (0-100, 0-100; Where 0,0 - "Center night light mode") data= {"method":"set_bricct","params":[10,10],"from":"nbl.52273049","id":107131875}
Set Fixed Scene (Scenes 1-4) data= {"method":"apply_fixed_scene","params":[4],"from":"nbl.52273049","id":105954042}
Switch between fixed Scenes (only 3 of four) data= {"method":"switch_the_scene","params":[],"from":"nbl.52273049","id":105962452}
Reply data= {"result":["ok"],"id":105965605}
Maybe this info helpul for you and you could support for this device.