Posts by mg3point

    So i am trying to get back to making this work through my google home mini. I still have to figure out the getting the google home mini to communicate in my network, but fairly certain i can get that. I have it up and running to where i can hit a webaddress on my computer to trigger an effect. Problem being is that it only works if i have just the effect or just the color script in it. As soon as i try to include the clearall or both color and effect in it, i get errors trying to run the CouchSite.py. (its a webserver to control my LEDs embedded into my couch drink rail)


    Here is what i currently have. I dont know why but when i was working previously i got away from the daemon stuff and am using some for of app. Im not well versed in any of this and trying to learn as i go.


    import subprocess


    from flask import Flask


    app = Flask(__name__)



    @app.route('/effect/<effectname>')


    def index(effectname):


    subprocess.check_output(['/usr/bin/hyperion-remote', '--effect', effectname])


    return"<html><body><h1>done</h1></body></html>"



    @app.route('/clearall')


    def index():


    subprocess.check_output(['/usr/bin/hyperion-remote', '--clearall'])


    return"<html><body><h1>clear</h1></body></html>"



    if __name__ == "__main__":


    app.run(host='0.0.0.0', port='8081')



    When i try to run the script i get this....


    Traceback (most recent call last):


    File "CouchSite.py", line 10, in <module>


    @app.route('/clearall')


    File "/usr/lib/python3/dist-packages/flask/app.py", line 1080, in decorator


    self.add_url_rule(rule, endpoint, f, **options)


    File "/usr/lib/python3/dist-packages/flask/app.py", line 64, in wrapper_func


    return f(self, *args, **kwargs)


    File "/usr/lib/python3/dist-packages/flask/app.py", line 1051, in add_url_rule


    'existing endpoint function: %s' % endpoint)


    AssertionError: View function mapping is overwriting an existing endpoint function: index



    Any ideas of what i am missing. I feel like its probably something stupid and that i am close. Any help is appreciated, thank you!

    So i did eventually pseudo get this working. It was having issues when i put both the effect route and the color route in. If i left it at 1 it ran fine and i was able to hit the url in a web browser and the lights would change. I thought at that point i was golden to hook it into ifttt to do it via voice control. However I quickly realized my port was only open on my local network as my ip was only static to my router and not to my ISP which is giving my router a dynamic ip. Therefore the ifttt servers were unable to talk to my pi to change the lights :( . Oh well, it was really just a "nice to have" anyways.

    Progress...


    1) No issues controlling them, its just a separate server in the list inside the app. (Renamed them each to TV and Couch)


    2) Need to look closer into this, think it should be fairly easy.


    3) No issues not having a video source. Didn't even include the capture card information into the config file.


    4) Saw in Hypercon what looked like could be a way to mimic the lights to what is on another server. Could be interesting to link the couch to the tv if thats how that works. Still want them separate so probably won't look into that too much further, but thought it was interesting.

    I think this is exactly what i am looking for, but am struggling to get it working. I'm wanting to tie this into to google home assistant. What I am looking for is a web address to give to the home assistant to hit so that it will change the lights. I roughly understand what is going on in the script written above, but am a little lost when it comes to the nohup section. The other issue i have is that port 8080 is already applied to another device in my household. Would i be okay to use 8081? Can i just swap that in the code? Also do i need to put my pi's ip address in the 0.0.0.0 section of the code?


    Any help you can provide would be greatly appreciated. I've had an ambilight setup around my tv for awhile now. I am now in the process of building a couch rail that i am embedding 9m of LED into. This is what I would like to set with google assitant ("Hey google, set couch to Green Mood Blobs.").

    I have a master plan for my man cave that involves ambilight on the tv and another set of LEDs embedded in a couch rail. I've had the tv lights working for awhile now(may be updating them away from openelec soon so that i can access them via google home). I've set up a custom "Goal light effect that wraps the tv when my team scores. I'd like to mimic that to the couch rail as well. I plan on setting up the couch rail pi as just generic lighting that i can leverage the default hyperion effects while also setting up a listener to auto trigger the effects across both PIs (I've had this running on a pi by itself already).


    I'm in the process of building the couch rail and have 5M of APA102 LEDs on the way. However i do not require this set to be connected to the video source. I'd like to default it to the "cool mood blobs" but still have access to change it on demand (also via google home voice commands) I just have a few questions i need straightened out.


    1) Will i have any issues in the mobile app controlling the PIs separately?


    2) Am I able to set the default function of the lights to "cold mood blobs" instead of video source?


    3) Will there be any issues of not having a video source?


    4) Any other suggestions or tips?



    hyperion-project.org/index.php?attachment/1406/
    hyperion-project.org/index.php?attachment/1405/


    The SSHPass psuedo worked, when I ssh into my triggering pi and run the SSHPass command it first opens the connection to the lights pi and then if i run it again will trigger the lights but stays in the lights pi so i dont think that is a viable option. I've run wireshark hoping to track the TCP but its not quite clear what its sending.

    Just copy hyperion binaries to your triggering pi. Call there hyperion-remote -a ip_from_hyperion_pi:19444 -e Goal -d 40000


    I was actually literally just getting down that road. I was struggling to connect directly to the hyperion-remote, (still a newb to this more back-end stuff i was trying to hit hyperion-remote.sh) But alas it worked! Now i just need to edit the triggering script and apply my new data.


    Thank you all for your help!

    could you clarify the -a? I am uncertain how to communicate with the hyperion-remote on the other pi. I know it should be something simple and i feel i am right on the precipice of figuring this all out.


    I think i should have specified that i do not have hyperion remote on the pi, i was referencing the web app, i was hoping to just pull a script from it, but then trying to put pieces together it hit me that you are probably saying i should put hyperion remote on my triggering pi and then the -a is just the ip of my lights pi. So now just to figure out how to get to Hyperion-remote on the trigger pi. Thanks for the insight, i hope i am on the right track. I dont know why i strayed away from the forums for so long.

    +1 for hyperion-remote
    -1 for ssh - you don't need it cos Hyperion-remote can talk to instances on other hosts with -a


    could you clarify the -a? I am uncertain how to communicate with the hyperion-remote on the other pi. I know it should be something simple and i feel i am right on the precipice of figuring this all out.

    My pi is currently powered from my tv's usb slot so when the tv is on, the pi is running. My lights are currently powered from a switch I placed in the back of my entertainment stand. I have however always planned to automate that as well. Could you perhaps wire in a relay to the pi and tell it to close the relay when the pi has power?


    I'll have to give that a go, thanks!

    I am attempting to trigger the lights running on a pi from another pi. As an avid hockey fan i created my own version of the goal lights (similar to police light effect). I want the lights to be triggered automatically similar to the Budweiser red light. I have script running on another pi that checks the score and is currently setup to play audio through a speaker attached when my team scores a goal. What i am trying to do now is get this pi to communicate with the lights pi to trigger the light effect with it. I know on the lights pi i need to send


    /storage/hyperion/bin/hyperion-remote.sh -e "Goal" -d "40000"


    My question is how do i send that from the triggering pi?


    I'm assuming i can just hit a web service link as I think thats how the chrome and android apps work.


    Apologies if this is a simple answer, i'm still fairly new to this. Interaction designer by day, tinkerer/Connoisseur of many things by night.

    I had the STK and fought it for the first year or two i made a setup and eventually stopped using my lights all together. It wasnt until I got the fushicai that everything started to work great and I've been loving them ever since.

    When you say half of them are darker than another half it makes me think its a power issue not necessarily a software issue. Not sure how you have your setup, but if its all one continuous strand and the power is only at the beginning you could be losing some voltage by the time it gets to the end. What works for mine is that i have the power split. One wire in around the 25th led and another power in at the 75th led. This places power equally throughout all the leds. You will get a much smoother display. Hope that helps.

    I jumped into this a few years ago. As an avid hockey fan, i've programmed my own Goal light animation. I'm currently triggering it manually, but have seen budweiser come out with their own physical goal light. From what i've seen it works nearly instantaneously with what you see on tv. My goal is to get this effect to trigger my own ambilights so i no longer have to set them manually. I'm nearly there running a script on another pi that essentially hits a server looking for score updates. Where i am stuck is i need to essentially treat the other pi as a hyperion-remote. I know it is possible and i feel so close. I am no backend dev and have been hobbling my way through all of this. But as an idea for the app even, it would be cool if you could set it to track different sporting events and trigger your own custom events automatically.