Hi everyone! I'm relatively new to Hyperion, however now got a nice setup with APA102 LEDs going thanks to the info and help here in the forum
I have searched the last 3 days for a solution to this problem with different search terms without success. Please excuse if this has been answered before, however I could't find it in the FAQ either:
Switching Configurations
- I have 3 hyperion.config.json files. 1 normal one, 1 for 21:9 and one for 3D content
- They differ only in the USB grabber cropping values and the startup animation so that I can tell them apart
- If I upload the config with the different cropping values from HyperCon, the configuration gets applied correctly with the respective cropping values
- I put all 3 files in "/etc/hyperion"
- I can switch them with a python script I found here:https://hyperion-project.org/t…-off-toggle-for-kodi.473/
- I have given all necessary permissions for the script to execute correctly
My script:
import os
# kill hyperiond and rename config files
cmd = "sudo systemctl stop hyperion.service 2>/dev/null; sudo /etc/init.d/hyperion stop 2>/dev/null ; sudo /sbin/initctl stop hyperion 2>/dev/null"
os.system(cmd)
os.rename("/etc/hyperion/hyperion.config.json", "/etc/hyperion/hyperion.config3.json")
os.rename("/etc/hyperion/hyperion.config1.json", "/etc/hyperion/hyperion.config.json")
os.rename("/etc/hyperion/hyperion.config2.json", "/etc/hyperion/hyperion.config1.json")
os.rename("/etc/hyperion/hyperion.config3.json", "/etc/hyperion/hyperion.config2.json")
cmd = "sudo systemctl start hyperion.service 2>/dev/null ; sudo /etc/init.d/hyperion start 2>/dev/null ; sudo /sbin/initctl start hyperion 2>/dev/null"
os.system(cmd)
I can invoke the script from command line (sudo python /usr/share/hyperion/effects/Config-Default.py). Hyperion stops, restarts, plays the different startup animation and everything is good to go again.
The problem is that the whole point of switching the configs, having different image cropping from the grabber, doesn't get carried over.
What am I missing for the cropping values to stick?
Second question:
I added my "Config-Default.json" file in the effects folder so that I can invoke the script from the hyperion remote android app.
It only has these 4 lines in it:
I can see the effect show up in the remote. However when I execute it, the lights just go out and the service gets stopped, but not restarted. No startup animation is played. Log file:
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: JSONSERVER INFO: New connection
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: BLACKBORDER INFO: threshold set to 0.16 (41)
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: BLACKBORDER INFO: mode:default
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: EFFECTENGINE INFO: run effect Config Switch on channel 50
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: BLACKBORDER INFO: threshold set to 0.16 (41)
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: BLACKBORDER INFO: mode:default
ssh in: Sep 21 21:57:36 raspberrypi sudo[20743]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl stop hyperion.service
ssh in: Sep 21 21:57:36 raspberrypi sudo[20743]: pam_unix(sudo:session): session opened for user root by (uid=0)
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: INFO: Application closed with code 0
ssh in: Sep 21 21:57:36 raspberrypi systemd[1]: Stopping Hyperion Systemd service...
ssh in: Sep 21 21:57:36 raspberrypi sudo[20743]: pam_unix(sudo:session): session closed for user root
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: V4L2GRABBER INFO: stopped
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: JSONSERVER INFO: Connection closed
ssh in: Sep 21 21:57:36 raspberrypi hyperiond[19589]: EFFECTENGINE INFO: Cleaning up Python interpreter
ssh in: Sep 21 21:57:36 raspberrypi sudo[20752]: root : TTY=unknown ; PWD=/ ; USER=root ; COMMAND=/bin/systemctl start hyperion.service
ssh in: Sep 21 21:57:36 raspberrypi sudo[20752]: pam_unix(sudo:session): session opened for user root by (uid=0)
ssh in: Sep 21 21:57:36 raspberrypi sudo[20752]: pam_unix(sudo:session): session closed for user root
ssh in: Sep 21 21:57:36 raspberrypi systemd[1]: hyperion.service: Succeeded.
ssh in: Sep 21 21:57:36 raspberrypi systemd[1]: Stopped Hyperion Systemd service.
Why doesn't the service get restarted when the python script gets called by the remote app?
Thanks everyone in advance for your input!
Robin