Try /config/kodi_send_udp_action, what does that give you?
FYI this:
isn’t actually where Home Assistant sees the file. The SSH add-on runs in a totally different container from HA itself. In the SSH container the directory where HA config is stored is mounted at /config and there is a symlink created to map /root/config → /config. The HA container does not have this symlink, /config is where the config folder lives. The HA container also has different packages installed then the SSH container so there’s a whole host of reasons why a script that seems to work in the SSH container can fail when run as a shell_command
For more info on these different containers and how to test your commands/scripts as HA sees them rather then as the totally separate SSH container happens to see them see here:
The topic is a bit different but the section on trying commands from the HA container is relevant.
Before going to much further, I notice what you’re trying to do seems to be called CECActivateSource. Have you seen the HDMI-CEC integration? Not sure if that will work for you but figured it couldn’t hurt to ask. Generally easier to use an OOTB solution when possible.
Back to your examples, where does the binary live? kodi_send_udp_action is a script right or is that the binary? If it’s a script calling a binary then you have to make sure that HA can see both the script and the binary. Which generally means they both have to live in /config.
EDIT: Also if you set the log level of homeassistant.components.shell_command to debug then it should print stdout and stderr to the log. That usually helps me track down confusing issues in this space.
Kodi is another raspberry pi with HDMI whereas HASS hasn’t got the Reciever/TV connected. If this changes the HDMI-CEC integration is the way to go.
Both the bash script and the binary are in /config and I am now fairly certain the binary is throwing the 127.
For the life of me I cannot find where to disable protection mode for the ssh add-on… I am sure I have seen that option somewhere. I need access to the hass container.
You need to install the one from the community add-ons store. Then you can turn off protection mode on the first tab next to watchdog, start on boot, etc.
bash-5.1# ./kodi_send_udp_action
Error loading shared library libz.so.1: Operation not permitted (needed by /config/kodi_send_udp_action)
Error relocating /config/kodi_send_udp_action: zlibVersion: symbol not found
Error relocating /config/kodi_send_udp_action: inflate: symbol not found
Error relocating /config/kodi_send_udp_action: inflateInit_: symbol not found
Error relocating /config/kodi_send_udp_action: inflateEnd: symbol not found
bash-5.1# echo $?
127
Sadly it was a bit of waste of time and I have gone full circle. The only reason i did this (pyinstaller binary) was because when I sshed in there was no python available.