Okay, so running with the pig version... it sounds like you want to persistently start the daemon on bootup. I just ran the following search in Google: raspbian start pigpiod on startup. This gives us many competing ways of doing things "old-school" but the easiest then is:
ah, ok, thats an idea too... didnt think of just having it run at startup. but, again, will this take into account the -x -1 part of the command? that was essential to getting it to work. also, is this a set-it-once command? once i do it it will always start at bootup?
that did it! editted the light_on script back to just the pigs commands, rebooted, ran the script the System Command editor and it worked, so all permissions and such seem to be set and working after a reboot.
thanks so much for your help guru, and johnnie. probably wouldnt have gotten this working without you!
Hey, just a complete noob here, but I am having trouble following how this was solved. I just want to hook up a couple of LEDs. Could someone give me clear instructions as to which files need to be edited to make the gpio pins activate?
If you are using WS281x/SK6812 type LEDs and my plugin OctoPrint-WS281x_LED_Status, you can take a look at the wiki in the repo (linked), which has some guides for LED setup.
They seem to be standard single-colour LEDs, which would not be controllable - my plugin targets the WS281x space, which has individually controllable LEDs, also known as NeoPixels. This thread was also talking about RGB Leds too.
You may be able to get LEDStripControl to work, but to my knowledge there is no plugin for just turning on/off standard LEDs - your best bet would be a custom script accessed from the system command menu if that's what you're aiming for.
Yeah I am upgrading to a ring of 12 NeoPixels, this should work well with your plugin I think. I will be using a separate power source then running the NeoPixels from GPIO 18.
Someone else reported an issue with the first LED, and it turned out to be their level shifter.
You could give that a go, or if not maybe it is an issue with that individual LED.
The on and off command is not implemented automatically when switching to the camera tab, but there are buttons in the navbar that you can use to turn them on and off.
Automatically turning it on is something on my list but it's not going to get looked at all that soon.
This drifted off from the origial question "How to switch on when stream/shot is watched?" to how to control raspi GPIOs. Sadly.
The original question is way more unique and also unsolved. @supertaz came up with good ideas, but well, still no solution.
I myself tried to modufy ustreamer for this purpose.
While it works, the author of ustreamer pointed out that the http-forward solution is the cleaner solution.
Great work!
I like how it turns the whole streaming off when no one is watching!
It is pretty delayed though. I will try the other cameras (only tried CAMERA=pi)
PS: Len on snapshot is not implemented. You need to add:
PPPS: Reducing resolution to 640x480 drops load to ~50%. You can also reduce fps for more performance. It also seems more responsive than octopi default mjpg-streamer. Great!
Yeah I disabled it on snapshot because I use the snapshot url in Home Assistant and the light would constantly turn on.
I've fixed this by disabling this in the script and in Octolapse I added 2 scripts to turn on the light just before taking a snapshot.