NUT Package (2.8.1 and above)
-
@dennypage said in NUT Package (2.8.1 and above):
@endy66 In the output I see one local connection and one remote connection.
The local connection will be upsmon, and is the one that is on
::1.2785
->::1.3493
. This will be userlocal-monitor
. You can easily confirm this withsockstat -c | grep 3493
The local upsmon connection should generate a log entry like this,
Feb 1 08:01:20 fw upsd[45590]: User local-monitor@::1 logged into UPS [CyberPower_USV]
however you did not show such a log entry. Given that you clearly have a local upsmon connection, there absolutely should be a corresponding log entry.
The remote connection is on
192.168.1.8.33624
->192.168.1.1.3493
. This presumably is one of your client-xx users.In sort, your config files are good. Your netstat output is good, with one remote connection [there is no second remote connection]. The only thing is that I cannot reconcile your configuration files and netstat output with the log entries that you posted.
Is it possible that you made configuration changes between when the logs were taken and when the config files / netstat output were taken?
I've re-checked everything and you're right indeed, I might have missed something. The log only shows the local and one remote connection
User local-monitor@::1 logged into UPS [CyberPower_USV] User client-xx1@192.168.1.8 logged into UPS [CyberPower_USV]
So the second user is missing, but I'm clearly able to receive all the values on it. This client is a Home Assistant instance with the NUT client package and I see all the things. And I also used the second login I specified in upsd.users.
-
@endy66 said in NUT Package (2.8.1 and above):
So the second user is missing, but I'm clearly able to receive all the values on it. This client is a Home Assistant instance with the NUT client package and I see all the things.
This one?
-
@dennypage said in NUT Package (2.8.1 and above):
@endy66 said in NUT Package (2.8.1 and above):
So the second user is missing, but I'm clearly able to receive all the values on it. This client is a Home Assistant instance with the NUT client package and I see all the things.
This one?
Yes exactly.
-
@endy66 That's what I thought.
The short version is that you are wasting your time trying to set up a username/password for a remote HA client because the HA integration doesn't use it. You don't need to enter a username/password when you set up the integration.
Since you asked, here's the longer version...
You won't see a login from the integration because it isn't a NUT client, and doesn't actually send a LOGON command to upsd. The NUT HA integration doesn't even send the username and password for remote connections. And even if it did send the username/password, upsd would not attempt to validate it until a command (such as LOGON or an instant command) is sent by the client.
NUT allows read-only access to ups information without a login which is how the HA integration is written. It connects every 60 seconds (default), polls current status, and disconnects. An actual NUT monitoring client is different. It connects, sends username and password, then issues a LOGIN command to attach to the UPS. It remains connected and polls the UPS on a frequent interval (usually less than 15 seconds).
For upsd, the difference is significant. A logged in client is something that upsd is responsible for, and it will monitor the client connection and wait for the client to disconnect before initiating its own shutdown. A non logged in client is expected to be something like a web page. Information display only.
I believe that the only time the username/password for HA NUT is used is if you are running the dedicated HA OS and want to be able to issue instant commands to the UPS. Entertainingly, even though it has not sent a LOGIN command, the HA integrations always sends a LOGOUT command before disconnecting from upsd. Very polite.
-
@dennypage said in NUT Package (2.8.1 and above):
@endy66 That's what I thought.
The short version is that you are wasting your time trying to set up a username/password for a remote HA client because the HA integration doesn't use it. You don't need to enter a username/password when you set up the integration.
Since you asked, here's the longer version...
You won't see a login from the integration because it isn't a NUT client, and doesn't actually send a LOGON command to upsd. The NUT HA integration doesn't even send the username and password for remote connections. And even if it did send the username/password, upsd would not attempt to validate it until a command (such as LOGON or an instant command) is sent by the client.
NUT allows read-only access to ups information without a login which is how the HA integration is written. It connects every 60 seconds (default), polls current status, and disconnects. An actual NUT monitoring client is different. It connects, sends username and password, then issues a LOGIN command to attach to the UPS. It remains connected and polls the UPS on a frequent interval (usually less than 15 seconds).
For upsd, the difference is significant. A logged in client is something that upsd is responsible for, and it will monitor the client connection and wait for the client to disconnect before initiating its own shutdown. A non logged in client is expected to be something like a web page. Information display only.
I believe that the only time the username/password for HA NUT is used is if you are running the dedicated HA OS and want to be able to issue instant commands to the UPS. Entertainingly, even though it has not sent a LOGIN command, the HA integrations always sends a LOGOUT command before disconnecting from upsd. Very polite.
Thank you so much for this detailed explanation! I didn't knew that there's such a difference or even that the HA integration isn't a "real" NUT client and it also works that different. Then I'll remove the second user from my pfSense.
However the integration on HA still helps for notifying if there's a power outtage, even if it's not instant. The server where HA (a VM) runs on, has proper NUT integration (the first client), so it still can shut down properly. I just wondered what's going on as I haven't seen any "login" logs in the pfSense box. Now I know. Thanks again so much for your awesome support, appreciate it a lot! -
@endy66 said in NUT Package (2.8.1 and above):
Thank you so much for this detailed explanation!
You're welcome.
However the integration on HA still helps for notifying if there's a power outtage, even if it's not instant.
Just FYI, HA may miss the power outage completely if it is shorter than the polling interval.
-
@dennypage said in NUT Package (2.8.1 and above):
Just FYI, HA may miss the power outage completely if it is shorter than the polling interval.
That's true yes. I set up a delay of some seconds because I only need a notification if it's a real / longer power outage, otherwise my UPS will just kick in and since it has the capacity to provide power for almost an hour, it's okay to get the norification a bit delayed.
-
@endy66 Cool. Just wanted to make sure you were aware.
-
This post is deleted! -
I dunno what happened. I just updated to 2.8.2_1 and now my tripplite USB connection isn't working.
[nutdev1]
driver = "tripplite_usb"
port = "auto"
vendorid = "09AE"
productid = "0001"
product = "TRIPP LITE SMART500RT1U"
vendor = "Tripp Lite"
bus = "000"
device = "002"
busport = "005"
###NOTMATCHED-YET###bcdDevice = "000A" -
@incith I just did the package upgrade and although the service appeared to be working, it wasn't.
I went to Services -> UPS and UPS Status brought up errors, but then I went to the "UPS Settings" tab and everything looked fine so just pressed Save at the bottom and service is running fine. Maybe try pressing the Save button from the settings page and see if this works for you?
-
NUT Package (2.8.1 and above)
and now its
NUT Package (2.8.1 and above - and back again)
as I received a message from my pfSense :
Notifications in this message: 1 ================================ 13:01:10 The following updates are available and can be installed using System > Package Manager: nut: 2.8.2_1 ==> 2.8.2 (downgrade)
So the update is a downgrade ?
Or is 2.8.2 a more recent as 2.8.2_1 because the name (numbering) changed ?
-
Hello all,
it seems i have new/old issues with nut 2.8.2_1 on 2.7.2-RELEASE (amd64)
I need to reload service to get it up again. Its on serial connection.
Can i do something about this?Feb 9 22:20:41 upsmon 80900 UPS RielloSEP2200: on bypass (powered, not protecting) Feb 9 22:20:41 upsmon 80900 Communications with UPS RielloSEP2200 established Feb 9 22:20:38 upsd 73072 Connected to UPS [RielloSEP2200]: riello_ser-RielloSEP2200 Feb 9 22:20:37 riello_ser 66770 Startup successful Feb 9 22:20:36 upsmon 80900 Poll UPS [RielloSEP2200] failed - Driver not connected Feb 9 22:20:31 upsmon 80900 Poll UPS [RielloSEP2200] failed - Driver not connected Feb 9 22:20:26 upsmon 80900 UPS RielloSEP2200 is unavailable Feb 9 22:20:26 upsmon 80900 Poll UPS [RielloSEP2200] failed - Driver not connected Feb 9 22:20:21 upsmon 80900 Communications with UPS RielloSEP2200 lost Feb 9 22:20:21 upsmon 80900 Poll UPS [RielloSEP2200] failed - Driver not connected Feb 9 22:20:21 upsd 73072 User local-monitor@127.0.0.1 logged into UPS [RielloSEP2200] Feb 9 22:20:21 upsmon 80419 Startup successful Feb 9 22:20:20 upsd 73072 Startup successful Feb 9 22:20:20 upsd 72610 Found 1 UPS defined in ups.conf Feb 9 22:20:20 upsd 72610 Can't connect to UPS [RielloSEP2200] (riello_ser-RielloSEP2200): Connection refused Feb 9 22:20:20 upsd 72610 listening on ::1 port 3493 Feb 9 22:20:20 upsd 72610 listening on 127.0.0.1 port 3493 Feb 9 22:20:20 upsmon 58399 Signal 15: exiting Feb 9 22:20:20 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:20:15 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:20:09 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:20:07 php-fpm 95968 /pfblockerng/pfblockerng_update.php: Successful login for user 'admin' from: 192.168.1.210 (Local Database) Feb 9 22:20:04 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:59 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:54 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:49 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:44 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:39 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:34 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:29 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:24 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:19 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:14 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:09 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:19:04 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:59 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:54 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:49 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:44 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:39 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:34 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:29 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:24 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:19 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:14 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:09 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:18:04 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:59 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:54 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:49 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:44 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:39 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:34 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:29 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:24 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:19 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:14 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:09 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:17:04 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:59 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:54 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:49 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:44 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:39 upsmon 58399 UPS RielloSEP2200 is unavailable Feb 9 22:16:39 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:34 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:29 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:23 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:18 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:13 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:08 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:16:03 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:58 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:53 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:48 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:43 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:38 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:33 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:28 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:23 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:18 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:13 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:08 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused Feb 9 22:15:03 upsmon 58399 UPS [RielloSEP2200]: connect failed: Connection failure: Connection refused
-
Not sure if this is a reasonable forum to post this in, but maybe somebody has a helpful idea.
I have NUT 2.8.2.1 installed on pfSense+ (Netgate 8200).
I have three Synology units in my network. Two DS120j and one DS1522. Both of the DS120j can see the NUT server and configure it. The DS1522 just reports "No UPS is connected." Settings are identical in all Synology. I have tried disabling the firewall in the DS1522 (although the DS120j are happy with firewall enabled).
Any suggestions on what to look for?
-
Hey all,
Sorry, but I am out of the loop with whatever change just happened. I tried to get the update locked in before my trip, but it didn’t happen. I won’t be able to work on an update until the week of the 19th.
In the interim, if you have an outstanding issue I suggest looking earlier in this thread for executables that I posted several weeks ago.
Again, sorry for the upheaval.
Denny
-
@dennypage when I try to service nut onestart..
I tried chmod everything to 0777
Network UPS Tools - UPS driver controller 2.8.1.1
Network UPS Tools - Tripp Lite OMNIVS / SMARTPRO driver 0.35 (2.8.1.1)
Warning: This is an experimental driver.
Some features may not function correctly.libusb1: Could not open any HID devices: insufficient permissions on everything
No matching USB/HID UPS found
upsnotify: failed to notify about state 4: no notification tech defined, will not spam more about it
Driver failed to start (exit status=1)
/usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut -
Quick note: Based on a notice I just received from my own firewall, it might be worthwhile to thy
pkg upgrade
from the command line and then re-save the config.
-
@hspindel said in NUT Package (2.8.1 and above):
Not sure if this is a reasonable forum to post this in, but maybe somebody has a helpful idea.
I have NUT 2.8.2.1 installed on pfSense+ (Netgate 8200).
I have three Synology units in my network. Two DS120j and one DS1522. Both of the DS120j can see the NUT server and configure it. The DS1522 just reports "No UPS is connected." Settings are identical in all Synology. I have tried disabling the firewall in the DS1522 (although the DS120j are happy with firewall enabled).
Any suggestions on what to look for?
I have some additional clues:
upsc NUTIP returns Connection Refused on DS1522, returns correct status on other Synologies.
telnet NUTIP 3493 returns Connection Refused on DS1522, connects to NUT server from any other computer on the network.
It appears to me that this is not an issue with pfSense (on which the NUT server is running) since it works for every device except the DS1522. I tried adding a special firewall rule to pfSense, but it made no difference. My guess is something is wrong with the DS1522's request.
-
curl -O https://pkg01-atx.netgate.com/pfSense_v2_7_1_amd64-pfSense_v2_7_1/All/pfSense-pkg-nut-2.8.2.pkg curl -O https://pkg01-atx.netgate.com/pfSense_v2_7_1_amd64-pfSense_v2_7_1/All/nut-devel-2023.10.07_1.pkg pkg install -f ./nut-devel-2023.10.07_1.pkg pkg install -f ./pfSense-pkg-nut-2.8.2.pkg
You may just need nut-devel...I did both. UPS is back online.
-
@incith said in NUT Package (2.8.1 and above):
curl -O https://pkg01-atx.netgate.com/pfSense_v2_7_1_amd64-pfSense_v2_7_1/All/pfSense-pkg-nut-2.8.2.pkg curl -O https://pkg01-atx.netgate.com/pfSense_v2_7_1_amd64-pfSense_v2_7_1/All/nut-devel-2023.10.07_1.pkg pkg install -f ./nut-devel-2023.10.07_1.pkg pkg install -f ./pfSense-pkg-nut-2.8.2.pkg
You may just need nut-devel...I did both. UPS is back online.
Update/Edit: noticing that nut is not listed in my Package manager after this. May need to just do a pkg remove pfSense-pkg-nut nut-devel in a few weeks once a fix is posted. Not sure honestly.