Posts by Jbrown705

    Ok, so rather than drag out this thread with a lot of back and forth, D34DC3N73R and I PM'd and he was gracious enough to spend about 2 hours with me helping to get this working as I wanted. For those of you who've found this thread, here is what we ended up doing. He wrote a script for my (in this thread) that toggle between the Ambilight (V4L) and just white lights (on is the screen match off is the white lights). This also created a switch within HA that I control via and automation. We found out that the Home Assistant/SmartThings native integration keeps the switches in sync between the 2 systems already. So I created a virtual device in ST's that shows up in HA because of that integration then i use an automation that triggers the Ambilight switch based on the virtual switch state. I did it this way because i wanted to assign the Home Control buttons on the Harmony Elite to allow me to toggle between Ambilight and White lights as well as turn those lights on and off with an activity. I use 2 virtual switches to do this. One simply turns on and off with an activity (this is setup within the Harmony activity and uses ST). This give me the lights on/lights off control. Next i assigned the virtual switch to the Home Control buttons on the remote. After that I set up an automation that is triggered by those 2 virtual switch and tells HA to turn on and off the Hyperion lights and toggle between the 2 desired effects. Hyperion has a native integration with HA but not ST's so this is why I had to do it this way.

    Hope this helps someone in the future. A HUGE thank you to D34DC3N73R for his help on this for not only Hyperion but also HA. If anyone finds this is needs help I am happy to try to pay it forward and answer any question about this.


    I also run HA in docker. Your configuration.yaml file will probably be in /mnt/user/appdata/home-assistant/configuration.yaml or something similar. It's wherever you store docker application data. You can check by clicking edit on the container and you'll see what path is mounted to /config. You could even edit using container console in which case it would be /config/configuration.yaml, although I don't believe nano is part of the home assistant container. Vi is installed in the container if you're familiar with that editor. It's probably easier to figure out where the application data is stored and just ssh into your unraid box and use nano /mnt/user/appdata/home-assistant/configuration.yaml

    Side note, if you do want a file editor for HA, it's entirely possible, you just have to run a separate container and integrate it manually. I use a VS Code container and it works great

    I found a configuration editor, but there wasn't much in my configuration.yaml file. What was originally in there was in the red dotted square and then i added what sent me below. Is that correct? I didn't see any section for Booleans already outlined, etc.

    I haven't really seen an input boolean used that way in an automation. It's possible that it could work. But I've only ever used them in conjunction with template switches. Which you could do if you converted those from automations to scripts. Where ambilight_on would turn on solid white LEDs, and ambilight_off would turn on the V4L effect. You may want to use a different naming scheme if you plan to make one that actually turns off Hyperion. I haven't tested this, but I think it would go something like this:

    edit: tested and should be working now.

    In configuration.yaml

    I am not sure where to edit this. I see where scripts are in HA, but as i read up on HA i am seeing there are what appear to be different flavors? and Home Assistant. I run HA in a docker on my Unraid box. I was trying to install the File Editor for HA but it said it was in the Add Ons Store and i don't have that. I am sure i can edit it using nano or something in the docker, but does it matter where I put this in the config file?

    I believe the effects are case-sensitive. Try Solid instead of solid.

    I noticed that too and changed it. I think one of the commands make have caused an issue with the Pi, but after rebooting, it seems to be working now. However, when I toggle the Boolean toggle, nothing happens, but when it does work when I manually trigger in the automation section. Can i use that Boolean toggle to switch between those to effects? It seemed like i could using the turn on for each instead if of a turn off, i just needed to make the To: sections different (On / Off).

    I am kind of there... I made a Boolean switch that I'm trying to make a simple toggle between White and V4L. If I hit run on the V4L one (Ambilight On) it works, but when I run the other one (to trigger for only white lights) it doesn't. Do these look right? Once these work, I can make another one that turns all lights off.


    *Edit... For some reason the V4L will no longer work. Not just the automation, but also from with the switch itself in HA. All the colors still work as so the effects. I can only get the V4L if I do it under the remote control section of Hyperion now.

    Can I make white, V4L and off each a separate button in HA? My hope is that if so, I can link it to a SmartThings virtual switch and since ST integrates with Harmony remotes, I can just turn that button on and off with an activity and program it to a button.

    Where do I put this code? In the developer tools somewhere? Where do you find the info on how to call these functions from the individual integrations? I’m trying to read thru the instructions in the HA help but it’s not clear to me. I think once I’ve done one I’ll be able to do more.

    Thank you!!

    This is the sketch I use on the nano. Just change the number of LEDs, and make sure the baudrate matches in hyperion settings.

    I started off using this video as a guide.

    Ok, I messed around with some stuff and I think I have gotten a more reliable setup, but still need to incorporate the arduino. I was able to get things working well by increasing the size of the wire i used to run from the media cabinet to the TV. I also increased my power supply to 20a and run the power for the raspberry pi and leds power from it using the larger wires. No cap, no resistor yet. Using this setup the HA integration. seems to work to let me toggle between a solid color and the USB capture card. So I am making some progress... Now if i can figure out how to make the default just white then i manually turn on the usb i would have at least accomplished the basic setup of what i was doing but in the hyperion ui doesn't let me set the solid color/effect at a lower priority # than the USB.

    Do I only need to run a wire from the pin 6 on the Arduino to the data wire on the leds then plug the arduino in via USB to the pi3?

    It's in adafruit's best practices for neopixels. This answer goes into a bit more detail.

    I keep my power supply on the floor and run power up through the wall, but in that instance, I run 10 AWG wires to a distribution block, and 20 AWG to all corners. I'm not sure how thick or long your wires are, but keep in mind that it's best to use thicker wires if you have a longer distance to travel. So maybe run some thicker 5v + ground wires and split those to the front and back of the LEDs behind the TV.

    It may be worth trying out a longer USB cable for the nano. That way you could keep the data wire short and just mount the nano behind the TV. Assuming you power the pi with the same power supply as the LEDs. If that's not possible, I'm not exactly sure how long the data wire can be off of a nano. I guess you won't know until you try.

    Edit: adafruit best practices also say data at 1-2 meters is usually fine.

    Man, I’m pushing that limit. I’ll give it a shot. I have some large wire coming to try to reduce resistance and increase the flow to behind the tv. I’ll wait to try all this until arrives on Tuesday or Wednesday so if I disappear for a couple days that is why. I’ll report back once I can test the new wire paired with the nano. In the mean time I’ll work on flashing the nano and getting it working first so Im not trying 2 new components at once. Easier to troubleshoot.

    Thanks again for all you’re help so far!

    Ok, my generic arduinos came today. I have not done anything with them yet. Before I do wanted to check with you about distance with those. I don’t really have the space behind my TV to put this stuff so I have to keep pi, power supply, etc in the media cabinet and run up to behind tv inside the wall. I get the idea of the cap for the leds. I’ll have to look to see if I have some in the garage (times like this I miss radio shacks). Why the 330ohm resistor on the data wire tho? Do you see any issue with me running the power, ground, and data wires from arduino up to tv to control leds? I hope this gets me a stable setup then we can finally get to how I can set up this code to control them how I wanted.

    I would guess that you may need a logic level shifter, given the length of the data cable.

    External Content
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    You think the arduino is better than the nodemcu? I have one coming so I can move it it Monday. Are you a able to control Your setup with HA and the native app using arduino? I don’t even need anything that involves. Just always white until I turn on screen match then switch back to white...once I get it working stable.

    Just figured this out. If I leave usb grabbed hdmi unplugged i get this. Hyperion effect is set to Knight Rider to exaggerate the effect. If I unplug it, goes back to normal. This is with pi on separate psu and the data and ground wire extended.

    External Content
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Here is what happens when I move Pi to separate psu and just run longer data wire.

    I had to upload to YouTube because I can’t attach here.

    External Content
    Content embedded from external sources will not be displayed without your consent.
    Through the activation of external content, you agree that personal data may be transferred to third party platforms. We have provided more information on this in our privacy policy.

    Does this on usb capture or effect/solid color.

    D34DC3N73R here is a quick sketch of the setups I’ve tried.

    It seems to work fine with a bit of finicky usb capture stuff when setup like the top drawing (all items powered by the same psu. It will also work if I put an 8266 with wled but I lose all control from the Hyperion app and HA still have finicky usb capture issues.

    If I try to keep the pi and and splitter in my media cabinet and just run a ground from pin 3 and gpio18 over to leds that are powered behind the tv from DIFFERENT psu then it get strange flashing behaviors I mentioned. If I pull gpio18 off the lights go on steady but have no control. I didn’t that that 10-12’ of wire for the data wire would matter but seems to.

    Happy to try any suggestions or move to arduino once it arrives.

    Thanks Unavailable77.., I was just reading a bunch of your posts last night. I’m not set on that device. I actually am trying to find a 4K splitter with CEC controls because I use my TV to control volume on my receiver in order to get HUD volume on screen. Is there a better device that will split 4K that can feed into pi that retains the hdr10+, 4.4.4, Dolby vision, etc? I don’t have a problem spending some money on the proper and correct solution. I just don’t want to compromise the picture quality for some ambient lighting.

    D34DC3N73R I’ll draw up sketches of the different configurations I’ve tried and post in a bit. I’ve tried both the GPIO approach and using a D1 mini node mcu 8266. I’ve had both working with different intermittent problems. Here info on my system:

    1. 273 LEDs (cut from 300 strip of BTF 2812b). BTF-LIGHTING WS2812B RGB 5050SMD Individual Addressable 16.4FT 60Pixels/m 300Pixels Flexible Black PCB Full Color LED Pixel Strip Dream Color IP30 Non-Waterproof Making LED Screen LED Wall Only DC5V…FS5B?_encoding=UTF8&psc=1
    2. I started with a 5v 10a, moved to a 5v 15a and now have a 5v 20a arriving tomorrow. I had wired originally to 1 end but had voltage drop and with white lights thru began to turn yellow toward ends. I split the power of the 15a to both ends of the leds to fix.
    3. Will work diagrams
    4. Data wire works fine when around 6”-12”. When I tried to run from media cabinet to behind tv, which is about 10’—12’ of wire it didn’t work and lights just flickered and flashed. I added a ground from pin3 to pi and ran to ground on leds which cause them to light more and “seem” to try to work under the existing flickering and flashing (but works perfectly fine when I have short data cable and power pi and leds from same power supply).
    5. using latest version of HyperBian which I think has alpha 9?
    6. I have tried 2 capture cards, both seem to work but this one seems more consistent for showing in the usb settings: IPXOZO 4K Video Capture Card,HDMI to USB 3.0 Game Capture Card Device 1080P Audio Video Capture Adapter Directly to Computer for Gaming,Streaming,Teaching,Video Conference,Live Broadcasting,Black…Q5HT?_encoding=UTF8&psc=1 I also have this one: TOKANI HDMI Capture Card USB2.0,...…?ref=ppx_pop_mob_ap_share.
    7. I’ve gotten both to capture video and show it in the preview window. Didn’t notice any flashing in it tho.

    I just ordered an arduino clone to so I can try it. Ideally I would oh need the wire ran behind tv for GPIO connection but tried to make connection more reliable. I thought I was all good when I had this all laid out on the floor testing it all and making sure but once it was up there I had some issues start to surface. All connections are soldered btw. Pins only used when more or less required I.e. gpio-18.

    Thanks for the reply D34DC3N73R To clarify, basically what I’d like to have happen is the leds always start up on pure white, then I like to (ideally) link that to SmartThings so that I can use the ST integration with my Logitech harmony remote and switch between the usb capture and those pure white lights with the buttons on the remote dedicated to STs switches. Right now, I’m having a bit of trouble even getting the lights to work consistently. I switched from a pi zero to 3b+ and was going to actually hardwire the lights to the pi and power supply because wled had been finicky. Turns out without a common ground the leds will not work correctly. I tired running separate wires from GPIO 18 and the #3 pin ground from the pi to the lights (media center is in cabinet about 6-8’ away) but the lights flicker and flash. I added second power supply but it’s just not working correctly. Also, it seems if I’m using wled the Home Assistant integration doesn’t work because no commands seems to make it to Hyperion to change the effect or switch to the grabber (even the official Hyperion app won’t change them with wled connected)

    Any advise on how to get past this point before I move on to more complicated things? Is my ask of how I’d like it to work realistic?

    Thanks for the help!!

    Hi all, I’m new to the forum and just recently completed my first project using HyperBian on Pi Zero W along with WLED on a 8266. One of the things I’d like to be able to do is toggle the lights from USB capture and a plain pure white with ST, HA, or my Logitech Harmony remote. I run SmartThings and Home Assistant along with Alexa. I found 2 device handlers for ST that is supposed to control this but all I can get it to do with either is turn it in and off. I also tried with the Home Assistant integration but again it only lets me turn it on or off. I don’t know how to code so I can’t really write my own API calls to do this. Is anyone willing to help me solve this? Maybe there is an existing waY I’m not aware of or my settings need tweaked to get it working in ST or HA. Any help is greatly appreciated!