Re: [Apcupsd-users] issues with using MODBUS protocol on SMC1500I-2UC
Brought to you by:
adk0212
|
From: Ted M. <te...@mi...> - 2023-12-14 09:19:06
|
Hi All, I am posting to the list regarding reports of MODBUS over USB issues. Recently, the NUT project integrated the modbus code into the NUT project and now supports MODBUS on APC and there's also been a few reports of issues on their forums. So I decided I want to clear the air and (possibly) list a "reference setup" that works. The UPS I have is a United States model SMT1500. No C or anything after the model, just SMT1500. This is an older UPS that has a manufacture date of 11-3-2012, I picked it up from a customer who was convinced it would be better to buy a new piece of crap APC UPS (one of the all plastic BackUPS ones) instead of buying replacement batteries for the SMT (because that UPS takes those big batteries and they are so expensive) You can't argue with stupidity. Anyway the device came with no smartcard in the slot, and it just had the usual USB port and RJ48 port to plug the weird serial cable whatever into. The front panel indicated under About that the UPS was running firmware version 8.4. No indication of MODBUS support in the menus. Note that according to archives online APC released an "earlier version" of the SMT1500 that won't take update firmware that has MODBUS. But the highest firmware it used to take was version 5 and sinc emine was at version 8 I knew it was a later version. I then took a Windows 11 laptop and downloaded and installed Powerchute Serial Shutdown (file pcss.zip) from APC's URL Software Firmware Tool (apc.com) <https://www.apc.com/us/en/download/software-firmware/> and ran the installer. During the install it does a bunch of stuff, removing existing Windows USB power drivers, installing it's own drivers. Then it gets to an autodetect section, at that time I plugged in the USB cable from the UPS to the laptop and it detected it and finished installation. The software fires up a local webserver on the PC. I logged in and verified that it was talking to the UPS and the UPS was communicating. I also set the battery change date since I had just put in new batteries. It's a VERY invasive piece of software. I installed it to "purify and "Scheniderize" the computer so there would be no issues with the next step of updating the firmware. Note that this is NOT the Powerchute personal edition - that software is still out there, here: PowerChute Personal Edition | APC USA <https://www.apc.com/us/en/product-range/61934-powerchute-personal-edition/> But its' pretty restricted in what it can do. The Powerchute Serial Shutdown - which was announced here: PowerChute Serial Shutdown is available to download - Schneider Electric Community <https://community.se.com/t5/APC-UPS-Data-Center-Enterprise/PowerChute-Serial-Shutdown-is-available-to-download/td-p/427283> seems to be written the way it is because they intend on porting it to "other operating systems" AKA Linux. There's also an intriguing link here: PowerChute Serial Shutdown Public Key for Linux RPM | Schneider Electric <https://www.se.com/us/en/download/document/APC_RPM-GPG-KEY-PCSS/> but no other info on how to use it. Next I downloaded the APC firmware update wizard, filename Smart-UPS_Firmware_Upgrade_Wizard_v4.3.6V2.zip from the URL How do I update the firmware of my SRT/SMC/XU/XP/SMX/SMT/SCL/SRC/CHS series Smart-UPS using the Firmware Upgrade Wizard? - APC USA <https://www.apc.com/us/en/faqs/FA279197/> Note that this URL does not seem to be easily reachable from APC's byzantine menus and it also is not the URL that is referenced in a great many APC help messages on the APC forum. APC has been moving things around. I then extracted it, went into Services on the laptop and stopped the Powerchute service. Then I ran the firmware install wizard. It detected the UPS, and then selected a firmware for the UPS which it labeled "Version 15" I then had to power down my servers and such, then it successfully uploaded the firmware to the UPS. The UPS screen stayed lit for about 5 minutes then the UPS shut off. I then waited another 5 minutes and powered up the UPS. Now, the About screen on the UPS said it was at firmware 15. Note that there are 2 Readme files in the directory of the Update wizard one that says the firmware version is 4.3.6V2 and the other that says the version is 15. However, in looking at the archives in the Wayback machine it appears that APC renumbered firmware because the SMT1500 unit was originally upgradable to firmware 9.4 which introduced MODBUS support. The new firmware now had a MODBUS enable in the Advanced menu. You have to enable the Advanced menu from the front panel before you see the MODBUS listing. I enabled it. There was no other indication in the firmware that you needed to select the USB or Serial port or any of that. I then unplugged the USB cable from the laptop and plugged it into my FreeBSD server running FreeBSD 12 64 bit with apcupsd 3.14.14 built on it, and modified the apcupsd.conf file to: UPSCABLE usb UPSTYPE modbus DEVICE and restarted apcupsd. It connected with zero trouble to the UPS. Here is the output: # apcaccess APC : 001,039,0909 DATE : 2023-12-13 23:39:00 -0800 HOSTNAME : officeserver VERSION : 3.14.14 (31 May 2016) freebsd UPSNAME : APCUPS CABLE : USB Cable DRIVER : MODBUS UPS Driver UPSMODE : Stand Alone STARTTIME: 2023-12-13 22:47:33 -0800 MODEL : Smart-UPS 1500 STATUS : ONLINE LINEV : 121.6 Volts LOADPCT : 23.4 Percent LOADAPNT : 18.2 Percent BCHARGE : 100.0 Percent TIMELEFT : 57.0 Minutes MBATTCHG : 5 Percent MINTIMEL : 3 Minutes MAXTIME : 0 Seconds OUTPUTV : 121.6 Volts DWAKE : 0 Seconds DSHUTD : 0 Seconds ITEMP : 25.2 C BATTV : 27.4 Volts LINEFREQ : 60.0 Hz OUTCURNT : 2.16 Amps NUMXFERS : 0 TONBATT : 0 Seconds CUMONBATT: 0 Seconds XOFFBATT : N/A SELFTEST : OK STATFLAG : 0x05000008 MANDATE : 2012-11-03 SERIALNO : AS1244115771 BATTDATE : 2023-12-14 NOMOUTV : 120 Volts NOMPOWER : 1000 Watts NOMAPNT : 1440 VA FIRMWARE : UPS 15.0 / 00.5 END APC : 2023-12-13 23:39:27 -0800 root@officeserver:/usr/local/etc/apcupsd # Here is the output of apctest: # apctest 2023-12-13 23:42:30 apctest 3.14.14 (31 May 2016) freebsd Checking configuration ... sharenet.type = Network & ShareUPS Disabled cable.type = USB Cable mode.type = MODBUS UPS Driver Setting up the port ... Doing prep_device() ... 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...SUCCESS Please select the function you want to perform. 1) Test kill UPS power 2) Perform self-test 3) Read last self-test result 4) View/Change battery date 5) View manufacturing date 10) Perform battery calibration 11) Test alarm Q) Quit Select function number: In summary - once more on the list here we have to emphasize that the SMT models of the APC SmartUPS are the ones to buy. Not SMC, nor BackUPS, or anything else. Some of those will work with the USB-HID driver that will give reduced output, some may work with MODBUS some may work with MODBUS over just the serial port, who can tell. Adam made a very large effort nearly a decade ago before getting the MODBUS contract with APC to write a MODBUS module to support some of those cheap BackUPSes that were coming with USB ports and there were a lot of bugs in the USB implementation on those cheap APC UPSes. But nowadays APC is restricting the monitoring port on the cheap BackUPS to only the more expensive BackUPS devices so with a little more money you can get a SmartUPS so why mess with the cheaper models? It would definitely be useful for more test reports to come in. I actually do have a fair selection of UPSes in my test library but the larger Enterprise-level UPSes are all SMT models. Or they are the much older APC UPSes that do not have a digital front panel readout they just have the lights, and therefore speak the much older UPSLink protocol. I'm glad that the NUT project decided that they had to copy over the modbus model to NUT. It's what I have been hoping would happen for a number of years now. I never liked their halfway-house solution of using a bridge driver to go from an apcupsd instance to NUT. I don't know why they are having problems with MODBUS over USB unless the issue is they don't know precisely what they are doing, or they are testing with cheap-crappy APC UPSe not enterprise-quality APC UPSes. I know that they follow this mailing list from time to time so maybe they will happen on this post. NUT used to be Eaton's poster child but they then seemed to branch out into the lowest common denominator UPSes out there. It's possible they are under the impression that non-Enterprise quality APC UPSes are just as good as the Enterprise gear and that was the impetus to incorporate MODBUS. Anyway, if you have been having problem with MODBUS over USB, then try the latest APC Firmware updater at the link above. And let the list know how things work out. Ted On 1/31/2022 12:26 AM, Daniel Dinnyes wrote: > > I am using a APC UPS model SMC1500I-2UC > <https://www.apc.com/shop/ph/en/products/P-SMC1500I-2UC>, with latest > firmware (v04.1), and *apcupsd version 3.14.14*. > > I have cP.1 setting > <https://manuals.plus/apc/smart-ups-c-uninterruptible-power-supply-manual.pdf> > on the UPS (enables MODBUS protocol), and using UPSTYPE MODBUS setting > in apcupsd.conf. > > I am experiencing the following issues: > > * getting constant broadcast messages about connection lost / restored. > * apcaccess doesn't show many of the device specific parameters > (e.g. SERIALNO, MODEL, FIRMWARE, MANDATE) > * apcaccess shows wrong values for BCHARGE (1.7% instead of 100%), > and doesn't show TIMELEFT. Since MBATTCHG is 5% and MINTIMEL is 3 > minutes, not recognizing those is possibly responsible for the > *immediate shutdown when switching to battery power*. > > These problems are very similar to the ones described here > <https://community.exchange.se.com/t5/APC-UPS-Data-Center-Backup/smt1000rmi2uc-and-modbus-protocol/td-p/297253>. > As the solution recommends in the thread, when I disable MODBUS > communication protocol on the UPS, and change back the apcupsd config > to UPSTYPE USB, and restart the daemon, the above issues are resolved. > After this, switching to battery power doesn't cause immediate > shutdown, and the BCHARGE, TIMELEFT, TONBATT, CUMONBATT, XONBATT, > XOFFBATT parameters show up, and get updated as expected. > > The problem what remains still is that using USB instead of MODBUS, > |apcaccess| doesn't return certain operational parameters (e.g. LINEV, > MINLINEV, MAXLINEV, OUTPUTV, OUTCURNT, LINEFREQ, LOADPCT, AMBTEMP, etc). > I know that the UPS itself supports these parameters, as I can see > them through SmartConnect on the APC online portal. > Also, most of the operations are not working with |apctest| when not > using MODBUS protocol. > > -- > Regards, > Daniel > > > > _______________________________________________ > Apcupsd-users mailing list > Apc...@li... > https://lists.sourceforge.net/lists/listinfo/apcupsd-users |