Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Posibillity for local push instead of poll? #638

Closed
starkillerOG opened this issue Feb 23, 2020 · 2 comments
Closed

Posibillity for local push instead of poll? #638

starkillerOG opened this issue Feb 23, 2020 · 2 comments

Comments

@starkillerOG
Copy link
Contributor

I was looking into if the Xiaomi miio protecol support push notifications instead of having to poll the devices all the time.
I found this document: https://www.yeelight.com/download/Yeelight_Inter-Operation_Spec.pdf

Which states at the very bottom:

4.3NOTIFICATION message
Whenever there is state change of smart LED, it will send a notification message to all connected 3rdparty devices. This is to make sure all 3rdparty devices will get the latest state of the smart LED in time without having to poll the status from time to time.

The notification messages schould look something like this acording to that document:

NOTIFY * HTTP/1.1
Host: 239.255.255.250:1982
Cache-Control: max-age=3600
Location: yeelight://192.168.1.239:55443
NTS: ssdp:alive
Server: POSIX, UPnP/1.0 YGLC/1
id: 0x000000000015243f
model: color
fw_ver: 18
support: get_prop set_default set_power toggle set_bright start_cf stop_cf set_scene cron_add cron_get cron_del set_ct_abx set_rgb
power: on
bright: 100
color_mode: 2
ct: 4000
rgb: 16711680
hue: 100
sat: 35
name: my_bulb

It looks like it is possible to get status notification pushes through this protecoll at least for yeelight bulbs.
I do not own yeelight bulbs, but do have a xiaomi gateway, it might be that the gateway also supports this same protecoll....
Would be awesom if someone could figure this out. Probably someone who owns a yeelight bulb to see if it works with that occording to this documentation, if so then maybe also look at diffrent devices.

Yust posting it for documentation and future refrence

@rezmus
Copy link

rezmus commented Feb 24, 2020

it's dev/lan mode for yeelight devices. old mi zigbee hub (lumi.gateway.v3) have something similar, but different api. all other devices notify to cloud only.

@starkillerOG
Copy link
Contributor Author

@rezmus thanks for clearing that up!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants