rytilahti / python-miio

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

Support for Xiaomi Xiao AI Smart Alarm Clock (zimi.clock.myk01) #505

Closed fr00kt closed 5 years ago

fr00kt commented 5 years ago

WARNING:miio.discovery:Found unsupported device zimi-clock-myk01_miio257384045._miio._udp.local. at xxx.xxx.xxx.xxx, please report to developers

rytilahti commented 5 years ago

Could you provide information about the available commands etc. See https://github.com/aholstenson/miio/blob/master/docs/missing-devices.md for information how to extract this.

rytilahti commented 5 years ago

I have now such a device myself, and I have began implementing this, but it will take some time to do it properly.

rezmus commented 5 years ago

us version of this clock is coming soon, including alexa support.

https://www.zmiusa.com/pages/zmihome-sf-companion-ai-alarm-clock

KVinS commented 3 months ago

@rytilahti, in the end support was not added? I don't see the file in the master branch. I would like to use this as an alarm (melody + button) in Home Assistant. (And I need a BT Gateway near the bed.)

rytilahti commented 3 months ago

The file is here https://github.com/rytilahti/python-miio/blob/master/miio/integrations/zimi/clock/alarmclock.py but it wasn't never really fully implemented. Note that this specific device was replaced by some other product years ago, so it's unlikely you can get this device anywhere even if you wanted to..

LittleChest commented 3 weeks ago

Will we ever actually add it? It's a very specific type of device.

I want to keep its screen off all the time (by adjusting night mode) to save power and use it as a speaker and mesh gateway.

rytilahti commented 3 weeks ago

This issue has been closed for years, but if you take a look into the linked source, you can find the command to adjust the night mode & just use miiocli device raw_command to adjust it.

If you want to contribute, feel free to submit a PR to implement the command.

LittleChest commented 2 weeks ago

This issue has been closed for years, but if you take a look into the linked source, you can find the command to adjust the night mode & just use miiocli device raw_command to adjust it.

If you want to contribute, feel free to submit a PR to implement the command.

root@localhost:~# miiocli device --ip 172.16.0.109 --token PRIVATE raw_command "{"id":248,"method":"set_night_mode","params":[1,"11:00","10:00"]}"
Running command raw_command
ERROR:miio.miioprotocol:Got error when receiving: timed out
Error: No response from the device
rytilahti commented 2 weeks ago

The raw command expects the command and its parameters separately, so you could try something like miiocli device --ip 172.16.0.109 --token PRIVATE raw_command set_night_mode '[1,"11:00","10:00"]'.