gerliczky
(István Gerliczky)
October 14, 2021, 6:47pm
1
I would like to create a command line switch to be able to control the beeper of my UPS. An example command would be the following:
upscmd -u USER-p PASSWORD eaton5e beeper.disable
switch:
- platform: command_line
switches:
eaton5e_beeper:
command_on: 'upscmd -u USER-p PASSWORD eaton5e beeper.enable'
command_off: 'upscmd -u USER-p PASSWORD eaton5e beeper.disable'
It works fluently, when I execute it in the console of the NUT addon docker container, but in a command line switch I get Unknown Command error.
Is there any simple way to create such a command line switch without sshpass, etc.?
Maybe an Execute Command service for NUT Integration?
gerliczky
(István Gerliczky)
October 16, 2021, 3:26am
2
For those, who are looking for a solution:
Dude, that is awesome! It is working well now. So much more straight forward than sshpass ever was.
Thanks
Final automation:
- id: drups beeper off
alias: "DRUPS beeper off"
trigger:
platform: state
entity_id: input_boolean.drups_beeper
to: 'off'
action:
service: hassio.addon_stdin
data:
addon: a0d7b954_ssh
input: sh /config/boff.sh
Final shell script
sudo docker exec addon_a0d7b954_nut upscmd -u admin -p xxxx [email protected] beeper.disable
And some explanation:
Hi Everyone,
I’ve just spent 9 or so hours trying to figure out how to run CATT through node-red, and one of the things that surprised me is the large number of people having the same problem as me. I was trying to use a shell_command to run a CATT command. However, no matter what I tried, It would give me 127 or 126 errors.
The problem lies in the way that hassos works. For those who don’t know, hassos is actually a docker-style instance with multiple containers (you can see this by installin…
2 Likes
Solution is now broken due to the update removing the hassio.addon_stdin service - another poster found clarity on the status of the service: Replacement for this service : hassio.addon_stdin - #3 by pergola.fabio
Have you found a new work around since the updates?