Jump to content

Welcome, Guest!

Be a part of CinemaVision today! Once registered and logged in, you will have access to public chat and your own private messenger, you can view and contribute guides, collaborate on the forums, review downloads, give reputation to your fellow members, contribute content and so much more. Registering is quick and completely free, so what are you waiting for?
   Sign In    Sign Up

Become a RedCarpet Club Member Today!

   Join Now
  • 0

[TIP] Sengled smart bulb support


Thought I'd add this as a tip here as I found a supporting github repo recently and was able to get some nice python scripts going.


So I use mainly Sengled brand smart bulbs in my house including their own Zigbee based hub as they have historically been cheap and easy to acquire from a number of retailers including Amazon as well as local brick-and-mortars like Microcenter and Home Depot in my neck of the woods. However using their own hub means there's no stock 'integration' or API options outside of their own app or Alexa/Google Home.

Found a GitHub repo that provides a very clean 'API' of sorts for Sengled products that goes through their web servers and doesn't require migrating to a third party hub.


Here's a quick and dirty sample python script I wrote using this. It is largely using the examples right on the github page. REALLY easy to read and understand.

import sengled

api = sengled.api(
    # The username/password that you used to create your mobile account in
    # the Sengled Home app.

    # Optional path to persist the session across multiple process
    # starts and reduce the number of logins.

    # Prints details of the api request/responses when True, defaults to false.

api.find_by_id("ABCDEF1234567890") \
.on() \
.set_brightness(100) \
.set_brightness(95) \
.set_brightness(90) \
.set_brightness(85) \
.set_brightness(80) \
.set_brightness(75) \
.set_brightness(70) \
.set_brightness(65) \
.set_brightness(60) \
.set_brightness(55) \
.set_brightness(50) \
.set_brightness(45) \
.set_brightness(40) \
.set_brightness(35) \
.set_brightness(30) \
.set_brightness(25) \
.set_brightness(20) \
.set_brightness(15) \
.set_brightness(10) \
.set_brightness(5) \
.set_brightness(4) \
.set_brightness(3) \

Which basically just makes sure the selected bulbs/groups are brought up to 100% and slowly dims down to 1%. It also supports their smart plugs and color changing bulbs in addition to the barebones single color/temp dimmable bulbs.

  • Like 1

Share this post

Link to post
Share on other sites

0 answers to this question

Recommended Posts

There have been no answers to this question yet

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...

Important Information

By using this site, you agree to our Guidelines and Terms of Use.