#I just added the terminal add on and

1 messages ยท Page 1 of 1 (latest)

dim notch
#

starting thread to keep channel clear

glass crescent
#

thx

dim notch
#

first ensure that that the terminal addon is not running in protection mode

glass crescent
#

I'm kinda frazzled.. full day at work then come home and getting ready to get to bed and this happens. ๐Ÿ˜ฆ

#

where is that switch? I don't see it:

dim notch
#

info tab

glass crescent
#

still don't see that switch..?

dim notch
#

ah you have an older version of terminal;

glass crescent
#

I just typed terminal in add-on store and chose the matching result.. don't know why an old one would be the default..? ๐Ÿค”

dim notch
#

look for "Advanced SSH & Web Terminal"

glass crescent
#

found. installing (do I need to uninstall the other one?)

dim notch
#

no you can have both just ensure your using the right one

glass crescent
#

ok, got it:

dim notch
#

bingo, is it starting correctly? you may have to set a password

glass crescent
#

hmm.. no, it failed it seems according to the logs:

s6-rc: info: service init-docker: starting
[22:53:29] FATAL: 
[22:53:29] INFO: Docker support has been enabled.
s6-rc: info: service init-mysql successfully started
s6-rc: info: service init-mosquitto successfully started
s6-rc: info: service init-docker successfully started
[22:53:29] FATAL: Configuration of this add-on is incomplete.
[22:53:29] FATAL: 
[22:53:29] FATAL: Please be sure to set at least an SSH password
[22:53:29] FATAL: or at least one authorized key!
[22:53:29] FATAL: 
[22:53:29] FATAL: You can configure this using the "ssh.password"
[22:53:29] FATAL: or the "ssh.authorized_keys" option in the
[22:53:29] FATAL: add-on configuration.
[22:53:29] FATAL: 
s6-rc: warning: unable to start service init-ssh: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
dim notch
#

configuration tab

glass crescent
#

is this enough? ๐Ÿ™‚

dim notch
glass crescent
#

ok, done restarted and it seems like its running ok now

#
s6-rc: info: service sshd: starting
s6-rc: info: service sshd successfully started
s6-rc: info: service ttyd successfully started
s6-rc: info: service legacy-services: starting
[22:55:53] INFO: Starting the ttyd daemon...
[22:55:53] INFO: Starting the SSH daemon...
Server listening on 0.0.0.0 port 22.
Server listening on :: port 22.
s6-rc: info: service legacy-services successfully started
dim notch
#

ok now open its ui and you should be into the terminal

glass crescent
#

so far so good..

dim notch
#

docker ps

glass crescent
#

that spits out a LOT of stuff

dim notch
#

one of them will be for the nut addon?

glass crescent
#
77afffc93d67   ghcr.io/hassio-addons/nut/amd64:0.14.0                         "/init"                  56 minutes ago       Up 56 minutes                                                                                                                                          addon_a0d7b954_nut

this one?

dim notch
#

docker exec -it addon_a0d7b954_nut /bin/bash

glass crescent
#

worked?

dim notch
#

you are now in the shell in the container

#

upscmd should now be accessible

glass crescent
#

ok.. I tried the command shown in the docs but I don't know the ups name apparently..?

root@a0d7b954-nut:/# upscmd -l my_ups
Error: Unknown UPS
root@a0d7b954-nut:/# 
#

is it in here somewhere?

#

AHA! found the name

dim notch
#

progress!

glass crescent
#

OK.. got a reply:

root@a0d7b954-nut:/# upscmd -l myups
Instant commands supported on UPS [myups]:

beeper.disable - Disable the UPS beeper
beeper.enable - Enable the UPS beeper
beeper.mute - Temporarily mute the UPS beeper
beeper.off - Obsolete (use beeper.disable or beeper.mute)
beeper.on - Obsolete (use beeper.enable)
load.off - Turn off the load immediately
load.off.delay - Turn off the load with a delay (seconds)
shutdown.reboot - Shut down the load briefly while rebooting the UPS
shutdown.stop - Stop a shutdown in progress
test.panel.start - Start testing the UPS panel
test.panel.stop - Stop a UPS panel test
root@a0d7b954-nut:/# 
#

well.. hmmm.. that didn't work:

root@a0d7b954-nut:/# upscmd beeper.disable
Network UPS Tools upscmd 2.8.0

usage: upscmd [-h]
       upscmd [-l <ups>]
       upscmd [-u <username>] [-p <password>] [-w] [-t <timeout>] <ups> <command> [<value>]

Administration program to initiate instant commands on UPS hardware.

  -h            display this help text
  -l <ups>      show available commands on UPS <ups>
  -u <username> set username for command authentication
  -p <password> set password for command authentication
  -w            wait for the completion of command by the driver
                and return its actual result from the device
  -t <timeout>  set a timeout when using -w (in seconds, default: 10)

  <ups>         UPS identifier - <upsname>[@<hostname>[:<port>]]
  <command>     Valid instant command - test.panel.start, etc.
  [<value>]     Additional data for command - number of seconds, etc.
root@a0d7b954-nut:/# 
dim notch
#

so something like upscmd myups beeper.disable

#

need to specify the ups to send the command to

glass crescent
#

SUCCESS!!!!!!!! ๐Ÿ˜๐Ÿ˜‚๐Ÿคฃ ๐Ÿ˜๐Ÿ˜‚๐Ÿคฃ. ๐Ÿ˜๐Ÿ˜‚๐Ÿคฃ

#
root@a0d7b954-nut:/# upscmd myups beeper.disable
Username (root): upscmd myups beeper.mute
Password: 
Unexpected response from upsd: ERR USERNAME-REQUIRED
root@a0d7b954-nut:/#
#

it STFU'd! Holy crap. I thought I was gunna die tonight O.O

#

Not only is she trying to sleep, but she goes in for a colonoscopy tomorrow so is miserable and gunna be up most the night. the screeching alarm was just the topping on a crap cake! O.O

dim notch
#

yeah loosing wife points in that situation is never good

glass crescent
#

why in the world would it be this convoluted to do such a common task that seems like it should have been made into a switch like years ago!

dim notch
#

i suggest you make some notes about this proceedure for youeself

glass crescent
#

yup. adding it to secure notes in lastpass right now

dim notch
#

does seem like something you would want. i have never used nut so dont know much about its server or intregration so dont know how easy it wouuld be to add. but in any case you now have learnt a few things and know how to solve the problem if it happens again ๐Ÿ™‚

glass crescent
#

yeah.. the thing I hate is not knowing enough to know how to get the answers other folks seem to have. I don't know anything about using docker at the command line. its really hidden from you in home assistant and the only other place I have it is on my unraid boxes- where it is also mostly hidden. you really never have to step outside the gui..

#

though on unraid at least it has a convient way to get a bash shell in the docker container