I just SSH’d into my Pi and pasted the script in. Worked fine.
I just now did my own custom install based on the link posted above.
I logged in remotely via putty as root.
I then clip and pasted the entire file contents into the putty session window and hit enter.
No error messages.
I then rebooted that Pi and my buttons are there, and work.
I should have went with a movement of 5 though instead of 2, 2 is hardly notable.
I’ll just go back in and edit each py file manually. I’ll edit my script first though, for next time.
What that script does is create the up_1, down_1, etc files.
Makes them all executable via chmod
Then creates the up.py, dpwn.py etc files.
EDIT: What is in the up_1 etc file, has to be executable from the command line.
If you put your python code in the _1 file it won’t work, you’ll get an error message. been there done that. So what goes in there is the command to run the python file.
In the python file is the actual pan tilt python code.
Increments of 5 was better, for my setup anyway. lol, I thought one of my buttons wasn’t working until I realized I had hit my limit of 40 for pan. Non of my Presets were messed up and the button layout is just what I want.
And you can edit the .py scripts when they’re in place? I’m going to play.
Thats what I did, nano /data/etc/python-scripts/up.py
etc, to change increment from 2 to 5.
If you log in via putty and run the following two commands
sh -c 'echo 0 > /sys/class/leds/led0/brightness'
sh -c 'echo 0 > /sys/class/leds/led1/brightness'
You can turn off the Pi’s power LED and Status LED.
Tried it and it worked on my 3B+ and 3A+.
They come back on, on a reboot though.
I tried to make a light_off_1 file with those two commands in it but got the “an error has occurred etc” message when I clicked it?
I also tried doing it via crontab but that didn’t work?
I still don’t understand. to which directory did you paste it ? Do I have to do "mkdir /data/etc/python-scripts/ first ?
Open Putty, type in that Pi’s IP address, hit enter.
In the box that opens type in root and hit enter.
You should end up here.
Now just clip and past to where the green cursor is, and hit enter.
The script will create the python-scripts folder for you and put all the files in the correct folders all by itself.
Just wondering why you want to turn the LEDs off.
Yes, I did it…Sorry guys, I was too frustrated and didnt take time to think deep enough.
@calleblyh no problem, its a learning experience that pretty well never ends, lol. For me it is anyway.
@Crowbot Stealth mode I guess. My pan tilt camera is in a window right up close to the glass. The LED’s are visible as reflections in the glass, especially at dusk or dawn. I figured out how to do it.
In Motion Eye log in as root in putty
then run
nano /data/etc/userinit.sh
add
sh -c 'echo 0 > /sys/class/leds/led1/brightness'
sh -c 'echo 0 > /sys/class/leds/led0/brightness'
ctrl x
y
enter and reboot
Makes sense. I snipped it for later reference.
On shut down, they come back on right before you get the 10 blinks which is nice so you can tell if it shut down. They will initially be on, on bootup too, but once motion eye starts up they turn off. Best of both worlds IMHO. Works for me =)
I think my next mod is going to be having it pan tilt to a default on power up.
My servos move slightly when I plug my power supply in.
I’m thinking a crontab entry may do it. Run one of my py files on boot up.
EDIT: crontab didn’t work? I have used it before to run a python file on boot up, not sure why its not working in motion eye though?
Yes mine moves on power up too. Probably the driver board waking up.
It would be nice to come up with an enclosure for the thing.
I went in via putty and deleted all my preset files. Then ran my custom script for that and rebooted. Everything works. I will eventually put it all in the one file, pan tilt and presets.
Still can’t get crontab to run my preset3.py file though. =(
I opened an issue on it on the Motion Eye GitHub page.
I made a wire stand for mine out of a coat hanger. It hooks in the slot where the windows slides to open. I stuck it to the bottom of my Pibow case with some double sided 3M stick pads. I’ll have to figure out something better once summer comes and I want to open that window. It will do for now though.
I figured it out.
Log in as root with putty
then run nano /data/etc/userinit.sh
add the following line
/data/etc/preset3_1
ctrl x, y, enter.
preset3_1 is preset 3, the one I wanted to use.
I haven’t faced mine out yet. I want to get all the kinks out while it’s sitting on my desk. I’m thinking of a clear dome over the camera and some kind of case around the Pi.
You really should put all your code mods all together into a file at some point. For posterity. ;)
I run MacOS and it turns out that there’s a built-in SSH client in Terminal. Handy.
Thats on my todo list for today. Put my motion eye tweaks all in one folder.
I think I can put it all in the one install file too.
I have some command line / terminal stuff I need to sort into another folder too, so its all in one place.