Virtual devices / user input capture

Posted on
Mon Dec 10, 2018 2:07 pm
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Virtual devices / user input capture

Hi all, Happy Monday :)

I am working on installing a bunch of WS2812B individually addressable LED strips on my house for year round holiday / event lighting. I am basing my solution off several DIYers I follow on youtube. Basically the solution is driven by a NodeMCU pre-programed with a bunch of lighting patterns and the ability to control things like RGB values, brightness, pattern, and on/off state via sending MQTT messages to the NodeMCU. The original solution leverages Home Assistant MQTT lighting controls to interface with the NodeMCU via MQTT. I have this all set up and it works great, but I would like to pull the system into Indigo and eliminate the need to use Home Assistant for control.

I created a virtual on/off device in Indigo and used embedded python scripts to send the MQTT on/off messages which is working great. I would like to do something similar to account for allowing the user to set the pattern, brightness, and RGB values. Is there any way to create virtual devices, or control page entities that allow a user to select options from a drop down (patterns), use a slider to select a brightness value, or a color picker to chose RGB values? If all these virtual devices did was allow for the user selected or inputed values to populate a variable, I could trigger off the variable change and use the embedded python approach to send the necessary MQTT updates to the NodeMCU.

Maybe someone has a better idea how to attack this, would love suggestions. Thanks!
-Eric

Posted on
Thu Dec 27, 2018 9:12 am
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Re: Virtual devices / user input capture

Hmm, so nobody has done something like this? I guess everyone using Indigo with RGB LEDs is using a zwave LED controller?

Posted on
Thu Dec 27, 2018 9:40 am
RogueProeliator offline
User avatar
Posts: 2243
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Virtual devices / user input capture

Hmm, so nobody has done something like this? I guess everyone using Indigo with RGB LEDs is using a zwave LED controller?

Prior to the holidays I had asked a similar question - just what people were using for LED strips for holidays more so than asking about your particular setup. It didn't really elicit any responses from people who had actually implemented this. SURELY some have done so, but perhaps they aren't active in the forums.

Adam

Posted on
Thu Dec 27, 2018 10:16 am
DaveL17 offline
User avatar
Posts: 4991
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Virtual devices / user input capture

Is there any way to create virtual devices, or control page entities that allow a user to select options from a drop down (patterns), use a slider to select a brightness value, or a color picker to chose RGB values?


There is no way to do this within Indigo natively that I'm aware of, and Indigo control pages aren't really equipped to do such things. What I think would probably be the best bet would be to create something outside Indigo that's linked to the Restful API. One thing I've done is to create a fake slider which is an image linked to 10 different "invisible" controls that simulate 10 percent increments of a dimmer device. It's a fair proxy, but I don't think it's what you're after.

You might be able to write a plugin for the Indigo Web Server, but I don't know what would be involved with that. I suspect that it's not that straightforward (and may in fact not be possible) or someone would have written something like it by now.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Thu Dec 27, 2018 11:54 am
jay (support) offline
Site Admin
User avatar
Posts: 15678
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Virtual devices / user input capture

DaveL17 wrote:
You might be able to write a plugin for the Indigo Web Server, but I don't know what would be involved with that. I suspect that it's not that straightforward (and may in fact not be possible) or someone would have written something like it by now.


IWS plugins don't change how pages are rendered nor can they add control UI to existing pages. It's possible that you could write one that could implement a slider on it's own page (then you link to that page) but you can't embed it into a standard page. And the IWS page would only be usable on Indigo Touch for the Web since Indigo Touch for iOS doesn't render HTML.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Thu Dec 27, 2018 5:11 pm
virgahyatt offline
Posts: 126
Joined: Jan 11, 2014

Re: Virtual devices / user input capture

instead of a slider or drop down you could have a text box display the current value (based on a variable). Then have up and down buttons for each desired input which could cycle through the desired values.

Not ideal but possible.

Posted on
Thu Dec 27, 2018 6:25 pm
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Re: Virtual devices / user input capture

virgahyatt wrote:
instead of a slider or drop down you could have a text box display the current value (based on a variable). Then have up and down buttons for each desired input which could cycle through the desired values.

Not ideal but possible.


hmm, I could see that working for the brightness value. Display the current value of the brightness variable, then have an up button that writes variable+increment value back to the variable and then sends the new value via MQTT to the controller. That would be pretty easy to do with an embedded python script. As far as the patterns go, I guess I could just have each one listed on a control page and toggle them on/off that way, but thats not a very clean UI experience.... The biggest issue is still the color picker, I guess I could pick a small set of colors, and use the same approach as the patterns, but that would severely limit color options and make the control page even worse.

Thanks for the idea!

-Eric

Posted on
Thu Dec 27, 2018 6:33 pm
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Re: Virtual devices / user input capture

RogueProeliator wrote:
Hmm, so nobody has done something like this? I guess everyone using Indigo with RGB LEDs is using a zwave LED controller?

Prior to the holidays I had asked a similar question - just what people were using for LED strips for holidays more so than asking about your particular setup. It didn't really elicit any responses from people who had actually implemented this. SURELY some have done so, but perhaps they aren't active in the forums.

Adam


So I ended up using the ESPixelStick firmware on my nodeMCUs and ran Falcon player on a Raspberry pi. This works great for running light animations for holiday shows. I used the xLights software (which is free) to create the animation files for the Falcon player to play. The ESPixelStick firmware supports MQTT providing basic control of the LED's when not running the holiday shows from the Falcon player. I did end up setting up an On/Off virtual device in Indigo to kick things off, but am still using home assistant for fine control of the LEDs (brightness, colors, etc).

-Eric

Posted on
Fri Dec 28, 2018 8:46 am
siclark offline
Posts: 908
Joined: Jun 13, 2017
Location: UK

Virtual devices / user input capture

I'm going to be getting led strips for my garden redesign in the spring and has never heard of these ws2812b strips but they look amazing. Think this is what I need then to spend a lot of time on YouTube to work out how to use them.

Thanks for helping me find them. Will be reaching out on ideas on controlling on/off work indigo closer to the time!!


Sent from my iPhone using Tapatalk

Posted on
Fri Dec 28, 2018 12:56 pm
RogueProeliator offline
User avatar
Posts: 2243
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Virtual devices / user input capture

So I ended up using the ESPixelStick firmware on my nodeMCUs and ran Falcon player on a Raspberry pi. This works great for running light animations for holiday shows. I used the xLights software (which is free) to create the animation files for the Falcon player to play. The ESPixelStick firmware supports MQTT providing basic control of the LED's when not running the holiday shows from the Falcon player. I did end up setting up an On/Off virtual device in Indigo to kick things off, but am still using home assistant for fine control of the LEDs (brightness, colors, etc).

How/where are you mounting the LEDs? If I ever go this route, I haven't figured out if I would mount them under the eave or directly-viewable (on the rain gutters, I guess?) or what. I worry direct-viewable might be to harsh/bright but perhaps with the proper settings this is a non-issue?

Thanks!
Adam

Posted on
Fri Dec 28, 2018 2:09 pm
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Re: Virtual devices / user input capture

RogueProeliator wrote:
So I ended up using the ESPixelStick firmware on my nodeMCUs and ran Falcon player on a Raspberry pi. This works great for running light animations for holiday shows. I used the xLights software (which is free) to create the animation files for the Falcon player to play. The ESPixelStick firmware supports MQTT providing basic control of the LED's when not running the holiday shows from the Falcon player. I did end up setting up an On/Off virtual device in Indigo to kick things off, but am still using home assistant for fine control of the LEDs (brightness, colors, etc).

How/where are you mounting the LEDs? If I ever go this route, I haven't figured out if I would mount them under the eave or directly-viewable (on the rain gutters, I guess?) or what. I worry direct-viewable might be to harsh/bright but perhaps with the proper settings this is a non-issue?

Thanks!
Adam


I decided to install the LED strips into aluminum channel with a plastic light defuser cover. The ones I am using look like a piece of white quarter round when the lights are off. I mounted the aluminum channel to the bottom outer edge of the soffit, below the gutters but not attached to them. You can get the quarter round type or they also have a flat channel, I chose these (https://www.amazon.com/gp/product/B07F6 ... UTF8&psc=1) because I could run power injection wires in the cavity behind the strips. I have to say, they look great at night, the defusers do the trick, and if you didn't know they where up there, you would never see them during the day.

I'll try to get some pictures of my set up and post them, but its pretty similar to this guys (https://www.youtube.com/watch?v=_UiqrnR ... 8q8TkA2B8m), he uses the flat aluminum channels and hot glues the power injection wires next to the LED strips, I found this a bit tedious which is why I switched to the V shaped channels.

-Eric

Posted on
Fri Dec 28, 2018 2:14 pm
RogueProeliator offline
User avatar
Posts: 2243
Joined: Nov 13, 2012
Location: Baton Rouge, LA

Re: Virtual devices / user input capture

I'll try to get some pictures of my set up and post them, but its pretty similar to this guys (https://www.youtube.com/watch?v=_UiqrnR ... 8q8TkA2B8m), he uses the flat aluminum channels and hot glues the power injection wires next to the LED strips, I found this a bit tedious which is why I switched to the V shaped channels.

That looks like a nice setup - thanks for sharing. Would love to see some pics if you get the time (installed and/or the look at night lit up) -- this sounds exactly like the setup I was after.

Posted on
Fri Dec 28, 2018 4:48 pm
siclark offline
Posts: 908
Joined: Jun 13, 2017
Location: UK

Virtual devices / user input capture

Ok. Wow. Thais for that link. The hardware part and wiring I think I might now be capable of, but the software?? WAAAAAY over my head.
Think might be leaving this for a while!!


Sent from my iPhone using Tapatalk

Posted on
Fri Dec 28, 2018 6:58 pm
BonfireVA offline
Posts: 56
Joined: Sep 17, 2017

Re: Virtual devices / user input capture

siclark wrote:
Ok. Wow. Thais for that link. The hardware part and wiring I think I might now be capable of, but the software?? WAAAAAY over my head.
Think might be leaving this for a while!!


Sent from my iPhone using Tapatalk


Honestly the software part is pretty easy, mostly just copy and paste and update a few variable like your Wifi / MQTT credentials. Rob from the Hook up actually recently published a 2.0 version of his firmware for the NodeMCU, its organized a lot better and the variable you need to update are very obvious, it also does not rely on Node Red. I like Node Red, but if you have never used it, the new firmware will simplify things a bit. Unfortunately since there is not really any support for the MQTT lights in Indigo, you would need to still use Home Assistant. I run HA in a docker container on my Mac Pro running Indigo, I mostly use it for tinkering so I can keep Indigo strictly for day to day stuff, but if you don't have a HA install, that also adds complexity to the project....

The part that I am finding the most difficult is the actual installation. I still have not decided if its easier to mount the aluminum channel to the house first, then attach and wire the led strips while up on the ladder, or to pre-build them and put them up on the house in one piece. The last piece I did was about 25ft long, I pre-built/wired it in the house and had my wife and two of my kids holding sections of the aluminum channel up with 2x4's with screws in the ends to stop the lights from falling off so they could raise the long section "evenly" while I climbed the ladder to secure it.... I imagine if any of my neighbors were watching they had a good laugh at the many colorful expressions I may have uttered during this process ;)

Cheers,
-Eric

Posted on
Fri Dec 28, 2018 7:41 pm
DaveL17 offline
User avatar
Posts: 4991
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Virtual devices / user input capture

BonfireVA wrote:
I imagine if any of my neighbors were watching they had a good laugh at the many colorful expressions I may have uttered during this process ;)

Cheers,
-Eric

That's me every Christmas.

It's oddly comforting to know that part is still the same. :D

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Who is online

Users browsing this forum: No registered users and 0 guests