Replies: 5 comments
-
That's great! So you managed to connect Home Assistant with the lights, not by using the mqtt protocol (as I got the impression was intended for this, but seems very limited) but by instead using the python interface of xled and xled_plus! This is nice, and opens up for many possibilities. Some notes on your candy cane effect: If you use the class You say that there was an error message after a couple of uploaded movies. The call to launch_movie is supposed to delete previous movies itself when needed. What was the error message? When it is full here (after I disable the deleting and try to upload), it says: "requests.exceptions.HTTPError: 406 Client Error: Not Acceptable for url: http://192.168.10.101/xled/v1/movies/new" And yes, since some firmware versions back (2.5.6 I would guess but have not checked) the leds make flickers and flashes when a movie is uploaded. I agree its annoying, it was better before. Sure, setting mode to "off" gets rid of this. Supposedly it is harmless though. (And the call to |
Beta Was this translation helpful? Give feedback.
-
Yes, I'm fairly sure the 406 error was the one. I just went back and re-ran a number of your daily effects examples and some my own modified effects (without the delete_movies line I added) and it seems not to be erroring out now. I'm wondering if my controller was in a bad state? It's been unplugged and plugged back in a couple times over the season, so it might have been coincidence. If I run across it again, I'll try to document better and submit a proper issue report. For the flashing, I'm sure it's harmless, but I think I'll continue to switch it off (or maybe try lowering brightness to the minimum) while loading, as I just don't like to see the flashing. I like the gradient effect for this one, mainly because it's "calmer" and the tree sits off to the side of our view of the tv in the living room, so anything too lively becomes distracting when we're trying to watch tv. I like the sparkly and other lively kinds of effects too, but for something I'll probably keep running most of the time this year, a calmer one is better. There's a lot of different ways to communicate to and from Home Assistant, MQTT is a popular one, the REST api is another. I went with simple shell commands, just to be able to get something into the ui fast and that will be easy for me (and my wife) to use day-to-day. I really didn't need it to be a two-way communication, but that would be an eventual goal. Last year I got as far as using xled's set_color command to choose solid colors for it in the UI (that's the left-most block in the screenshot above, top slider is tree brightness (using the official Twinkly integration for Home Assistant which only supports on/off & brightness), then R,G,B sliders, then another brightness slider for the star (which is a dimmable bulb totally separate from the xled/twinkly stuff). Then I picked some colors we liked and made preset buttons for them so we didn't have to use the sliders to dial them in every time. We had to go back into the Twinkly app to use any animations, which, as you know, is not the greatest app ever ;-), so having these new animations all available in Home Assistant has been wonderful for us! |
Beta Was this translation helpful? Give feedback.
-
Hi, @gonzotek |
Beta Was this translation helpful? Give feedback.
-
Oh, absolutely! If I come up with any other ones I think are worth sharing, you're more than welcome to include anything I put up. |
Beta Was this translation helpful? Give feedback.
-
Great! |
Beta Was this translation helpful? Give feedback.
-
I've created my first effect (based quite largely on the Day 11 gradient example).
Note the section after setup_control doesn't appear in any of the given examples. I was finding that after running launch_movie() four or five times consecutively without using delete_movies was causing the lights set to return an error code. Also, the tree would flash oddly as the effect was transferred. I found that turning it off, then deleting the movies seemed to eliminate both issues. There's probably better ways to go about this, but it works for me :-)
My setup is a python 3 venv for xled_plus, and a separate directory of each effect I want available in individual {effect_name}.py files, then I call them from a shell script like so:
I have all of the effects tied to buttons in Home Assistant(note: everything in the "Christmas Tree" and "Favorite Colors" sections are from last year, and don't use any xled_plus code. I'm planning to eventually update them as I have time):

Each button calls a Home Assistant shell_command service that then runs the script with the various effects:
Lovelace YAML code for a custom button:
YAML Home Assistant configuration for the shell command:
End result(the reds look much better/more saturated in person, and the animation is a nice diagonal swooping of the red/white gradient):

Beta Was this translation helpful? Give feedback.
All reactions