UPS not officially supported - TrueNAS Core

MediJaster

Dabbler
Joined
Feb 21, 2022
Messages
10
Hello everyone,
I finished my TrueNAS build two days ago but I couldn't get the UPS I already had to work with it natively. Although I do have the FreeBSD drivers, I don't know how I can use them, I just need the server to shut down if the power goes out. Build details are in my signature but I'll include them below as well.
I need this one to work not only because I don't have the funds to buy another one, but also because I don't have many choices for UPSs where I currently live (I can't order a UPS from amazon because of the battery).

UPS I have:
Mediacom Xpower 850

Drivers listed on the website (the FreeBSD tar is also attached below):
PowerManagerII .zip

usbconfig output of what I assume is the UPS's usb port (also the only one with pwr=ON)
ugen2.3: <vendor 0x0925 UPS USB MON V1.4> at usbus2, cfg=0 md=HOST spd=LOW (1.5Mbps) pwr=ON (100mA)

Here is UPS Manager help doc and comment(version and other).

/*==================English Readme==============================*/
1.Software installation and operation
i) soft installation
copy the package ups_manager to you favorite directory , example :/root/tmp Use the tar command to extract files from the diskette or software package:
tar -xzvf upsmanager1.0v.bsd.tar
This demand will create a directory: upsmanagerinstall. Enter this directory, executefile:./install.freebsd.sh . Converse the file installation.the installation program will automatically copy files to the default location "/etc/ups_manager/" and modify the system startup file to contain the ups_manager for freebsd daemon process.
ii) start program
The installation program will automatically start the main program .
you can start it use following command:
./ups_manager start
iii) stop program
you can start it use following command:
./ups_manager stop
iv) config program
you can start it use following command:
./ups_manager config
2.software package
./ups_monitor
./ups_status
./ups_config
./shutdown.sh
./ups_manager
./ups_manager start
./ups_manager stop
./ups_manager status
./ups_manager config
./ups_manager restart
./TimeCfg.conf
./install.freebsd.sh
./Readme
./SendMSG.sh
./startup.add


3.contact us and technical support


I sincerely thank you already for taking the time to read this, really looking forward to any suggestions
OS: TrueNAS-12.0-U8
Motherboard: JINGSHA DUAL CPU X79
CPU: 2 x Intel Xeon E5 2650 V2
RAM: 2 x 32GB 1866 MHz DDR3 ECC
HDDs: 6 x 4TB SATA 3.5" 7200rpm -- RaidZ2
Network: 2 x 1000/100/10 Realtek NIC integrated in the motherboard
 

Attachments

  • upsmanager1.0v.bsd.tar.zip
    33.7 KB · Views: 228
Joined
Jun 2, 2019
Messages
591
You are discovering the pitfalls of using unsupported and/or off-brand hardware.

BACKGROUND

TrueNAS CORE/SCALE uses NUT, which your device manufacturer is not listed and you cannot install non-native drivers. TrueNAS is an appliance, not a FreeBSD system you can tinker with.



You will be forced to implement a custom solution if you can't get one of the native NUT drivers to work.

Personally, I have my UPS connected to my pfSense (which also uses NUT) firewall as a "UPS Master" and all my NAS clients as "UPS Slaves."

OPTIONS

1. I was unable to determine if the USB connection uses a proprietary or industry standard communication protocol, but you might try selecting the USBHID-UPS driver or some of the other generic drivers.

2. Another option is to connect the UPS to another client (WIndows/Linux) and install the PowerManagerII software.

According to the user manual, the UPS can then be monitored via a network.

Simultaneously, the user can remotely monitor the UPS via a network and manage the power system more effectively.

Monitoring UPS remotely via TCPIP or Internet.

What is not clear is if the PowerManagerII software supports standard UPS Master/Slave network monitoring which is compatible with NUT.

3. The last option is to connect the UPS to another client (Windows/Linux) with the PowerManagerII software and set up a script to send remote commands to TrueNAS to shutdown the system. A Raspberry PI running Raspbian with the PowerManagerII linux drivers and mashing together NUT to set up the UPS as a "UPS Master" is theoretically possible. It all depends on your skill set and motivation.


Screen Shot 2022-02-22 at 12.41.47 PM.png
 
Last edited:

MediJaster

Dabbler
Joined
Feb 21, 2022
Messages
10
Sorry for the late reply, but I do have news!

I tried with some drivers suggested by another forum post that had a similar usbconfig output, this suggestion being blazer_usb. Once I turned them on it said my ups was on battery, which it wasn't but usually it would just say connection failed or ups disconnected.

Right now my best solution to this issue is just to switch UPSs with my dad because his one should be officially listed.
But my raspberry pi (that i use for pihole and openvpn) is connected to my dad's UPS, so I will try and develop something to make my ups work with TrueNAS that I will share if I make it work.
(If I also somehow manage to reverse engineer the drivers I will try to share all knowledge to NUT)

Right now I have bigger problems unrelated to this thread (upgraded from CORE to SCALE) but for now thank you so much for your reply, it was still pretty useful to have all these resources, so next time buying a UPS I'll have NUT compatibility as the main priority.
 
Top