Twinkly christmas lights integration

(Ben) #1

Hi All,
I’m not sure if anyone else has considered this yet. I recently purchased some smart christmas tree lights from ‘Twinkly’, and find them fascinating. ( ) They are wifi enabled, and have built-in control via an Android or Apple app. They’re available at Home Depot, Best Buy, Target, Amazon, etc (depending on which country you’re in).

I imagine you could have a variety of scenarios where incorporating them into Openhab could be nice: A colorful kid-friendly progam until the kids bedtime, then a more sedate program, changing colour when a door/gate is unlocked, changing light colour/program with temperature/humidity/time of day /etc.

It seems there are two potential routes for controlling them:

  1. Via Google Assistant:

  2. Via HTTP, through an informal API documentation such as:

Has anyone explored this yet? Any suggestions as to which path would be the most efficient?

Cheers, and thanks!

(Angelos) #2

I would say: HTTP Binding with JSON payloads. Search the forum for this setup. There are several examples.

For example:

You may face a problem with the authentication_token… check how the python command line script handles this.

An alternative would be the Exec Binding calling the python. Actually… I would try this first.

(Andy Swing) #3

Looks like newer firmware might even support MQTT, which should be very easy to integrate with:

I haven’t tried it yet, but I’d imagine you could simply set the MQTT broker to your own instead of the default.

(Pavol Babinčák) #4

Yep, it is pretty much possible to set your own broker and control the lights. Although control MQTT is rather limited compared to rest API.

(Ben) #5

Thanks so much to you three - I’m hoping to set some time aside after the 2.4 stable gets released to hopefully chip away at this (there’s some learning needed, so I may start with the MQTT approach and then further refine it afterwards).