I’m not sure what category fits best so I figured config covers it…
I tried setting this up on a Pi3b with the main hassos image and it worked but I couldn’t get my serial to work. Everyone said I need a supervised install to make serial work so I put that aside and did a supervised install on a pi4/4g with raspbian buster and got serial working but now my command line switches died. I found that there are HUGE differences in how things work in hassos vs supervised within the config file!
I have SSH set up into the main host OS and I also added the SSH add-on so I have access to the HA environment through the web terminal. Both environments are very different in how they act. I have a relay board I need to send two numbers to. I can do it via command line or bash script from ssh into the main OS and it also works from the HA add-on ssh terminal environment, but fails when put into the yaml as a shell_command. I thought it was bash scripts in general but have realized that it is mainly ones that use tcp.
Just entering commands from command line or running as a script I was successful with:
1. Echo to nc
2. Echo to /dev/tcp
3. Curl
But neither work from a shell_command within the system. I have basically the same script echo to /dev/ttyAMA0 for serial and the only difference here is the path that is echoed to so I assume the running Home Assistant has no access to /dev/tcp as a script. The fact nc doesn’t work from within a script proves that too. However, I have a tcp sensor set up to that ip and port that DOES work… so the Home Assistant environment has permission to use it, just not she’ll commands from within… so I don’t really know where to look to give scripts access to tcp functionality. I see tons of people running scripts echoing to /dev/tcp, netcat, AND curl so I know I must be missing something. Supervised runs as user root so it should be good AND I can’t do the “add user home assistant to dial out group” bc there is no user for that, only root.
Any ideas where to look to make these functions work? They were super easy in the hassos image (I used bash scripts with nc there) but I’m lost as to why it won’t work in supervised… I’m going on day three and I feel like it’s going to be something so obvious…