vroy / python-sengled-client

A simple Python client to control Sengled [light] accessories.
MIT License
23 stars 4 forks source link

Sunrise/Sunset reprogramming for Sengled Hub #1

Open sonofeft opened 4 years ago

sonofeft commented 4 years ago

Thanks so much for your project. Can you provide an example for reprogramming the light schedule on the hub? I was hoping to use your library for periodic, automated updates of the hub lighting schedule. Is that possible, or are only simple on/off commands available? Thanks again.

vroy commented 4 years ago

That's not a supported feature of this library at the moment, only on-off commands along with setting properties of specific lamp devices.

I welcome improvements and pull requests if you manage to figure it out. If I have some free time I'll see if I can dig up what the APIs are.

sonofeft commented 4 years ago

thank you, My fall-back was to run a Raspberry Pi to send on/off commands every day. If you can direct me to the source for the api, perhaps I can also do some digging.

vroy commented 4 years ago

I was unfortunately unable to find any resources on the source of the API. This was reverse engineered from multiple different repositories found on GitHub as well as Charles.app and some guessing. See also:

https://github.com/j796160836/homebridge-sengled/ https://github.com/mpomery/sengled-element-postman/blob/master/Sengled%20Element%20API.postman_collection.json https://github.com/sroehl/sengled-python https://github.com/AHerridge/BetterSengled/blob/master/device.py https://github.com/NoxPhoenix/noxbot/blob/68281bac10aa6a939f617d1ba148944338566491/clients/sengledClient.js