Remote/HA control 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!

  • Go to Best Answer
  • I'm not exactly sure what you mean by toggle the lights from USB capture, but you can use signal detection on the USB source.

    • Signal Detection: If enabled, usb capture will be temporarily disabled when no signal was found. This will happen when the picture fall below the threshold value for a period of 4 seconds.

    Also, you can send commands formatted in json to do things like change the lights to a solid color, or start an effect.


    For instance, this will turn the lights red for 10 seconds

    curl "http://HYPERION-IP:PORT/json-rpc" -X POST -d "{\"command\":\"color\", \"color\":[255,0,0], \"priority\":1, \"duration\":10000, \"origin\":\"Hyperion JSON\"}"


    If you don't set a duration, it will be infinite until you issue a clear command

    curl "http://HYPERION-IP:PORT/json-rpc" -X POST -d "{\"command\":\"clear\", \"priority\":1}"


    You could set those up as shell commands in HA and then use the shell_command service in automations.


    You can see all the options here: https://docs.hyperion-project.org/en/json/Control.html

  • 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!!

  • Unfortunately, I'm not sure about ST since I've never worked with it. But, depending on your media source, I can think of a couple of easy automations in home assistant that would work.


    About the LEDs,

    • How many LEDs and what type?
    • What is your power supply?
    • Can you make a diagram of your wiring?
    • How long is your data wire?
    • What version of Hyperion are you running?
    • What type of capture card are you using?
    • Do you see any flashing in the LED visualization preview?

    Assuming your wiring and everything else is good, I've heard of problems when using the pins on a pi with certain LEDs, but I'm not familiar enough with the problem to give solid advice. There may be a command you need to run, and/or use a level shifter to boost the data signal. I use an arduino nano clone with a pi4b and ws2812b LEDs which work amazingly well.

  • 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 https://www.amazon.com/dp/B01CDTEJBG?tag=hyperioforum-21&_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 https://www.amazon.com/dp/B08VNH9M34?tag=hyperioforum-21&_encoding=UTF8&psc=1 I also have this one: TOKANI HDMI Capture Card USB2.0,... https://www.amazon.com/dp/B08B8XGBGP?tag=hyperioforum-21&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.

  • point 5: yes Hyperbian runs Hyperion.NG 2.09 Alpha

    point 6: have a look at my topic for LOOP capturing devices :thumbup::saint:


  • Thanks Ambientheater77, 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 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.

  • 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 youtu.be
    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.

  • 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 youtu.be
    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.

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

    External Content youtu.be
    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.

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

    External Content youtu.be
    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.

  • Yes, I can control the lights with the app. It appears the HA Hyperion integration only allows power on/off. But adding some shell commands is easy enough. For instance, If I wanted I could use the following HA automations.
    When TV turns on, start a Hyperion effect or solid color.

    When TV starts playback with a specific app (or multiple apps, or all apps) stop the effect. Which would then allow the standard bias lighting / ambilight.

    When playback stops, resume effect or solid color.

    When TV turns off, turn off Hyperion.

    You could also make those trigger with the harmony remote if you didn't want the light change to be automatic.

    The arduino nano just runs a set block of code and gets instructions from the pi/Hyperion. There is no way to control the arduino outside of Hyperion. IMO the arduino is better than running directly off the pi when it comes to the WS2812b LEDs.


    While I haven't tried running Hyperion with nodeMCU, I do have a couple of other nodeMCU's running WLED for other LED projects around the home. I could definitely see the benefit if my pi wasn't set up behind my TV already.


    I'm not sure exactly how much it matters, but my data wire is about 3.5 feet long and I have a 330 ohm resistor soldered in right before the LED strip. Each of the 4 sides is powered from the front and back with 1000uf capacitors right before the LED strip. You can see my set up here: https://imgur.com/a/Yp0Y0St

  • 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.

    Edited once, last by TPmodding: removed unnecessary quote ().

  • 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.

  • 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!

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!