The pfSense Store

Author Topic: NUT package  (Read 23232 times)

0 Members and 1 Guest are viewing this topic.

Offline w0w

  • Sr. Member
  • ****
  • Posts: 534
  • Karma: +30/-6
  • kernel panic attack
    • View Profile
Re: NUT package
« Reply #270 on: December 01, 2017, 11:24:59 pm »
So does the latest beta 2.4.3 have these PR's?

Offline dennypage

  • Hero Member
  • *****
  • Posts: 697
  • Karma: +133/-0
    • View Profile
Re: NUT package
« Reply #271 on: December 02, 2017, 12:31:42 am »
Hey w0w,

Iím traveling...  I donít recall seeing merge notifications, but I get a lot of email. You should be able to check the PRs in the main pfSense and FreeBSD repos to see if theyíre still outstanding. If not Iíll check it when I get home.

Thanks,
Denny

Offline fox983

  • Newbie
  • *
  • Posts: 1
  • Karma: +0/-0
    • View Profile
Re: NUT package
« Reply #272 on: December 09, 2017, 09:51:09 am »
But i found a Problem with the override values. As i said above, i have set the following to the additional ups.conf field in pfSense:

Code: [Select]
ignorelb
override.battery.charge.low = 50
override.battery.runtime.low = 1200

BUT These values are added on top of the ups.conf file, which means in my case, they are ignored. When i edit the ups.conf manually from ssh / Shell, and set thes override values at the bottom of the file and restart the daemon, the everything works and also the Monitoring in pfsense Show the new values. Is this a bug? Problem is, after reboot or restart the daemon, These values are not the anymore...

The section entitled "Additional configuration lines for ups.conf" in Advanced settings is for global directives. The values you are trying to set are UPS specific arguments. UPS specific arguments should be entered in the section above that says "Extra Arguments to driver"

Sorry this isn't clear. I'll have a look at clarifying.

Hello and thanks for the great work.
I'm working with pfSense and NUT  2.7.4_5 package. The "bug" still remains, if I edit (via webpage) the "Extra Arguments to driver (optional)" with

ignorelb
override.battery.charge.low = 30

all works correctly, it adds the 2 lines AFTER

[myups]
driver=usbhid-ups
port=auto

in "/usr/local/etc/nut/ups.conf" file.
But if I edit the "Additional configuration lines for ups.conf", which it seems to be more correct (http://networkupstools.org/docs/man/ups.conf.html), it adds the lines at beginning of the file, and it doesn't work.
All other configuration settings (upsmon.conf, upsd.conf, upsd.users) add lines at the end of the files (checked via ssh), as it should be I think...

Offline dennypage

  • Hero Member
  • *****
  • Posts: 697
  • Karma: +133/-0
    • View Profile
Re: NUT package
« Reply #273 on: December 09, 2017, 10:47:58 am »
The "bug" still remains, if I edit (via webpage) the "Extra Arguments to driver (optional)" with

ignorelb
override.battery.charge.low = 30

all works correctly, it adds the 2 lines AFTER

[myups]
driver=usbhid-ups
port=auto

in "/usr/local/etc/nut/ups.conf" file.
But if I edit the "Additional configuration lines for ups.conf", which it seems to be more correct (http://networkupstools.org/docs/man/ups.conf.html), it adds the lines at beginning of the file, and it doesn't work.

Not sure what "bug" you are referring to...

The directives you are trying to use are not global directives, but are UPS specific directives.
It's easy to overlook this at the beginning of the ups.conf manual page:

  "The file begins with global directives, and then each UPS has a section which contains a number of directives that set parameters for that UPS."

In other words, the general format of ups.conf looks like this:

Code: [Select]
global_directive1
global_directive2
global_directive3

[ups1]
ups_directive1
ups_directive2
ups_directive3

[ups2]
ups_directive1
ups_directive2
ups_directive3

All global directives must appear before the first UPS section. So the "Additional configuration lines for ups.conf" in the Advanced section is only for global directives only, and anything put there will appear before the UPS section. The "Extra Arguments to driver" section is for things that apply to your UPS driver, and will be placed in the UPS section.

Adding extra driver arguments is somewhat common, but the vast majority of users do not need anything under Advanced settings which is why they are hidden by default.

Offline dennypage

  • Hero Member
  • *****
  • Posts: 697
  • Karma: +133/-0
    • View Profile
Re: NUT package
« Reply #274 on: December 09, 2017, 10:51:28 am »
You should be able to check the PRs in the main pfSense and FreeBSD repos to see if theyíre still outstanding. If not Iíll check it when I get home.

The PR for the NUT package has been merged, but the PR for mainline pfSense is still pending review/testing.

Offline dtallon13

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: NUT package
« Reply #275 on: December 09, 2017, 08:03:34 pm »
Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

If the UPS model is important, I am looking at a CP850PFCLCD connected via USB but it's not set in stone.

Offline dennypage

  • Hero Member
  • *****
  • Posts: 697
  • Karma: +133/-0
    • View Profile
Re: NUT package
« Reply #276 on: December 09, 2017, 10:02:04 pm »
Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

Yes to all. This is what NUT does for a living.

By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level--around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.

Offline dtallon13

  • Newbie
  • *
  • Posts: 2
  • Karma: +0/-0
    • View Profile
Re: NUT package
« Reply #277 on: Yesterday at 09:50:32 am »
Probably a really stupid question, but I want to confirm that this package allow the firewall to shut off in the event of power loss? Even better, could I program it to keep the firewall on battery until it gets to a certain percentage or a certain amount of time passes?

Yes to all. This is what NUT does for a living.

By default, NUT will initiate a shutdown when the UPS issues a Low Battery signal. The default values for a Low Battery signal changes from UPS to UPS, but most UPSs are pre-programmed for a pretty low level--around 5% or so. You can override this with the battery.charge.low and battery.runtime.low variables discussed earlier in this thread. See the NUT driver documentation and the ups.conf man page and for more information.

Awesome sauce! Thanks for tolerating my laziness  :P