I am a new user of home assistant, and I’m loving it so far. I have also recently discovered how to use irsend and lirc to transmit IR to devices. I have one r.Pi3 running HA, and another r.Pi3 on the network setup for lirc. I have written a .sh script on the HA Pi that connects to the remote Pi and executes the infrared trasmit command. This works perfectly running it from the command line directly “/home/pi/sewing_ac_on.sh”. I tried placing a shell command and a script to call it in HA, but that doesn’t work properly. Here’s the piece of my configuration.yaml file.
Thanks for your help! I tried adding a period before the command - didn’t change anything. I also added /home/pi in the PATH variable, which also didn’t change anything. I also tried copying the script to /home/hass (as I used the rPi AiO installer), and adding that to the PATH variable for the hass user, but that didn’t do it either. I also tried making a file without .sh and with just the command but that didn’t work. Any other thoughts as to what I could do to get this working?
@VladTepz - the local irsend commands are not what I’m having issue with - they work perfectly fine. Only the execution of the .sh file to issue commands remotely is what is not running correctly via HA.
I installed HA with All in one installer on a raspberry pi 3. I also had no luck with executing any shell command.
After hour of finding a solution, I changed the home-assistant.service from user hass to user pi and give the .homeassistant folder 777 rights.
Now I can execute any script or command also with sudo etc…
I dont know if this is the perfect solution, but it works for me.