New package Apcupsd is available.
-
Hi guys.
New package Apcupsd is available for 2.0.X and 2.1 (i386/amd64).
Screen shots:
Any problems, let me know.
Best regards.
-
Any problems, let me know.
I've just switched back to a hardware firewall from a VM, and have tried setting up my old APC smartups 620 again. This used to work in the past, but for the life of me I can't get the config right.
Here's what syslog is saying when I set up apcupsd
Dec 28 23:08:31 pfsense apcupsd[84527]: apcupsd exiting, signal 15
Dec 28 23:08:31 pfsense apcupsd[84527]: Lock file data error: X���^?
Dec 28 23:08:31 pfsense apcupsd[84527]: Lock file data error: '�
Dec 28 23:08:31 pfsense apcupsd[84527]: apcupsd shutdown succeeded
Dec 28 23:08:36 pfsense apcupsd[85926]: Lock file data error: X���^?
Dec 28 23:08:36 pfsense apcupsd[85926]: apcupsd FATAL ERROR in apcupsd.c at line 285 Failed to acquire device lock file
Dec 28 23:08:36 pfsense apcupsd[85926]: Lock file data error: M-^@�
Dec 28 23:08:36 pfsense apcupsd[85926]: apcupsd error shutdown completedI'm positive my serial cable is a 940-0095B because that what worked before.
It is into a physical serial port, but what is the port called? I used to use "/dev/cuau0" but that was through a serial/USB adapter. ttyv0 and ttyu0 don't work.
I do not have console enabled on the serial port, however I do have /dev/ttyu0.lock with a filetime of when the box was powered on.
Any ideas? -
Thanks.
I know the NUT package has been around for quite a long time but I've been using apcupsd in a Windows VM for a couple of years. This package is just what I need in a similar build I'm doing for a friend, provided I can figure out the script to execute on low battery.
-
I've just switched back to a hardware firewall from a VM, and have tried setting up my old APC smartups 620 again. This used to work in the past, but for the life of me I can't get the config right.
Hi.
Could you try this config:UPS CABLE: 940-0095A
UPS TYPE / Device: apcsmart /dev/cuau0 -
Thanks.
I know the NUT package has been around for quite a long time but I've been using apcupsd in a Windows VM for a couple of years. This package is just what I need in a similar build I'm doing for a friend, provided I can figure out the script to execute on low battery.
Soon, I want make an improvement for let you change these scripts:
killpower)
commfailure)
commok)
powerout)
onbattery)
offbattery)
mainsback)
failing)
timeout)
loadlimit)
runlimit)
doreboot)
doshutdown)
annoyme)
emergency)
changeme)
remotedown)
startselftest)
endselftest)
battdetach)
battattach)For now, you need to change manually or create your script on pfSense box.
Example for pfSense 2.1 amd64:
create the script:
touch /usr/pbi/apcupsd-amd64/etc/apcupsd/doshutdownedit it:
vi /usr/pbi/apcupsd-amd64/etc/apcupsd/doshutdownchange the permissions:
chmod +x /usr/pbi/apcupsd-amd64/etc/apcupsd/doshutdowncreate a symbolic link:
ln -s /usr/pbi/apcupsd-amd64/etc/apcupsd/doshutdown /usr/local/etc/apcupsd/Thanks
-
G'day Danilo ;D
Could I ask a question? I have an APC-UPS (SmartUPS 1000), which connects to a Synology NAS via a USB-cable which has some (I don't know which one yet, but Synology runs Linux) UPS-server running. So the APC-UPS sends a signal to the Synology when there is a power problem, after which the Synology can shut down itself and the other Synology NAS-ses I have via LAN. Would your package be able to act as a slave towards the Synology also? As in:
APC-UPS: power problem signal to Synology NAS 1
–----------> Synology NAS 1 (UPS server monitoring software)
-------------------------------> signal to other Synologies: shutdown
-------------------------------> signal to pfSense: shutdownIf so, what would be the settings in your package to accomplish this? I have been poking around, but to be honest: I have no clue :-[
Thank you in advance for your answer ;D
Bye,
-
@Hollander:
G'day Danilo ;D
Could I ask a question? I have an APC-UPS (SmartUPS 1000), which connects to a Synology NAS via a USB-cable which has some (I don't know which one yet, but Synology runs Linux) UPS-server running. So the APC-UPS sends a signal to the Synology when there is a power problem, after which the Synology can shut down itself and the other Synology NAS-ses I have via LAN. Would your package be able to act as a slave towards the Synology also? As in:
APC-UPS: power problem signal to Synology NAS 1
–----------> Synology NAS 1 (UPS server monitoring software)
-------------------------------> signal to other Synologies: shutdown
-------------------------------> signal to pfSense: shutdownHi Hollander.
searching on google, looks like you can install apcupsd on synology, but seems that you need to make some modifications. (I can't help you with that ).
If you can run apcupsd on synology, then you can integrate with others systems running apcupsd.
Sorry for not helping too much.
-
Could you try this config:
UPS CABLE: 940-0095A
UPS TYPE / Device: apcsmart /dev/cuau0Same kind of thing again
Jan 3 21:18:27 pfsense apcupsd[27864]: Lock file data error: X<ec><ff><ff><ff>^?
Jan 3 21:18:27 pfsense apcupsd[27864]: apcupsd FATAL ERROR in apcupsd.c at line 285 Failed to acquire device lock file
Jan 3 21:18:27 pfsense apcupsd[27864]: Lock file data error: M-^@ <da><fd>Jan 3 21:18:27 pfsense apcupsd[27864]: apcupsd error shutdown completed[2.1-RELEASE][root@pfsense.criggie.org.nz]/root(10): ls -la /dev/cuau0*
crw-rw–-- 1 root dialer 0, 40 Dec 28 23:16 /dev/cuau0
crw-rw---- 1 uucp dialer 0, 41 Dec 28 22:06 /dev/cuau0.init
crw-rw---- 1 uucp dialer 0, 42 Dec 28 22:06 /dev/cuau0.lockHow do I find out what's using /dev/cuau0? Normally I'd run fuser or lsof but they're not available.</fd></da></ff></ff></ff></ec>
-
Hi,
Many thanks for the package.
It looks like it has been compiled without snmp support, see below:
php: /pkg_edit.php: The command '/usr/local/etc/rc.d/apcupsd.sh restart' returned exit code '1', the output was 'Stopping APC UPS Daemon… No matching processes were found Starting APC UPS Daemon... apcupsd FATAL ERROR in apcupsd.c at line 259 Apcupsd cannot continue without a valid driver. Apcupsd driver snmplite not found. The available apcupsd drivers are: dumb apcsmart net usb pcnet Most likely, you need to add --enable-snmplite to your ./configure options. '
Can this be changed?
Thanks
Kane
-
@Hollander:
G'day Danilo ;D
Could I ask a question? I have an APC-UPS (SmartUPS 1000), which connects to a Synology NAS via a USB-cable which has some (I don't know which one yet, but Synology runs Linux) UPS-server running. So the APC-UPS sends a signal to the Synology when there is a power problem, after which the Synology can shut down itself and the other Synology NAS-ses I have via LAN. Would your package be able to act as a slave towards the Synology also? As in:
APC-UPS: power problem signal to Synology NAS 1
–----------> Synology NAS 1 (UPS server monitoring software)
-------------------------------> signal to other Synologies: shutdown
-------------------------------> signal to pfSense: shutdownIf so, what would be the settings in your package to accomplish this? I have been poking around, but to be honest: I have no clue :-[
Thank you in advance for your answer ;D
Bye,
[/quote]I have done this with the NUT package. The USB cable from my backups ES700 is connected to a Synology NAS and this NAS acts as a server for my Pfsense box.
Works like a charm:-
On your NAS check shutdown UPS and enable Network UPS Server
-
In Permitted disk stations enter IP adres of your Pfsense box (Lan IP address in most cases)
-
In the NUT package settings set Remote UPS
-
And Remote NUT ups settings set name to "ups", Remote address to you NAS IP, User "monuser" and Password "secret"
Thats all there is. But don't forget that with a power failure your network doesn't have power too, so your switch must be connected to the UPS too (that's what I forgot while testing) :D
-
-
@Hollander:
G'day Danilo ;D
Could I ask a question? I have an APC-UPS (SmartUPS 1000), which connects to a Synology NAS via a USB-cable which has some (I don't know which one yet, but Synology runs Linux) UPS-server running. So the APC-UPS sends a signal to the Synology when there is a power problem, after which the Synology can shut down itself and the other Synology NAS-ses I have via LAN. Would your package be able to act as a slave towards the Synology also? As in:
APC-UPS: power problem signal to Synology NAS 1
–----------> Synology NAS 1 (UPS server monitoring software)
-------------------------------> signal to other Synologies: shutdown
-------------------------------> signal to pfSense: shutdownIf so, what would be the settings in your package to accomplish this? I have been poking around, but to be honest: I have no clue :-[
Thank you in advance for your answer ;D
Bye,
[/quote]I have done this with the NUT package. The USB cable from my backups ES700 is connected to a Synology NAS and this NAS acts as a server for my Pfsense box.
Works like a charm:-
On your NAS check shutdown UPS and enable Network UPS Server
-
In Permitted disk stations enter IP adres of your Pfsense box (Lan IP address in most cases)
-
In the NUT package settings set Remote UPS
-
And Remote NUT ups settings set name to "ups", Remote address to you NAS IP, User "monuser" and Password "secret"
Thats all there is. But don't forget that with a power failure your network doesn't have power too, so your switch must be connected to the UPS too (that's what I forgot while testing) :D
Thank you Gogol for the very clear instructions, very kind of you ;D
Of course, knowing me, it didn't work :-[
( ;D)
I will open a new thread in order not to hijack Danilo's thread. Perhaps you'd be willing to look in that new thread? (I'll post it here once I've created it). EDIT: new thread is here: http://forum.pfsense.org/index.php/topic,71121.msg388428.html#msg388428
Thank you ;D
-
-
The package was updated. (apcupsd-3.14.10_1 pkg v0.2)
-
Fixed snmp.
-
Added device option.
-
Added script to send alerts if you have smtp notifications enabled and mailreport package.
If you use pcnet on the Upstype field, the parameters need to be on same field.
If you use snmp, the parameters need to be on device field. -
-
Hello!
Love the UPS monitoring feature; very nice!
Question/request though - it is possible to get email notifications when the power is cut out?
Thanks!
-
Question/request though - it is possible to get email notifications when the power is cut out?
May I suggest reading the previous post, right above yours?
-
Question/request though - it is possible to get email notifications when the power is cut out?
May I suggest reading the previous post, right above yours?
blind, i am :D
-
So I am hitting a bit of a weird issue…
Upgraded to 2.1.2 and all was well; apcupsd worked fine with my USB based APC UPS.
Then all of the sudden, I started getting the operation timed out error when clicking on the status tab. Checking the logs, I see this:
2014-04-10 21:21:48 -0700 Lock file data error: Xìÿÿÿ^? 2014-04-10 21:21:48 -0700 apcupsd FATAL ERROR in apcupsd.c at line 285 Failed to acquire device lock file 2014-04-10 21:21:48 -0700 Lock file data error: Ø^ËB 2014-04-10 21:21:48 -0700 apcupsd error shutdown completed
Tried restarting the service, reinstalling, rebooting, removing, rebooting, reinstalling… no dice.
Then, I just put a random string in the 'Device' field (the one right above 'Poll Time') - not to confuse with 'USB Type / Device' field which shows "usb BLANK"
Now I see this:
2014-04-10 21:27:50 -0700 apcupsd FATAL ERROR in generic-usb.c at line 674 Cannot find UPS device -- For a link to detailed USB trouble shooting information, please see <http: www.apcupsd.com="" support.html="">. 2014-04-10 21:27:50 -0700 apcupsd error shutdown completed</http:>
For testing sake - I installed NUT and it seems to be working just fine.
So, any ideas of why apcupsd ceased to work? :(
-
Before, We had just one field to be filled: UPS Type / Device.
Now, We have Device field separated.For pcnet config, parameters need to be just on UPS Type field.
With snmp, the parameters need to be on device field.How was your config before the upgrade?
-
Hello!
Love the UPS monitoring feature; very nice!
Question/request though - it is possible to get email notifications when the power is cut out?
Thanks!
Hi.
You need to configure smtp email notifications on pfSense and install mailreport package (just install it).
After that, apcupsd will send email alerts to you. -
Before, We had just one field to be filled: UPS Type / Device.
Now, We have Device field separated.For pcnet config, parameters need to be just on UPS Type field.
With snmp, the parameters need to be on device field.How was your config before the upgrade?
Config was as attached (of course service was enabled; I disabled it for now since I am using NUT). All other settings are left at default.
![Screen Shot 2014-04-11 at 9.28.52 AM.png_thumb](/public/imported_attachments/1/Screen Shot 2014-04-11 at 9.28.52 AM.png_thumb)
![Screen Shot 2014-04-11 at 9.28.52 AM.png](/public/imported_attachments/1/Screen Shot 2014-04-11 at 9.28.52 AM.png) -
Config was as attached (of course service was enabled; I disabled it for now since I am using NUT). All other settings are left at default.
When you have a chance, on UPSType / Device put just "usb" and try again.