<div dir="ltr"><div dir="ltr">>  When you run that command, does "some text" appear in the system log?  <br clear="all"><div><div dir="ltr" data-smartmail="gmail_signature"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div>When I run Documents/scripts/ups-log.py manually I do see the expected text echo'ed to the command line.  It actually appends to a Google Sheet, not the internal log files.</div><div><br></div><div>When I would expect to see it triggered by NOTIFYCMD, I don't see any text printed and nothing shows up at the google sheets.  If the permission was being denied, would that be logged somewhere?   </div><div><br></div></div></div></div></div></div></div></div></div><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Feb 11, 2020 at 4:00 AM <<a href="mailto:nut-upsuser-request@alioth-lists.debian.net" target="_blank">nut-upsuser-request@alioth-lists.debian.net</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Send Nut-upsuser mailing list submissions to<br>
        <a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank">nut-upsuser@alioth-lists.debian.net</a><br>
<br>
To subscribe or unsubscribe via the World Wide Web, visit<br>
        <a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
or, via email, send a message with subject or body 'help' to<br>
        <a href="mailto:nut-upsuser-request@alioth-lists.debian.net" target="_blank">nut-upsuser-request@alioth-lists.debian.net</a><br>
<br>
You can reach the person managing the list at<br>
        <a href="mailto:nut-upsuser-owner@alioth-lists.debian.net" target="_blank">nut-upsuser-owner@alioth-lists.debian.net</a><br>
<br>
When replying, please edit your Subject line so it is more specific<br>
than "Re: Contents of Nut-upsuser digest..."<br>
<br>
<br>
Today's Topics:<br>
<br>
   1. NOTIFYCMD not running (Max Pierson-Liénard)<br>
   2. Re: NOTIFYCMD not running (Roger Price)<br>
<br>
<br>
----------------------------------------------------------------------<br>
<br>
Message: 1<br>
Date: Tue, 11 Feb 2020 02:11:45 -0800<br>
From: Max Pierson-Liénard <<a href="mailto:maxpierson@gmail.com" target="_blank">maxpierson@gmail.com</a>><br>
To: <a href="mailto:nut-upsuser@alioth-lists.debian.net" target="_blank">nut-upsuser@alioth-lists.debian.net</a><br>
Subject: [Nut-upsuser] NOTIFYCMD not running<br>
Message-ID:<br>
        <<a href="mailto:CAK31S7ZNLsCkZbTtPW6hMMDyXRc9S34Prgmi0qcDnd34nzjmjQ@mail.gmail.com" target="_blank">CAK31S7ZNLsCkZbTtPW6hMMDyXRc9S34Prgmi0qcDnd34nzjmjQ@mail.gmail.com</a>><br>
Content-Type: text/plain; charset="utf-8"<br>
<br>
Hi, I'm setting up NUT on a raspberry pi 4, following the guide here:<br>
<a href="https://melgrubb.com/2016/12/11/rphs-v2-ups/" rel="noreferrer" target="_blank">https://melgrubb.com/2016/12/11/rphs-v2-ups/</a><br>
OS version: Raspian Buster<br>
NUT version: 2.7.4.8<br>
Installed via: apt package install<br>
Device: Legrand Keor Multiplug connected via USB<br>
<br>
The problem I am experiencing is that *NOTIFYCMD* never runs.  I can<br>
connect to the device via *upsc*, and I receive WALL messages when I<br>
connect and disconnect the power.  I have the following in *upsmon.conf*:<br>
<br>
*MONITOR ROUTERUPS@localhost 1 upsmon <mypassword> master*<br>
*NOTIFYCMD /home/pi/Documents/scripts/ups-log.py*<br>
<br>
<br>
<br>
<br>
<br>
<br>
*NOTIFYFLAG ONLINE       SYSLOG+WALL+EXECNOTIFYFLAG ONBATT<br>
SYSLOG+WALL+EXECNOTIFYFLAG LOWBATT      SYSLOG+WALL+EXECNOTIFYFLAG FSD<br>
 SYSLOG+WALL+EXECNOTIFYFLAG SHUTDOWN     SYSLOG+WALL+EXECNOTIFYFLAG<br>
REPLBATT     SYSLOG+WALL+EXECNOTIFYFLAG NOPARENT     SYSLOG+WALL*<br>
<br>
I am able to run that command,<br>
*/home/pi/Documents/scripts/ups-log.py "some text"*<br>
without any issues, and it doesn't require root privileges.  The owner is<br>
nut and the permissions are 755:<br>
-rwxr-xr-x 1 nut nut 2927 Feb  9 22:26 ups-log.py<br>
<br>
Contents of my /etc/nut/ folder:<br>
<br>
<br>
<br>
<br>
<br>
<br>
*-rw-r----- 1 nut nut  1544 Feb  3 07:40 nut.conf-rw-r----- 1 nut nut  5588<br>
Feb  3 07:38 ups.conf-rw-r----- 1 nut nut  4578 Jun  1  2018<br>
upsd.conf-rw-r----- 1 nut nut  2283 Feb  3 13:27 upsd.users-rw-r----- 1 nut<br>
nut 15434 Feb 10 23:22 upsmon.conf-rw-r----- 1 nut nut 15308 Feb  3 15:45<br>
upsmon.conf.save-rw-r----- 1 nut nut  3887 Jun  1  2018 upssched.conf*<br>
<br>
Contents of my syslog via tail:<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
<br>
*Feb 11 11:59:52 raspberrypi kernel: [ 6355.200755] usb 1-1.4: New USB<br>
device strings: Mfr=1, Product=2, SerialNumber=0Feb 11 11:59:52 raspberrypi<br>
kernel: [ 6355.200768] usb 1-1.4: Product: USB to SerialFeb 11 11:59:52<br>
raspberrypi kernel: [ 6355.200780] usb 1-1.4: Manufacturer: INNO TECHFeb 11<br>
11:59:52 raspberrypi kernel: [ 6355.214192] hid-generic<br>
0003:0665:5161.0002: hiddev96,hidraw0: USB HID v1.00 Device [INNO TECH USB<br>
to Serial] on usb-0000:01:00.0-1.4/input0Feb 11 11:59:52 raspberrypi<br>
mtp-probe: checking bus 1, device 5:<br>
"/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4"Feb<br>
11 11:59:52 raspberrypi mtp-probe: bus: 1, device: 5 was not an MTP<br>
deviceFeb 11 11:59:52 raspberrypi mtp-probe: checking bus 1, device 5:<br>
"/sys/devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.4"Feb<br>
11 11:59:52 raspberrypi mtp-probe: bus: 1, device: 5 was not an MTP<br>
deviceFeb 11 11:59:57 raspberrypi upsmon[14209]: UPS ROUTERUPS@localhost on<br>
batteryFeb 11 12:00:22 raspberrypi upsmon[14209]: UPS ROUTERUPS@localhost<br>
on line power*<br>
<br>
That's as much information as I can think of, it seems like it has to be a<br>
permissions thing but it's not spitting out any kind of error that would<br>
help troubleshoot.<br>
<br>
Thank you for the time!<br>
-------------- next part --------------<br>
An HTML attachment was scrubbed...<br>
URL: <<a href="http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200211/7be8c874/attachment-0001.html" rel="noreferrer" target="_blank">http://alioth-lists.debian.net/pipermail/nut-upsuser/attachments/20200211/7be8c874/attachment-0001.html</a>><br>
<br>
------------------------------<br>
<br>
Message: 2<br>
Date: Tue, 11 Feb 2020 12:55:52 +0100 (CET)<br>
From: Roger Price <<a href="mailto:roger@rogerprice.org" target="_blank">roger@rogerprice.org</a>><br>
To: nut-upsuser Mailing List <<a href="mailto:nut-upsuser@lists.alioth.debian.org" target="_blank">nut-upsuser@lists.alioth.debian.org</a>><br>
Subject: Re: [Nut-upsuser] NOTIFYCMD not running<br>
Message-ID: <alpine.LSU.2.20.2002111252310.5507@titan><br>
Content-Type: text/plain; charset="utf-8"; Format="flowed"<br>
<br>
On Tue, 11 Feb 2020, Max Pierson-Liénard wrote:<br>
<br>
> The problem I am experiencing is that NOTIFYCMD never runs.  I can connect to <br>
> the device via upsc, and I receive WALL messages when I connect and disconnect <br>
> the power.  I have the following in upsmon.conf:<br>
> <br>
> MONITOR ROUTERUPS@localhost 1 upsmon <mypassword> master<br>
> NOTIFYCMD /home/pi/Documents/scripts/ups-log.py<br>
> NOTIFYFLAG ONLINE       SYSLOG+WALL+EXEC<br>
> NOTIFYFLAG ONBATT       SYSLOG+WALL+EXEC<br>
> ... <br>
> I am able to run that command,  <br>
> /home/pi/Documents/scripts/ups-log.py "some text"<br>
> without any issues, and it doesn't require root privileges.  The owner is nut <br>
> and the permissions are 755:<br>
<br>
When you run that command, does "some text" appear in the system log?<br>
<br>
Roger<br>
<br>
------------------------------<br>
<br>
Subject: Digest Footer<br>
<br>
_______________________________________________<br>
Nut-upsuser mailing list<br>
<a href="mailto:Nut-upsuser@alioth-lists.debian.net" target="_blank">Nut-upsuser@alioth-lists.debian.net</a><br>
<a href="https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser" rel="noreferrer" target="_blank">https://alioth-lists.debian.net/cgi-bin/mailman/listinfo/nut-upsuser</a><br>
<br>
------------------------------<br>
<br>
End of Nut-upsuser Digest, Vol 176, Issue 3<br>
*******************************************<br>
</blockquote></div></div>