ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Pi as a UPS monitor

    IT Discussion
    raspberry pi ups apc eaton nut
    8
    114
    33.8k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • travisdh1T
      travisdh1 @gjacobse
      last edited by

      @gjacobse said in Pi as a UPS monitor:

      If you run

      Installing and configuring apcupsd

      Seems apcupsd even has a web GUI

      Just use a Debian guide instead of looking at that mess.... when even I wince when looking at it.

      1 Reply Last reply Reply Quote 1
      • JaredBuschJ
        JaredBusch
        last edited by

        So ordering this one today.
        0_1475504077029_upload-aa8ddcff-9cac-498e-b4cb-3ea84837d1d0

        IRJI gjacobseG 2 Replies Last reply Reply Quote 2
        • IRJI
          IRJ @JaredBusch
          last edited by

          @JaredBusch said in Pi as a UPS monitor:

          So ordering this one today.
          0_1475504077029_upload-aa8ddcff-9cac-498e-b4cb-3ea84837d1d0

          I used the same kit and same micro SD card lol

          JaredBuschJ 1 Reply Last reply Reply Quote 0
          • JaredBuschJ
            JaredBusch @IRJ
            last edited by JaredBusch

            @IRJ said in Pi as a UPS monitor:

            I used the same kit and same micro SD card lol

            Any specific project?

            IRJI 1 Reply Last reply Reply Quote 0
            • IRJI
              IRJ @JaredBusch
              last edited by

              @JaredBusch said in Pi as a UPS monitor:

              @IRJ said in Pi as a UPS monitor:

              I used the same kit and same micro SD card lol

              Any specific project?

              I am just running OpenElec on that particular unit.

              1 Reply Last reply Reply Quote 0
              • gjacobseG
                gjacobse @JaredBusch
                last edited by

                @JaredBusch said in Pi as a UPS monitor:

                So ordering this one today.
                0_1475504077029_upload-aa8ddcff-9cac-498e-b4cb-3ea84837d1d0

                Why a 32GB card? Just because the cost is like - nothing?

                JaredBuschJ 1 Reply Last reply Reply Quote 0
                • JaredBuschJ
                  JaredBusch @gjacobse
                  last edited by

                  @gjacobse said in Pi as a UPS monitor:

                  @JaredBusch said in Pi as a UPS monitor:

                  So ordering this one today.
                  0_1475504077029_upload-aa8ddcff-9cac-498e-b4cb-3ea84837d1d0

                  Why a 32GB card? Just because the cost is like - nothing?

                  Because Amazon recommended it and I did not want to spend even 5 seconds finding my own card.

                  Also This one will be used for a few more things than just the UPS monitor after I work out that process and figure our what device to buy multiples of.

                  gjacobseG 1 Reply Last reply Reply Quote 2
                  • gjacobseG
                    gjacobse @JaredBusch
                    last edited by

                    @JaredBusch said in Pi as a UPS monitor:

                    Why a 32GB card? Just because the cost is like - nothing?

                    Because Amazon recommended it and I did not want to spend even 5 seconds finding my own card.

                    Also This one will be used for a few more things than just the UPS monitor after I work out that process and figure our what device to buy multiples of.

                    understandable.

                    1 Reply Last reply Reply Quote 0
                    • JaredBuschJ
                      JaredBusch
                      last edited by

                      Now to see if I can get time to work on this before next week.

                      https://instagram.ford1-1.fna.fbcdn.net/t51.2885-15/e35/14515863_1706849212971728_2069766214778880000_n.jpg

                      gjacobseG 1 Reply Last reply Reply Quote 2
                      • gjacobseG
                        gjacobse @JaredBusch
                        last edited by

                        @JaredBusch said in Pi as a UPS monitor:

                        Now to see if I can get time to work on this before next week.

                        https://instagram.ford1-1.fna.fbcdn.net/t51.2885-15/e35/14515863_1706849212971728_2069766214778880000_n.jpg

                        We are waiting with baited breath....

                        travisdh1T 1 Reply Last reply Reply Quote 0
                        • travisdh1T
                          travisdh1 @gjacobse
                          last edited by

                          @gjacobse said in Pi as a UPS monitor:

                          @JaredBusch said in Pi as a UPS monitor:

                          Now to see if I can get time to work on this before next week.

                          https://instagram.ford1-1.fna.fbcdn.net/t51.2885-15/e35/14515863_1706849212971728_2069766214778880000_n.jpg

                          We are waiting with baited breath....

                          I sense doubt, doubt leads to the dark side. Do or do not, @JaredBusch does not try.

                          1 Reply Last reply Reply Quote 1
                          • JaredBuschJ
                            JaredBusch
                            last edited by

                            pi@raspberrypi:~ $ sudo upsc jaredoffice@localhost
                            Init SSL without certificate database
                            battery.charge: 100
                            battery.charge.low: 10
                            battery.charge.warning: 50
                            battery.date: 2001/09/25
                            battery.mfr.date: 2010/12/15
                            battery.runtime: 1580
                            battery.runtime.low: 120
                            battery.type: PbAc
                            battery.voltage: 27.2
                            battery.voltage.nominal: 24.0
                            device.mfr: American Power Conversion
                            device.model: Back-UPS BR1000G
                            device.serial: 3B1051X20329
                            device.type: ups
                            driver.name: usbhid-ups
                            driver.parameter.pollfreq: 30
                            driver.parameter.pollinterval: 2
                            driver.parameter.port: auto
                            driver.version: 2.7.2
                            driver.version.data: APC HID 0.95
                            driver.version.internal: 0.38
                            input.sensitivity: medium
                            input.transfer.high: 147
                            input.transfer.low: 88
                            input.voltage: 126.0
                            input.voltage.nominal: 120
                            ups.beeper.status: enabled
                            ups.delay.shutdown: 20
                            ups.firmware: 868.L1 .D
                            ups.firmware.aux: L1
                            ups.load: 18
                            ups.mfr: American Power Conversion
                            ups.mfr.date: 2010/12/15
                            ups.model: Back-UPS BR1000G
                            ups.productid: 0002
                            ups.realpower.nominal: 600
                            ups.serial: 3B1051X20329
                            ups.status: OL
                            ups.test.result: No test initiated
                            ups.timer.reboot: 0
                            ups.timer.shutdown: -1
                            ups.vendorid: 051d
                            pi@raspberrypi:~ $
                            
                            1 Reply Last reply Reply Quote 2
                            • JaredBuschJ
                              JaredBusch
                              last edited by

                              Hopefully I can get it to do something tomorrow. no more time tonight.

                              1 Reply Last reply Reply Quote 0
                              • JaredBuschJ
                                JaredBusch
                                last edited by JaredBusch

                                Instructions assuming a Pi3

                                1. Install NOOBS to the SD Card.
                                2. Boot the Pi to NOOBS
                                3. Connect to wifi
                                4. Once it sees internet you can choose to install a minimal version of raspbian with no GUI
                                5. wait
                                6. login with default creds pi/raspberry
                                7. run sudo raspi-config to enable SSH and optionally set other options you want.
                                8. edit the wifi config file sudo nano /etc/wpa_supplicant/wpa_supplicant.conf
                                  network={
                                  ssid="yourssid"
                                  psk="ssidpassword"
                                  }
                                9. reboot the Pi3
                                10. update raspian
                                  1. sudo apt-get update
                                  2. sudo apt-get upgrade
                                11. Install nut
                                  1. sudo apt-get install nut
                                12. Edit sudo nano /etc/nut/nut.conf
                                  1. change MODE=standalone
                                13. Edit sudo nano /etc/nut/ups.conf
                                14. add a block at the end of the file.
                                  1. a default example
                                    [somenameforups]
                                    driver = usbhid-ups
                                    port = auto
                                    desc = "Some descriptive name for UPS"
                                  2. what mine is
                                    [jaredoffice]
                                    driver = usbhid-ups
                                    port = auto
                                    desc = "Jared's Desk"
                                15. Test the conf file is right sudo upsdrvctl start
                                16. Launch the UPS daemon sudo upsd
                                17. see if it is talking sudo upsc somenameforups@localhost
                                  1. or my real one sudo upsc jaredoffice@localhost
                                1 Reply Last reply Reply Quote 3
                                • gjacobseG
                                  gjacobse
                                  last edited by

                                  Interesting that the last two of the last three messages seem out of order. But - great information.

                                  1 Reply Last reply Reply Quote 0
                                  • gjacobseG
                                    gjacobse
                                    last edited by gjacobse

                                    Well - while I don't have a Pi yet, I do happen to have a LM 17.x system running as my Pandora Music box (Pithos). It's within reach of one of the several UPS units I have (I have like nine) so I used your process and got one set up:

                                    sudo upsc pandora
                                    :
                                    Init SSL without certificate database
                                    battery.charge: 100
                                    battery.charge.low: 10
                                    battery.charge.warning: 50
                                    battery.date: not set
                                    battery.mfr.date: 2014/06/22
                                    battery.runtime: 3336
                                    battery.runtime.low: 120
                                    battery.type: PbAc
                                    battery.voltage: 13.5
                                    battery.voltage.nominal: 12.0
                                    device.mfr: APC
                                    device.model: Back-UPS ES 550G
                                    device.serial: 4B1425P54201
                                    device.type: ups
                                    driver.name: usbhid-ups
                                    driver.parameter.pollfreq: 30
                                    driver.parameter.pollinterval: 2
                                    driver.parameter.port: auto
                                    driver.version: 2.7.1
                                    driver.version.data: APC HID 0.95
                                    driver.version.internal: 0.38
                                    input.sensitivity: medium
                                    input.transfer.high: 139
                                    input.transfer.low: 92
                                    input.voltage: 125.0
                                    input.voltage.nominal: 120
                                    ups.beeper.status: enabled
                                    ups.delay.shutdown: 20
                                    ups.firmware: 904.W1 .D
                                    ups.firmware.aux: W1
                                    ups.load: 12
                                    ups.mfr: APC
                                    ups.mfr.date: 2014/06/22
                                    ups.model: Back-UPS ES 550G
                                    ups.productid: 0002
                                    ups.serial: 4B1425P54201
                                    ups.status: OL
                                    ups.timer.reboot: 0
                                    ups.timer.shutdown: -1
                                    ups.vendorid: 051d
                                    
                                    1 Reply Last reply Reply Quote 1
                                    • JaredBuschJ
                                      JaredBusch
                                      last edited by

                                      Today will be tinkering with notification options.

                                      1 Reply Last reply Reply Quote 2
                                      • gjacobseG
                                        gjacobse
                                        last edited by

                                        Just got this:

                                        Init SSL without certificate database
                                        Error: Data stale
                                        
                                        1 Reply Last reply Reply Quote 0
                                        • gjacobseG
                                          gjacobse
                                          last edited by

                                          Went back through the commands above to validation / confirmation:

                                          $ sudo nano /etc/nut/nut.conf
                                          

                                          no changes - the same.

                                          $ sudo nano /etc/nut/ups.conf
                                          

                                          no changes - the same

                                           $ sudo upsdrvctl start
                                          Network UPS Tools - UPS driver controller 2.7.1
                                          Network UPS Tools - Generic HID driver 0.38 (2.7.1)
                                          USB communication driver 0.32
                                          Duplicate driver instance detected! Terminating other driver!
                                          Using subdriver: APC HID 0.95
                                          

                                          Okay - seems 'ok'

                                          $ sudo upsd
                                          Network UPS Tools upsd 2.7.1
                                          fopen /var/run/nut/upsd.pid: No such file or directory
                                          not listening on 127.0.0.1 port 3493
                                          not listening on ::1 port 3493
                                          no listening interface available
                                          
                                          $ sudo upsc pandora
                                          Init SSL without certificate database
                                          Error: Data stale
                                          

                                          curious.

                                          JaredBuschJ 1 Reply Last reply Reply Quote 0
                                          • JaredBuschJ
                                            JaredBusch @gjacobse
                                            last edited by

                                            @gjacobse I do not get that. Mine has been untouched since last night.

                                            pi@raspberrypi:~ $ sudo upsc jaredoffice
                                            Init SSL without certificate database
                                            battery.charge: 100
                                            battery.charge.low: 10
                                            battery.charge.warning: 50
                                            battery.date: 2001/09/25
                                            battery.mfr.date: 2010/12/15
                                            battery.runtime: 1472
                                            battery.runtime.low: 120
                                            battery.type: PbAc
                                            battery.voltage: 27.2
                                            battery.voltage.nominal: 24.0
                                            device.mfr: American Power Conversion
                                            device.model: Back-UPS BR1000G
                                            device.serial: 3B1051X20329
                                            device.type: ups
                                            driver.name: usbhid-ups
                                            driver.parameter.pollfreq: 30
                                            driver.parameter.pollinterval: 2
                                            driver.parameter.port: auto
                                            driver.version: 2.7.2
                                            driver.version.data: APC HID 0.95
                                            driver.version.internal: 0.38
                                            input.sensitivity: medium
                                            input.transfer.high: 147
                                            input.transfer.low: 88
                                            input.voltage: 124.0
                                            input.voltage.nominal: 120
                                            ups.beeper.status: enabled
                                            ups.delay.shutdown: 20
                                            ups.firmware: 868.L1 .D
                                            ups.firmware.aux: L1
                                            ups.load: 20
                                            ups.mfr: American Power Conversion
                                            ups.mfr.date: 2010/12/15
                                            ups.model: Back-UPS BR1000G
                                            ups.productid: 0002
                                            ups.realpower.nominal: 600
                                            ups.serial: 3B1051X20329
                                            ups.status: OL
                                            ups.test.result: No test initiated
                                            ups.timer.reboot: 0
                                            ups.timer.shutdown: -1
                                            ups.vendorid: 051d
                                            pi@raspberrypi:~ $
                                            
                                            1 Reply Last reply Reply Quote 0
                                            • 1
                                            • 2
                                            • 3
                                            • 4
                                            • 5
                                            • 6
                                            • 3 / 6
                                            • First post
                                              Last post