Nut Commands (upscmd)

I would really like to contribute, but have no experience with contributing to an add-on.

Is there a guide?

I have a large UPS ( 9355-30-NL-15 by Powerware Corporation - 27 kW - 28 kWh)
The driver in NUT has only a few device actions.
I have communication up and running and can perform test :smiley:

I would ideally have all the controls that are described in the manual- see pic.

I don’t really understand how I can send commands using NUT integration. I’m running HAOS and don’t see any Device Actions.

I have the NUT add-on running as server on the same HAOS device.

1 Like

Maybe there is some guide how to do this? Unfortunately I do not have an access to my HA with UPS right now (it is in other country), so I cannot check this… But maybe the integration author can help?

Sorry, but where can I see these Actions?

1 Like

You can see the actions in a few ways, like when creating a script or automation from the UI and selecting as one of the actions Device Actions.

For a script: Settings > Automations & scenes > Scripts (on the top) > Add script > Create new script > Add Action > Device > Look for your UPS device in the Device dropdown

The Action dropdown will have all the available actions.

ezgif-1-e1b10c5e22

6 Likes

Noob question, but how are you running docker exec? I’ve tried to run it in both the VSCode addon’s terminal & ssh addon, and in both cases, I’m getting:

$ docker
zsh: command not found: docker

Obviously, this is because both of these terminals are running a docker container themselves, but that begs the question, how do you shell into the docker host itself? Are you using the Home Assistant debug mode?

Looks like OP is inactive, but is it possible for a moderate to mark this post as the solution for this thread?

CC @tom_l

You can enable SSH in HAOS to run docker commands.

Yes, I used Debug Mode to execute the command (you need ssh access to the host in order to control the docker containers, you cannot send commands from within an Add-on itself).

But if you don’t want to go through all that, now device actions are available for Network UPS Tools, so you can create a script / automation that executes the command on the chosen UPS.

When you are creating your script / automation, just add a device action and search for your UPS with the name you have given to it, then it will list all the possible commands you can run.

1 Like

The beeper should be implemented as a switch on the NUT device in Home Assistant, not just a device action that’s hidden away. Would make it much more friendly. Right now, there’s just a “Beeper status” binary sensor instead that you can’t interact with:
image

1 Like