Hyperion on and off command does not work anymore

Hello,

I use the docker image from Home-Assistant and I use the latest version.

The following 2 commands does not work anymore:

echo '{ "command": "clearall"}' | nc 192.168.1.33 19444 (on command)

and

echo '{ "color": [0,0,0], "command": "color", "priority": 100 }' | nc 192.168.1.33 19444 (off command)

This is the error message from the logfile panel:

Command failed: /config/hyperion/hyperionon.sh

Hopefully someone can help me.

Daranto

There’s an (maybe related?) open issue on hyperion.

EDIT:
Hmm. Your commands have nothing to do with HA and the hyperion component.
Do they work in a terminal?

hey,

yes they work on the terminal without any problems.

Daranto

Then it’s not related to the hyperion component.
Maybe try full paths in your scripts.
/bin/echo '{ "command": "clearall"}' | /bin/nc 192.168.1.33 19444
You get them with which echo and which nc on your system.

How are the commands related to Home Assistant? You are sending JSON payload using NetCat to a receiver listing o tcp:192.168.1.33:19444 . I don’t see Home Assistant in that communication.

However: Is file /config/hyperion/hyperion.sh present and executable? I think /config is the the mount-path inside the HA Docker container, you need to find this path on the Docker host or do a docker exec -ti <id of HA docker container> /bin/bash to look into the running container.

Thank you for the link to the issue. I had the same problem with the hyperion component and reverting the hyperion.py solved my problem for now. Another workaround is to use this: GitHub - MrBramme/Mqtt-Hyperion-Remote: An MQTT approach to the remote of Hyperion.. This also works for me.

1 Like

I’m using this variant for the script. Not on docker, but maybe works for you

#!/bin/bash
echo  '{ "command": "clearall"}' > /dev/tcp/192.168.1.113/19444

Hey,

thanks for your answers. If found the problem:

cat -v hyperionon.sh
echo '{ "command": "clearall"}' | nc 192.168.1.33 19444^M

The ^M at the end was the problem. It seems that Atom destroyed my .sh files…

Daranto