User Tools

Site Tools


APC SmartUps SU-700 - Linksys EA3500 - LuCI graphs

This describes how to connect an APC SmartUps SU-700 via USB on a Linksys EA3500 router. This includes collecting the data, and displaying graphs.

  • Plug in UPS
  • Connect a 940-0024 serial cable to the UPS (I'm using a 940-0024c. Other 'smart' cables may work as well. See:
  • Connect other end of the cable to a serial-to-usb converter
    • Some converters work, some don't. A cable from eBay called “USB to RS232 Serial 9 Pin DB9 PIN PL2303 Cable Adapter” did not end up working for me, due to Linux driver issues. I ended up using a
  • Connect the serial-to-usb converter to the router USB port (or a USB hub, if you need multiple things plugged into the port).
  • In the router command line or LuCI web pages, install packages: apcupsd, collectd-mod-apcups, and kmod-usb-serial-pl2303
  • For the command line, the commands are:
    opkg update
    opkg install kmod-usb-serial-pl2303
    opkg install apcupsd
    opkg install collectd-mod-apcups
  • On the router command line, verify that the USB driver is installed and working with command and response:
    # ls -la /dev/ttyUSB*
    crw-------    1 root     root      188,   0 Dec  1 00:29 /dev/ttyUSB0
  • If you don't see a serial port then something is wrong with the driver for the serial-to-usb converter.
  • Resolve this, before proceeding.
  • The next step is to customize the apcupsd config file. Details of the options can be found at , in the section “Configuration Directive Reference”.
  • On the router command line, go to the /etc/apcupsd directory, and edit the config file:
    # cd /etc/apcupsd
    # vi apcupsd.conf
  • use the dd command to delete all the lines in the file
  • use the i command to set the VI editor into “insert” mode.
  • Copy and paste this text into the editor:
    ## apcupsd.conf v1.1 ##
    UPSCABLE smart
    UPSTYPE apcsmart
    DEVICE /dev/ttyUSB0
    LOCKFILE /var/lock
    ANNOY 300
    NOLOGON disable
    NISPORT 3551
    EVENTSFILE /var/log/
    # max kilobytes
    UPSCLASS standalone
    UPSMODE disable
    # ===== Configuration statements to control apcupsd system logging ========
    # Time interval in seconds between writing the STATUS file; 0 disables
    # Location of STATUS file (written to only if STATTIME is non-zero)
    STATFILE /var/log/apcupsd.status
    LOGSTATS off
    # Time interval in seconds between writing the DATA records to
    #   the log file. 0 disables.
  • type :wq into the editor, to write the new apcupsd.conf, and quit the edit session
  • restart the apcupsd deamon process:
    # /etc/init.d apcupsd restart
  • Enter the apcaccess command into the command line, and you should get output like this:
    # apcaccess
    APC      : 001,034,0829
    DATE     : 2017-12-01 18:11:01 -0700  
    HOSTNAME : myrouter
    VERSION  : 3.14.14 (31 May 2016) unknown
    UPSNAME  : APC700
    CABLE    : Custom Cable Smart
    DRIVER   : APC Smart UPS (any)
    UPSMODE  : Stand Alone
    STARTTIME: 2017-12-01 18:10:11 -0700  
    MODEL    : Smart-UPS 700 RM
  • Note the STATUS : ONLINE . If you don't have “ONLINE”, then something is wrong
  • Reboot the router.
  • In the router web interface, go to Statistics, Graphs, APC UPS
  • You should see the graphs, with data starting on the right side.
  • If not, wait a minute, refresh your browser and you should start to see data being written.

Saving the data across Reboots

  • By default the collected data will be lost after a reboot of the router. To save the data, you need to put it on an external device, like a USB flash drive. Connecting both the UPS and a flash drive to a USB hub, which is then connected to the router, works fine for me.
  • To put the data on an external device, go to Statistics / Setup / Output plugins / RRDTool (, and change the Storage directory to wherever you want to store your data.


If you don't have APC UPS graphs at this point, here are some things to check:

  1. Change the data collection interval to 10 seconds. This is a workaround for the issue reported in:
    • Go to Statistics / Setup /
    • Change the Data collection interval to 10 seconds
  2. Verify that serial communication to the UPS is working - On a PC
    • attach usb converter to PC
    • startup minicom (or equivalent): minicom -D /dev/ttyUSB0
    • ctrl-a, ctrl-z, P,
    • change port configuration to 2400,8,n,1
    • ctrl-a, ctrl-z, O, Serial Port Setup
    • change port configuration to hardware / software flow control: none
    • type the uppercase letter: Y , and expect the reply SM
    • Note: serial APC UPS commands are documented at: )
  3. Verify that serial communication to the UPS is working - On the Router
    • Detach the usb converter from PC , attach to router
    • Install minicom on the router.
    • Use the same minicom commands to verify communication with the router.
    • type the uppercase letter: Y , and expect the reply SM
  4. There should be a tab for APC UPS on the General Plugins page at:

    If not, you may not have the patches that added luci-statistics support for the apcups plugin: The best fix for this is to upgrade to a version that does.

  5. /var/etc/collectd.conf should have a section for apcups:
    LoadPlugin apcups
     <Plugin apcups>
      Host localhost
      Port "3551"

    If it does not, you can regenerate /var/etc/collectd.conf with this command:

    /usr/bin/stat-genconfig > /var/etc/collectd.conf
  • If you still don't have APC UPS graphs, you may not have the patches that added luci-statistics support for the apcups plugin: The best fix for this is to upgrade to a version that does.
This website uses cookies. By using the website, you agree with storing cookies on your computer. Also you acknowledge that you have read and understand our Privacy Policy. If you do not agree leave the website.More information about cookies
docs/guide-user/services/ups/apcupsd_su700.txt · Last modified: 2020/09/20 20:26 by vgaetera