Hi All,
I have noticed these messages in my logs:
========================================Sep 01 13:14:22 osmc upsd[1450]:
listening on 127.0.0.1 port 3493
Sep 01 13:14:22 osmc upsd[1450]: listening on ::1 port 3493
Sep 01 13:14:22 osmc upsd[1450]: listening on 127.0.0.1 port 3493
Sep 01 13:14:22 osmc upsd[1450]: listening on ::1 port 3493
Sep 01 13:14:22 osmc upsd[1450]: Connected to UPS [T1000G3]: usbhid-ups-
T1000G3
Sep 01 13:14:22 osmc upsd[1450]: Connected to UPS [T1000G3]: usbhid-ups-
T1000G3
Sep 01 13:14:22 osmc systemd[1]: Started Network UPS Tools - power devices 
information server.
Sep 01 13:14:22 osmc systemd[1]: Starting Network UPS Tools - power device 
monitor and shutdown controller...
Sep 01 13:14:22 osmc upsd[1494]: Startup successful
Sep 01 13:14:22 osmc upsmon[1495]: fopen /var/run/nut/upsmon.pid: No such file 
or directory
Sep 01 13:14:22 osmc upsmon[1495]: Using power down flag file /etc/killpower
Sep 01 13:14:22 osmc upsmon[1495]: Unable to use old-style MONITOR line 
without a username
Sep 01 13:14:22 osmc upsmon[1495]: Convert it and add a username to upsd.users 
- see the documentation
Sep 01 13:14:22 osmc upsmon[1495]: Fatal error: unusable configuration
Sep 01 13:14:22 osmc upsmon[1495]: Network UPS Tools upsmon 2.7.2
Sep 01 13:14:22 osmc systemd[1]: nut-monitor.service: control process exited, 
code=exited status=1
Sep 01 13:14:22 osmc systemd[1]: Failed to start Network UPS Tools - power 
device monitor and shutdown controller.
Sep 01 13:14:22 osmc systemd[1]: Unit nut-monitor.service entered failed 
state.
==============
In /run/nut/ I see these entries, with no upsmon.pid present:
$ sudo ls -la /var/run/nut
total 8
drwxrwx---  2 root nut  100 Sep  1 14:44 .
drwxr-xr-x 18 root root 600 Sep  1 13:17 ..
-rw-r--r--  1 nut  nut    5 Sep  1 13:14 upsd.pid
srw-rw----  1 nut  nut    0 Sep  1 14:44 usbhid-ups-T1000G3
-rw-r--r--  1 nut  nut    5 Sep  1 13:14 usbhid-ups-T1000G3.pid
My MONITOR line *has* a username, so I don't understand what I have
configured
wrong this time.  In /etc/nut/upsd.users I have set:
==================================================# The matching MONITOR line in
your upsmon.conf would look like this:
#
# MONITOR myups at localhost 1 upsmon pass master  (or slave)
[upsmon]
        password = 5g>j0vh3NfRW#if
        upsmon master
=================================
The /etc/nut/upsmon.conf file contains:
======================================MONITOR T1000G3 at localhost 1 upsmon
5g>j0vh3NfRW#if master
NOTIFYFLAG ONLINE     SYSLOG+WALL
NOTIFYFLAG ONBATT     SYSLOG+WALL
NOTIFYFLAG LOWBATT    SYSLOG+WALL
# NOTIFYFLAG FSD        SYSLOG+WALL
# NOTIFYFLAG COMMOK     SYSLOG+WALL
# NOTIFYFLAG COMMBAD    SYSLOG+WALL
NOTIFYFLAG SHUTDOWN   SYSLOG+WALL
NOTIFYFLAG REPLBATT   SYSLOG+WALL
# NOTIFYFLAG NOCOMM     SYSLOG+WALL
# NOTIFYFLAG NOPARENT   SYSLOG+WALL
==================================
The /etc/nut/ups.conf has:
=========================[T1000G3]
        driver = usbhid-ups
        port = auto
        vendorid = 03f0
        productid = 1fe2
        desc = "HP T1000 G3 UPS"
===============================
These are the permissions in /etc/nut:
$ ls -la /etc/nut
total 52
drwxr-xr-x  2 root nut   4096 Sep  1 15:05 .
drwxr-xr-x 79 root root  4096 Sep  1 13:15 ..
-rw-r-----  1 root nut   1544 Nov 13  2017 nut.conf
-rw-r-----  1 root nut   4714 Nov 13  2017 ups.conf
-rw-r-----  1 root nut   4578 Mar 20  2015 upsd.conf
-rw-r-----  1 root nut   2184 Sep  1 12:56 upsd.users
-rw-r-----  1 root nut  15642 Sep  1 14:57 upsmon.conf
-rw-r-----  1 root nut   3887 Mar 20  2015 upssched.conf
What may be wrong in my configuration?
-- 
Regards,
Mick
I don’t have the code in front of me at the moment, but my guess is that the config parser stopped parsing at the “#” character. This ends up with a shorter password in upside.users, but a truncated MONITOR line in upsmon.conf. I forget the precedence, but either “\#”, or double quotes around the password should fix it.> On Sep 1, 2018, at 10:09 AM, Mick <michaelkintzios at gmail.com> wrote: > > [upsmon] > password = 5g>j0vh3NfRW#if
On Saturday, 1 September 2018 17:50:13 BST Charles Lepple wrote:> I don’t have the code in front of me at the moment, but my guess is that the > config parser stopped parsing at the “#” character.I suspected a rogue character was being interpreted and used `backticks`, 'single quotes' and then "double quotes", but all failed. I ended up removing the offending # character and it seems to have worked: Sep 01 19:33:00 osmc upsdrvctl[1423]: Using subdriver: MGE HID 1.33 Sep 01 19:33:00 osmc upsdrvctl[1423]: Network UPS Tools - Generic HID driver 0.38 (2.7.2) Sep 01 19:33:00 osmc upsdrvctl[1423]: USB communication driver 0.32 Sep 01 19:33:00 osmc upsdrvctl[1423]: Network UPS Tools - UPS driver controller 2.7.2 Sep 01 19:33:00 osmc usbhid-ups[1459]: Startup successful Sep 01 19:33:02 osmc upsd[1460]: fopen /var/run/nut/upsd.pid: No such file or directory Sep 01 19:33:02 osmc upsd[1460]: listening on 127.0.0.1 port 3493 Sep 01 19:33:02 osmc upsd[1460]: listening on ::1 port 3493 Sep 01 19:33:02 osmc upsd[1460]: listening on 127.0.0.1 port 3493 Sep 01 19:33:02 osmc upsd[1460]: listening on ::1 port 3493 Sep 01 19:33:02 osmc upsd[1460]: Connected to UPS [T1000G3]: usbhid-ups- T1000G3 Sep 01 19:33:02 osmc upsd[1460]: Connected to UPS [T1000G3]: usbhid-ups- T1000G3 Sep 01 19:33:02 osmc upsd[1494]: Startup successful Sep 01 19:33:02 osmc upsmon[1495]: fopen /var/run/nut/upsmon.pid: No such file or directory Sep 01 19:33:02 osmc upsmon[1495]: Using power down flag file /etc/killpower Sep 01 19:33:02 osmc upsmon[1495]: UPS: T1000G3 at localhost (master) (power value 1) Sep 01 19:33:02 osmc upsmon[1495]: Using power down flag file /etc/killpower Sep 01 19:33:02 osmc systemd[1]: PID file /var/run/nut/upsmon.pid not readable (yet?) after start. Sep 01 19:33:02 osmc upsmon[1496]: Startup successful Sep 01 19:33:02 osmc upsmon[1497]: Init SSL without certificate database Sep 01 19:33:03 osmc upsd[1494]: User upsmon@::1 logged into UPS [T1000G3] Thank you very much for your help. Is there a particular command I could run to make sure upsmon is working as expected? A recent battery failure caused the server to crash, but thankfully it didn't corrupt any data. -- Regards, Mick