Loading ...
Home » Spaces » Smart-UPS & Symmetra LX / RM » discussion » General » smt1000rmi2uc and modbus protocol

smt1000rmi2uc and modbus protocol

Discussion in Smart-UPS & Symmetra LX / RM started by Loic , 1/7/2019 5:56 PM
Login to follow, share, and participate in this space.
Not a member?Join now
  • Loic74
    Loic
    Novice Novice
    Loic 1/7/2019 5:56 PM

    Hello, I have recently acquired a SMT1000RMI2UC (smartconnect) with the following specs:

    UPS Name: SMT1000RMI2UC
    Firmware: v 03.5
    Model Name: Smart-UPS 1000
    Model SKU: SMT1000RMI2UC
    Serial no.: AS1822160080
    Product ID: 28-29-86-0C-88-CC

    I would like to manage it through the APCUPSD software and MODBUS protocol however I cannot get it to work with the MODBUS options (plugged with USB cable). Does this UPS support modbus at all?

    Notes:

    1/ I have enabled the MODBUS option on the front LCD panel

    2/ Firmware version is 03.5 and PowerChute tells me it is the latest version

    Thank you

  • UnexpectedBill
    William
    Apprentice Apprentice
    William 1/7/2019 7:39 PM (in response to Loic)

    Yes, your UPS supports the MODBUS protocol (the option to enable it would not be present if it did not).

    From the release notes, it looks as though you'll need apcupsd version 3.14.13 or later for MODBUS over USB support. That would be where I would start, especially if you are using a version of apcupsd packaged by your operating system's vendor.

  • Loic74
    Loic
    Novice Novice
    Loic 1/7/2019 8:17 PM (in response to William)

    Thank you William.

    See below the ouput from the "apcaccess status" command, I am running revision 3.14.14 of apcupsd on Debian8.
    Most info I found (with difficulty) online says SMT-type UPS should be upgraded to firmware v9.x or above in order to support MODBUS but my UPS is new and firmware is v03.5 with apparently no option to upgrade. I am confused.

    apcaccess status
    APC      : 001,027,0670
    DATE     : 2019-01-07 20:05:08 +0000
    HOSTNAME : raspberrypi
    VERSION  : 3.14.14 (31 May 2016) debian
    UPSNAME  : raspberrypi
    CABLE    : USB Cable
    DRIVER   : USB UPS Driver
    UPSMODE  : Stand Alone
    STARTTIME: 2019-01-07 20:05:06 +0000
    MODEL    : Smart-UPS_1000
    STATUS   : ONLINE
    BCHARGE  : 100.0 Percent
    TIMELEFT : 159.2 Minutes
    MBATTCHG : 5 Percent
    MINTIMEL : 3 Minutes
    MAXTIME  : 0 Seconds
    ALARMDEL : 30 Seconds
    BATTV    : 26.6 Volts
    NUMXFERS : 0
    TONBATT  : 0 Seconds
    CUMONBATT: 0 Seconds
    XOFFBATT : N/A
    STATFLAG : 0x05000008
    MANDATE  : 2018-05-28
    SERIALNO : AS1822160080
    NOMBATTV : 24.0 Volts
    FIRMWARE : UPS 03.5 / ID=1015
    END APC  : 2019-01-07 20:05:13 +0000

  • UnexpectedBill
    William
    Apprentice Apprentice
    William 1/7/2019 9:22 PM (in response to Loic)

    Different revisions of the Smart-UPS SMT models have different firmware versions, depending upon their hardware ID and product family. What you're seeing is normal.

    It appears that you're using the standard USB UPS driver right now with apcupsd. (However, it looks like you are getting more information than a Microlink UPS such as yours would provide to the generic USB UPS driver, making me wonder if data isn't being exchanged over MODBUS anyway.) What happens if you specify the MODBUS driver type in apcupsd.conf?

  • Loic74
    Loic
    Novice Novice
    Loic 1/7/2019 9:47 PM (in response to Loic)

    Thank you William,

    Well, not sure what I did this time but it is now (almost) working. After enabling the MODBUS option from the LCD panel and setting the apcupsd.conf file for MODBUS operation, I disconnected the USB cable from the port and reconnected it, maybe that helped.

    Anyways, see below what output I am getting now. It is much more verbose BUT I am getting a connection lost message followed by a connection restored message every second. Not sure what is happening.

    Broadcast message from root@raspberrypi (somewhere) (Mon Jan  7 21:42:19 2019):
    Communications restored with UPS APC UPS
    Warning communications lost with UPS APC UPS


    APC      : 001,038,0883
    DATE     : 2019-01-07 21:37:19 +0000
    HOSTNAME : raspberrypi
    VERSION  : 3.14.14 (31 May 2016) debian
    UPSNAME  : APC UPS
    CABLE    : USB Cable
    DRIVER   : MODBUS UPS Driver
    UPSMODE  : Stand Alone
    STARTTIME: 2019-01-07 21:37:14 +0000
    STATUS   : COMMLOST
    LINEV    : 225.6 Volts
    LOADPCT  : 13.6 Percent
    LOADAPNT : 16.0 Percent
    BCHARGE  : 99.0 Percent
    TIMELEFT : 159.0 Minutes
    MBATTCHG : 5 Percent
    MINTIMEL : 3 Minutes
    MAXTIME  : 0 Seconds
    OUTPUTV  : 225.6 Volts
    DWAKE    : 0 Seconds
    DSHUTD   : 0 Seconds
    ITEMP    : 27.0 C
    BATTV    : 27.2 Volts
    LINEFREQ : 50.0 Hz
    OUTCURNT : 0.69 Amps
    NUMXFERS : 0
    TONBATT  : 0 Seconds
    CUMONBATT: 0 Seconds
    XOFFBATT : N/A
    SELFTEST : OK
    STATFLAG : 0x05000108
    MANDATE  : 2018-05-28
    SERIALNO : AS1822160080
    BATTDATE : 2018-08-17
    NOMOUTV  : 230 Volts
    NOMPOWER : 700 Watts
    NOMAPNT  : 1000 VA
    FIRMWARE : UPS 03.5 / 00.5
    END APC  : 2019-01-07 21:42:35 +0000

  • Loic74
    Loic
    Novice Novice
    Loic 1/7/2019 10:44 PM (in response to Loic)

    Well that must have been a fluke. Somehow I am now getting an eratic MODBUS communication between the UPS and apcupsd with varying values. APCTEST command returns the following. I will setup a fresh install Debian and start from scratch...

    root@raspberrypi:~# apctest


    2019-01-07 22:02:20 apctest 3.14.14 (31 May 2016) debian
    Checking configuration ...
    sharenet.type = Network & ShareUPS Disabled
    cable.type = USB Cable
    mode.type = MODBUS UPS Driver
    Setting up the port ...
    0.010 apcupsd: ModbusUsbComm.cpp:258 WaitIdle: interrupt_read failed: Success
    0.557 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT
    0.731 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=21)
    0.955 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=21, rx=7)
    1.066 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=21)
    1.178 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    1.851 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=7)
    2.018 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    2.565 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT
    2.796 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=7)
    2.916 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    Doing prep_device() ...
    3.363 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=21, rx=7)
    3.531 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=21)
    3.756 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=21, rx=7)
    3.868 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=21)
    3.980 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    4.019 apcupsd: ModbusUsbComm.cpp:269 WaitIdle: Out of sync
    4.019 apcupsd: ModbusUsbComm.cpp:270 Dumping 64 bytes @ 0x7ec04504
    4.019 apcupsd: ModbusUsbComm.cpp:270 00000000  89 01 03 02 02 bc 00 00 00 00 00 00 00 00 00 00  ................
    4.019 apcupsd: ModbusUsbComm.cpp:270 00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    4.020 apcupsd: ModbusUsbComm.cpp:270 00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    4.020 apcupsd: ModbusUsbComm.cpp:270 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    4.566 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT

    You are using a MODBUS cable type, so I'm entering MODBUS test mode
    Hello, this is the apcupsd Cable Test program.
    This part of apctest is for testing MODBUS UPSes.

    Getting UPS capabilities...4.852 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=37, rx=7)
    4.964 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=21, rx=37)
    5.131 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=21)
    5.355 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=21, rx=7)
    5.467 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=21)
    5.579 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    6.572 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT
    6.796 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=7)
    6.964 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    7.043 apcupsd: ModbusUsbComm.cpp:269 WaitIdle: Out of sync
    7.043 apcupsd: ModbusUsbComm.cpp:270 Dumping 64 bytes @ 0x7ec045bc
    7.043 apcupsd: ModbusUsbComm.cpp:270 00000000  89 01 03 02 00 08 00 00 00 00 00 00 00 00 00 00  ................
    7.043 apcupsd: ModbusUsbComm.cpp:270 00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    7.043 apcupsd: ModbusUsbComm.cpp:270 00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    7.043 apcupsd: ModbusUsbComm.cpp:270 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    7.589 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT
    7.756 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=9, rx=7)
    7.868 apcupsd: ModbusComm.cpp:201 SendAndWait: Wrong size (exp=7, rx=9)
    8.059 apcupsd: ModbusUsbComm.cpp:269 WaitIdle: Out of sync
    8.059 apcupsd: ModbusUsbComm.cpp:270 Dumping 64 bytes @ 0x7ec045bc
    8.059 apcupsd: ModbusUsbComm.cpp:270 00000000  89 01 03 02 00 01 00 00 00 00 00 00 00 00 00 00  ................
    8.059 apcupsd: ModbusUsbComm.cpp:270 00000010  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    8.059 apcupsd: ModbusUsbComm.cpp:270 00000020  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    8.059 apcupsd: ModbusUsbComm.cpp:270 00000030  00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00  ................
    8.604 apcupsd: ModbusUsbComm.cpp:142 ModbusRx: TIMEOUT
    SUCCESS

  • UnexpectedBill
    William
    Apprentice Apprentice
    William 1/8/2019 2:04 PM (in response to Loic)

    I would have a few other suggestions: try another USB port or cable, and make sure your Raspberry Pi's power supply is sufficient to support the load and working properly.

    Worst case, you can also try "braindeading" the UPS. This involves safely powering down any attached load, shutting off the UPS from the front panel, unplugging it from the wall, and disconnecting the batteries. With the batteries disconnected, depress the power button on the UPS. It will probably react briefly, which is pretty normal.

    After doing that, reconnect the batteries, restore power to the UPS and reconnect the load to be protected.

  • Loic74
    Loic
    Novice Novice
    Loic 1/8/2019 3:09 PM (in response to William)

    Thank you William,

    I will try the braindeading procedure first because I need to order the USB cable as it is specific (male-male type B).

    As for the Rpi it should be fine because the power supply is the original from Raspberry and the communication works fine with the default USB com mode. Only the MODBUS com mode is problematic. Anyways, will trey this as well, I have nothing else to try! :(

    Cheers

    Loic

  • Loic74
    Loic
    Novice Novice
    Loic 1/8/2019 6:20 PM (in response to Loic)

    So I tried the following in various orders:

    • replaced the RPi power supply (by a power bank)
    • "braindeaded" the UPS
    • fresh install of Debian on RPi

    And no improvement much to my frustration.

    Basic USB mode (modbus diabled) is rock-solid every time, contrary to the modbus which gives erratic values with intermittent messages about lost/recovered connections every seconds

    The last thing I will test is to change the USB cable. I have ordered one and will report back the results

    Thank you

    Loic

  • Page 1 of 1 (9 items)
Choose your language:  
powered by Communifire
Version 5.2.6420.11692