OPNsense Forum

English Forums => General Discussion => Topic started by: HFsi on July 02, 2018, 08:39:52 pm

Title: Nut not loading
Post by: HFsi on July 02, 2018, 08:39:52 pm
Hi all!
I´ve just installed nut plugin, my UPS is well detected, but the service fails to start.
Here is the log:

Jul 2 15:18:23   root: /usr/local/etc/rc.d/nut_upsmon: WARNING: failed to start nut_upsmon
Jul 2 15:18:23   root: /usr/local/etc/rc.d/nut: WARNING: failed precmd routine for nut
Jul 2 15:15:10   kernel: ugen0.2: <American Power Conversion Back-UPS RS 900G FW879.L4 .I USB FWL4> at usbus0

Any tips for debugging?

Thanks!
Title: Re: Nut not loading
Post by: mimugmail on July 02, 2018, 09:32:28 pm
Is this a production machine or can it be rebootet some time?
Title: Re: Nut not loading
Post by: RFGuy_KCCO on July 04, 2018, 07:23:09 pm
One thing that tripped me up when I first used Nut was that I had spaces in the UPS name, which I learned doesn’t work. Do you happen to have any spaces in your UPS name?
Title: Re: Nut not loading
Post by: mimugmail on July 04, 2018, 08:52:12 pm
Really? I thought I put a validator on this or did you start with a Dev version?
Title: Re: Nut not loading
Post by: Tripple_Delta on July 05, 2018, 11:46:26 am
One thing that tripped me up when I first used Nut was that I had spaces in the UPS name, which I learned doesn’t work. Do you happen to have any spaces in your UPS name?

Fixed my problem. Thanks.
Title: Re: Nut not loading
Post by: RFGuy_KCCO on July 05, 2018, 03:19:08 pm
I started with the Dev version.
Title: Re: Nut not loading
Post by: mimugmail on July 05, 2018, 03:35:19 pm
I already saw there's no validator. I'll add one so a space and special chars are denied.
Title: Re: Nut not loading
Post by: HFsi on August 03, 2018, 05:21:56 pm
My UPS name is "BR900".

I get this on System: Log Files: Configd
configd.py: [563d2a24-c52f-4f97-a982-4e296ea97c5f] Script action failed with Command '/usr/local/bin/upsc 'BR900@127.0.0.1'' returned non-zero exit status 1 at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/processhandler.py", line 479, in execute stdout=output_stream, stderr=error_stream) File "/usr/local/lib/python2.7/subprocess.py", line 190, in check_call raise CalledProcessError(retcode, cmd) CalledProcessError: Command '/usr/local/bin/upsc 'BR900@127.0.0.1'' returned non-zero exit status 1

But the UPS is found
Title: Re: Nut not loading
Post by: mimugmail on August 03, 2018, 06:54:53 pm
What happens when you execute this command via CLI?
Title: Re: Nut not loading
Post by: HFsi on September 24, 2018, 04:00:32 pm
Well, I finally gave up on this because I made it work through Home Assistant...
Now comes the part of the automation to shutdown all my devices in the case of a power shortage
Title: Re: Nut not loading
Post by: mimugmail on September 24, 2018, 04:36:33 pm
Then you should configure OPNsense as netclient to shutdown itself
Title: Re: Nut not loading
Post by: HFsi on September 24, 2018, 05:27:54 pm
Thanks for the tip, my approach was more difficult
Title: Re: Nut not loading
Post by: mimugmail on October 08, 2018, 01:30:17 pm
:) :)

Will you provide some detail? Version? Error? UPS model?
Title: Re: Nut not loading
Post by: HFsi on November 08, 2018, 05:54:53 pm
I´m now using NUT 1.3 as netclient and works fine, but I don´t see any configuration for shutting down OPN
Title: Re: Nut not loading
Post by: mimugmail on November 08, 2018, 07:57:11 pm
I´m now using NUT 1.3 as netclient and works fine, but I don´t see any configuration for shutting down OPN

Uhm .. me too .. I forgot some parts in templating, sorry.
Title: Re: Nut not loading
Post by: HFsi on February 09, 2019, 06:05:35 pm
Finally I get it done through an API Call