METADATA not saving - Favorites will never remain tagged
-
@cyperghost its back to not working! the favorites I've added when I first put your script in, i tried removing and playing another few games, powered down and no changes to favorites and last played remains the same.
it did work...ONCE and I think that's it :(
when I press the power button I don't see any echo or anything. its like pulling the plug
-
@semper-5 I've removed the sleep commands again. Can you retry?
You mean you press the power button and then the screen shuts instantly off? You don't see any Linux message? -
@cyperghost nope nothing. I deleted everything and followed instructions, redid it twice and just straight power off. no metadata save
-
@Semper-5 Okay I made some tests with a "WIRE"-switch (connect 3,3V to GPIO24)
And it worked in all cases! It saved metadata if you press the button if you are in ES
and it worked even if there was an emulator active running.So this base script works with a "push" button. But I can't test the switch part with the POLOLU. But if you say it immediatly cut's power.....
So you press the power button and the light of the PIE go off (red and green LED) instantly?? Then there is something wrong with your wiring? Because that sound really weird!
-
@semper-5 said in METADATA not saving - Favorites will never remain tagged:
@cyperghost nope nothing. I deleted everything and followed instructions, redid it twice and just straight power off. no metadata save
But you did a reboot so the script became active? Or you can start the script by SSH with
sudo /path/to script/switch.sh &
-
@cyperghost oh yes I have rebooted and powered on and off about several times.
it can't be a wiring problem because I put the original script from Yahmez back in and power off and restart functions work fine again
-
@semper-5 Then I'm sorry. As I don't understand how the POLOLU works I can't help ... but now you still miss the metadata.
-
@cyperghost said in METADATA not saving - Favorites will never remain tagged:
/home/pi/RetroPie/scripts/switch.sh
oh when I run the command straight from SSH I get:
sudo: unable to execute /home/pi/RetroPie/scripts/switch.sh: No such file or directory
but I can SEE the file and when I edit it, all the content is there...am I going crazy?
-
@semper-5 Did you insert the text via nano command? and did you made it executable with
chmod +x /home/pi/RetroPie/scripts/switch.sh
-
@cyperghost yes. but I'm looking at the same file with the same content in both nano and text editor on WinSCP
-
@semper-5 Close the WINSCP viewer, or close WINSCP at all... and just use the CLI provided by putty. WINSCP sometimes uses it's cache to display files. Then on reboots/restarts it messes the system up with old files.
I need the info if the script is working in the basic variant - just for tomorrow (going to bed).... because then I can provide a full working solution with better handling of the emulator calls ;)
-
@cyperghost yeah tell me about it I'm cursing at my computer right now and I'm still at work past 5pm lol!
so I am using ONLY CLI (using F4). no putty no winscp.
I can see the script. I can edit the info and see the content. but when I execute it using sudo /home/pi/RetroPie/scripts/switch.sh I getNo such file or directory
Wondering if I should bump up to the 4.4 :/
-
@semper-5 I think it doesn't matter if it's 4.4 or 4.3
With CLI I don't mean to enter terminal by quit ES. Without ES running in background the script will do nothing. So just use SSH and putty to edit the files. Maybe it is also a good idea to start the script through SSH (so you can read error messages)!
Can you check if I setted the right GPIOs? As I said in my example yesterday... Without the POLOLU I was able to trigger right as I used a wire and just connected GPIO24 directly to PIN1 (3,3V) ... Proper shutdown.
So I guess the detection routines of ES and EMULATORS still work. But I don't know the switch shematic of your build.
Stupid question: Did you create folder
scripts
within your home directory? -
@cyperghost I tried moving and recreating the script in 5 various places but it keeps coming back as command not found
this is just getting crazy...i can see it sitting there smiling at me but saying "nope, not gonna do it"PS: there's no stupid questions when dealing with a dummy lol
-
@semper-5 hmmm and if you try
sudo bash switch.sh
I changed the script again to view status message! -
Hi guys! I'm trying to close ensurely saving metadata with an script... @cyperghost is your script doing this? Could the script be valid to power off with a generic button?
Thanks in advance
-
@cyperghost said in METADATA not saving - Favorites will never remain tagged:
@semper-5 hmmm and if you try
sudo bash switch.sh
I changed the script again to view status message!I'm getting something new. and this is on a totally fresh image with nothing but the button script and yours.
this is the output when running your script:
switch.sh: line 17: echo: write error: Device or resource busy
switch.sh: line 19: echo: write error: Device or resource busy -
@semper-5 said in METADATA not saving - Favorites will never remain tagged:
I'm getting something new. and this is on a totally fresh image with nothing but the button script and yours.
this is the output when running your script:
switch.sh: line 17: echo: write error: Device or resource busy
switch.sh: line 19: echo: write error: Device or resource busyWell... "Button script"?
Then it's clear whats happening. The Button script and "my" script are using the same GPIOs. Please disable the Button script and try again ;) We are getting closer :)@julenvitoria
Yes it works with a generic button. Therefore comment all lines that contain$gpiopin2
- these aren't needed. But it's not a well written one. I just want to find out if I'm on the right track with this to use the POLOLU device. -
@cyperghost more developments, still just cuts the power. and this is the only script I'm running on a fresh image.
Output:
switch.sh: line 10: $'\r': command not found
switch.sh: line 13: $'\r': command not found
switch.sh: line 16: $'\r': command not found
: Permission denied /sys/class/gpio/export
: No such file or directoryass/gpio/gpio24
: Permission denied /sys/class/gpio/export
: No such file or directoryass/gpio/gpio25
: No such file or directoryass/gpio/gpio25
switch.sh: line 22: $'\r': command not found
cat: '/sys/class/gpio/gpio24'$'\r''/value': No such file or directory
switch.sh: line 26: $'\r': command not found
switch.sh: line 46: syntax error near unexpected token `fi''witch.sh: line 46: `fi
-
@semper-5 You copied the contents of the script in Notepad by any chance ? Use Notepad++ to create/edit the scripts in Windows and set the line endings to Unix (LF), Notepad saves with Win/DOS line endings (the extra
\r
character in the script file).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.