Giter VIP home page Giter VIP logo

ups's Introduction

Mini-Box.com UPS Status and Configuration Tool

Mini-Box.com produces several high quality intelligent Uninterruptible Power Supplies. This is a tool to report status information and configure these UPS models.

Supported models

  • OpenUPS: 6-30V Intelligent Uninterruptible Power Supply
  • OpenUPS2: 11-24V Intelligent DC-DC Uninterruptible Power Supply using LiFePO4 or 13-24V using Li-Ion (see manual)
  • NUC-UPS: 6-38V Intelligent Automotive grade Uninterruptible Power Supply
  • DCDC-USB: Intelligent buck-boost DC-DC converter with USB interface
  • DCDC-USB-200: Intelligent buck-boost DC-DC converter with USB interface

Warning

The flash storage on these devices have limited write cycles (should be considered < 100.000) so it's not advisable to keep writing the configuration periodically on a timer.

Comparison table

Feature OpenUPS OpenUPS2 NUC-UPS
Picture
Input Voltage 6-30V 11-24V 6-38
Output Voltage 5-24V (programable) 12V* 12V
Architecture Buck/Boost Boost Buck/Boost
Max Power 6A 5A 5A
Battery Chemistry Li-Ion, Li-Po, LIFEPO4, Lead Acid LiFePO4, Li-Ion** Li-Ion
Battery Charger Multiple chemistry charger 3 state charger 3 state charger
Battery balancing Yes Yes Yes
USB Interface Yes Yes Yes
SMBUS Slave Slave -
Coulomb counting (fuel gauge) Yes Yes Yes
Temperature monitoring On board For each cell For each cell
Battery design External removable Onboard removable Onboard removable
Footprint Custom 2.5" drive footprint 2.5" drive footprint
Windows compatible Yes Yes Yes
Linux compatible Yes Yes Yes
Motherboard ON/OFF pulse control Yes Yes Yes
Deep Sleep power consumption <50uA 1uA 5uA
Availability Long life Long life New product

Notes:

* If V(in) > V(out) then V(out) is unregulated (Vin=vout)
* If V(in) < V(out) then V(out) is 12V regulated
** Li-Ion chemistry supported with hardware modification, consult manual.

Documentation

These devices allow advanced configuration which can be quite complex. It's recommended to read the documentation using the links below before attempting to configure these UPSes.

Install from prebuilt binary

$ sudo snap install openups --edge

Get it from the Snap Store

(Don't have snapd installed?)

Install from source

$ git clone https://github.com/mini-box/ups.git
$ cd ups
$ cmake .
$ sudo make install

Using

For all commands below replace device name with the name of the device you want to control eg: openups, openups2, nucups

  • Show help, supported devices and supported commands per device:

     $ openups -h
    
  • Show status and configuration:

      $ sudo openups -t <device name>
    
  • Show only status

      $ sudo openups -t <device name> -s
    
  • Export current configuration variables from device to file

      $ sudo openups -t <device name> -o <file name>
    
  • Import configuration from file to device. Warning: it will restart your UPS and in certain cases the device connected to it !

      $ sudo openups -t <device name> -i <file name>
    
  • For configuration variables you can add -c switch on command line to output a detailed description for each variable. Example: 6. UPS_INIT_DELAY_TOUT: 1 # [s] Initial delay before starting the UPS. Default is 1 sec.

  • Some devices accept commands to set for example the output voltage:

      $ sudo openups -t dcdcusb -e set_vout:11.5 -s
    

Troubleshooting

There might be issues with apparmor/SELinux that won't allow access to raw usb devices. For the snap binary this can be solved by:

    $ sudo snap connect openups:raw-usb

Network UPS Tools

For remote management or shutdown configuration it's also possible to use Network UPS Tools. Open UPS and Open UPS 2 are already integrated in latest version so installation should be straight forward on different Linux flavors. For more details on custom installations and configuration for our UPS products on Network UPS Tools see these links:

ups's People

Contributors

atuleu avatar mas90 avatar nicupavel avatar olewales avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

ups's Issues

LTO cells

What are the parameters recommendations for LTO cells? For example, when using LiFePO4 the parameters generated by the wizard for 4 20AH cells are the following:

CELLS: 4
CHG_BULK_STOP_VOLTAGE: 3.50 V
CHG_START_VOLTAGE: 3.25 V
CHG_VCOND: 3.00 V
UPS_VCELL_MIN_STOP: 2.80 V
UPS_VCELL_MIN_START: 3.00 V
CHG_HYSTERESIS: 0.10 V
CHG_IBULK: 1000.00 mA
CHG_ICOND: 400.00 mA
CHG_IMIN: 833.33 mA
CHG_BAT_TYPE: 1
CHG_GLOBAL_TOUT: 3600.00 min
CAPACITY: 20000.00 mA
BAL_VCELL_MIN: 3.10 V
OCV_SOC0: 3.10 V
OCV_SOC10: 3.20 V
OCV_SOC25: 3.25 V
OCV_SOC50: 3.30 V
OCV_SOC75: 3.32 V
OCV_SOC100: 3.35 V

[BUG] NUC-UPS write dumped settings breaks the settings

After running
openups -t nucups -o NUCUPS_SETTINGS

the file ("NUCUPS_SETTINGS") contains:

NUC_UPS_MODE=0
UPS_ON_BATTERY_TOUT=00:00:20
INIT_TOUT=1000
VIN_MIN_STARTUP=11000
VIN_MIN_RUNNING=8000
VIN_COUNT=100
IGN_COUNT=100
IGN_HIGH_THRESHOLD=6000
IGN_LOW_THRESHOLD=5000
IGN_ON_TO_OUTPUT_ON_TOUT=2000
IGN_CANCEL_TOUT=60
OUTPUT_ON_TO_MOB_PULSE_ON_TOUT=20
IGN_OFF_TO_MOB_PULSE_OFF_TOUT=5
IOUT_OFFSET=0
MOB_PULSEWIDTH=500
HARD_OFF_TOUT=60
CONFIG1=00000111
CONFIG2=00000000
CAPACITY=3600
UPS_BUTTON_ON_TOUT=100
UPS_VCELL_MIN_START=3600
UPS_VCELL_MIN_STOP=3300
UPS_VCELL_MIN_HARD_STOP=3000
UPS_OVERLOAD=6000
DCHG_TEMP_COLD=-20
DCHG_TEMP_HOT=60
CHG_COND_TOUT=30
CHG_BULK_STOP_VOLTAGE=4100
CHG_HYSTERESIS=100
CHG_START_VOLTAGE=3850
CHG_GLOBAL_TOUT=240
CHG_TOPPING_TOUT=10800
CHG_TEMP_COLD=5
CHG_TEMP_COOL=10
CHG_TEMP_WARM=50
CHG_TEMP_HOT=55
UPS_VCELL_ADC_OFFSET=0
CHG_CELL_VCOND=3300
BAL_VCELL_MIN=3400
BAL_VCELL_DIFF_START=80
BAL_VCELL_DIFF_STOP=40
BAL_ENABLE_TOUT=72000
BAL_DISABLE_TOUT=1440
OCV_SOC0=3300
OCV_SOC10=3680
OCV_SOC25=3760
OCV_SOC50=3820
OCV_SOC75=3970
OCV_SOC100=4170
POUT_HIGH_THRESHOLD=10000
POUT_LOW_THRESHOLD=2500
WRITE_COUNT (READ ONLY)=9

Then after changing some values and write the stuff back to the UPS
and its rebooting, the values of settings are broken and following nonsense is happen:

Read configuration
NUC_UPS_MODE=0
UPS_ON_BATTERY_TOUT=00:00:00
INIT_TOUT=0
VIN_MIN_STARTUP=0
VIN_MIN_RUNNING=0
VIN_COUNT=0
IGN_COUNT=0
IGN_HIGH_THRESHOLD=0
IGN_LOW_THRESHOLD=20
IGN_ON_TO_OUTPUT_ON_TOUT=1000
IGN_CANCEL_TOUT=11000
OUTPUT_ON_TO_MOB_PULSE_ON_TOUT=80000
IGN_OFF_TO_MOB_PULSE_OFF_TOUT=0
IOUT_OFFSET=10
MOB_PULSEWIDTH=100
HARD_OFF_TOUT=6000
CONFIG1=00000101
CONFIG2=00000000
CAPACITY=0
UPS_BUTTON_ON_TOUT=0
UPS_VCELL_MIN_START=0 #################### EG: this one
UPS_VCELL_MIN_STOP=0
UPS_VCELL_MIN_HARD_STOP=0
UPS_OVERLOAD=0  #################### EG: this one
DCHG_TEMP_COLD=125
DCHG_TEMP_HOT=125
CHG_COND_TOUT=3600
CHG_BULK_STOP_VOLTAGE=10
CHG_HYSTERESIS=3600
CHG_START_VOLTAGE=3300
CHG_GLOBAL_TOUT=288
CHG_TOPPING_TOUT=3000
CHG_TEMP_COLD=-20
CHG_TEMP_COOL=-25
CHG_TEMP_WARM=125
CHG_TEMP_HOT=2
UPS_VCELL_ADC_OFFSET=3850
CHG_CELL_VCOND=240
BAL_VCELL_MIN=10800
BAL_VCELL_DIFF_START=522
BAL_VCELL_DIFF_STOP=112
BAL_ENABLE_TOUT=300
BAL_DISABLE_TOUT=35
OCV_SOC0=135
OCV_SOC10=427
OCV_SOC25=474
OCV_SOC50=0
OCV_SOC75=3300
OCV_SOC100=3400
POUT_HIGH_THRESHOLD=260181740
POUT_LOW_THRESHOLD=393220170
WRITE_COUNT (READ ONLY)=65535  ###### <- What is going on?

Why there are no protective validators for settings/options?
Why there is no option or command for "factory reset"
Is this device reliable and safe to operate with Li-Ion at all?

The NUC-UPS has the
Firmware Version: (null):
VerMajor: 1
VerMinor: 3

Why i need to write settings:
The device didn't charge the cells and was stucking on "State machine CHG: END ||| State machine UPS: LPWR(or similar)"
even worse it discharged the cells.
So i found the setting "VIN_MIN_STARTUP=20000"(is it set from factory?) and decided to switsch to 11.5V...
And now I have broken device?

read error when trying to pull RTE and capacity

I am using openups with firmware 1.9 and the configuration set is in the attached file.

While trying to run the following code inside GetStatus() method of object HIDOpenups:
" ret = sendMessage(OPENUPS_CLOCK_OUT, 0);
usleep(1000);
recvMessage(recv);
parseMessage(recv);
"
I get the following error:
"
hid_interrupt_read failed with return code -110
Read error [0xc0]: -110
"
it reads the capacity and the RTE but puts to 0 all the other values.
If I comment this part of code I get all the values with correct values except for the RTE and capacity and the error is not present.
Furthermore I saw that the windows interface doesn't have this problem.

settings.txt

Flash write cycles

Is it possible to permanently change the charging current without wearing out the flash?
What would that command look like and would this also be possible over I2C bus?

add libusb-dev install to readme

sudo apt-get install libusb-dev

otherwise you will get:

ups/src/lib/usbhid.h:4:10: fatal error: usb.h: No such file or directory
    4 | #include <usb.h>
      |          ^~~~~~~
compilation terminated.
make[2]: *** [CMakeFiles/openups.dir/build.make:63: CMakeFiles/openups.dir/src/main.cpp.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:76: CMakeFiles/openups.dir/all] Error 2
make: *** [Makefile:130: all] Error 2

openups only retrieves 3 out of 6 cells

Given everything I do is Linux based, I am pleased to have this tool. However, I recently upgraded three OpenUPS installations from AGM batteries to use 6 LFP cells each. The Windows configurator shows the 6 cells correctly but Linux openups only shows 3 of them. Other provided information looks accurate:

openups -t openups -s
openups version 1.0. Device selected: openups
Selected device openups: Open UPS
interface 0 already claimed by driver "usbfs", attempting to detach it
usb_detach_kernel_driver_np returned 0
Product: OPEN-UPS, Manufacturer: Mini-Box.Com, Firmware Version: PBSO4-LiFePO
VIN: 24.283251
VBat: 20.576571
VOut: 12.623610
CCharge: 0.000000
Temperature: 60.000000
VCell1: 3.410860
VCell2: 3.428000
VCell3: 3.428000
CDischarge: 0.000000
VerMajor: 1
VerMinor: 9
State: 2
Capacity: 0
RTE: 0

Build fails with: fatal error: usb.h: No such file or directory

Straight pull from github. cmake works. Full error below:

In file included from /home/*redacted*/build/ups/src/main.cpp:12: /home/*redacted*/build/ups/src/lib/usbhid.h:4:10: fatal error: usb.h: No such file or directory 4 | #include <usb.h> | ^~~~~~~ compilation terminated. make[2]: *** [CMakeFiles/openups.dir/build.make:76: CMakeFiles/openups.dir/src/main.cpp.o] Error 1 make[1]: *** [CMakeFiles/Makefile2:83: CMakeFiles/openups.dir/all] Error 2 make: *** [Makefile:136: all] Error 2

Configuring V-In current limit

Hey, I am using the NUC-UPS in an application where I am powering a server from a weak/unpredictable power source.

I have a power supply that maxes out at ~12v 2.2A and then is disabled until a power cycle if that is exceeded. I'm trying to find a way to limit the maximum current draw of the V-In on the ups, but not sure if there is a software-based configuration.

For example, I have another power supply that gets to ~12v 1.3A and then runs in CC mode and drops voltage, but the 12v 1.3A rating is too low for this application, as it causes the server to run on battery far too often. Is the NUC-UPS capable of setting a current limit for the input source?

OpenUPS Voltage Regulation problem

Good Day,

I have configured my OPENUPS with the below parameters.

12V 5A input power
12V LIFEPO4 (8000mah) Battery

When i have the power on i get a voltage of 11.8v, then when i switch off power my volt reading goes from 9v to 13.58v in one second which causes my device to switch off so something is wrong. Does anyone have a working config file of this that i could use.

Anyone else experiencing this issue?

Im beginning to think that the issue is caused due to a faulty buck/boost converter.

Thank you.

Communicating with NUCUPS, but voltages and currents reported as zero

Hi @nicupavel and @mini-box,
Fantastic to have a Linux tool to talk with the mini-box UPSs - good job! I have built and tested. It looks to be communicating with the UPS fine, but has a few issues reading some of the data, such as voltage and current (see logs below). This is possibly connected to the hid_interrupt_read failed with return code -110 error reported but the usb library.
Have tried running with root user and also made sure to stop NUT and processes that might have locked access to the USB interface. (in fact this cleared the error interface 0 already claimed by driver "usbfs", attempting to detach it I saw initially.)
Is there anything you can suggest we try to correct this?
Thank you for your help.
Cheers,
Adam

$ openups -t nucups -s
Device selected: nucups
Selected device nucups: DC-DC NUC UPS
Found and initialized hid device:
Product: DCDC-NUC UPS, Manufacturer: MINI-BOX.COM, Firmware Version: (null)
hid_interrupt_read failed with return code -110
Read error: -110
hid_interrupt_read failed with return code -110
Read error: -110
 Input: 0
 Output: 0
 Charger Flags: 11521
 State Flags: 0
 Shutdown Flags: 0
 VIn: 0.000000
 IOut: 0.000000
 VOut:0.000000
 VIgnition: 0.000000
 POut: 0.000000
 Temperature1: 0.000000
 Temperature2: 0.000000
 Temperature3: 0.000000
 Temperature4: 0.000000
 BatVoltage1: 3.851000
  BatVoltage2: 3.850000
 BatVoltage3: 3.852000
 BatVoltage4: 3.850000
 CellBalanceOn1: 0
 CellBalanceOn2: 0
 CellBalanceOn3: 0
 CellBalanceOn4: 0
 CellDetected1: 1
 CellDetected2: 1
 CellDetected3: 1
 CellDetected4: 1
 BatOverallVoltage: 15.404000
 BatPack: 18.174999
 IChgDchg: 0.000000
 VerMajor: 0
 VerMinor: 0
 State: 0
 ChargeEndedCondition: 3
 BatteryLevel: 99
 Mode: 0
 CPUUsage: 0
Read configuration
failed to release interface: 0

$ lsusb
...
Bus 001 Device 008: ID 04d8:d007 Microchip Technology, Inc. 
...

UPS not starting after shutdown condition

Hi!

I've very strange behaviour, if running on battery and one cell downs 3300mV the ups sends a graceful shutdown to the motherboard but it shutdown the nuc-ups itself too. After recovery the VIN the nuc-ups is powered off and it doesnt charge (because is off) the only way to start it again is connecting a external powered usb 5v to the micro-usb port, S1 & P9 does nothing.

I tried to change config1b3 and config1b4 but this parameters are useless if the ups is off.

I can't find anything in the parameters to change that behaviour. Anyone knows how to start de nuc-ups without connecting a powered 5v cable to it?

Problem OpenUPS Driver Set Vout

Hello everyone,
I'm integrating OpenUPS into one of my Windows Forms applications (C#) on Windows.
I can display getUPSVIN, getUPSOutputPower, or getUPSVOut without any problems.

What I would like to do is to be able to persistently modify the output voltage, but it doesn't seem like it's possible to do that with the OpenUPSLib DLL.
What would be the most optimal solution? Is there a way to modify this output voltage in another way? Maybe via command line with the .exe and a parameter?
It would be great if someone had the solution!

openUpsLib

OpenUPS does not report the battery capacity or the RTE

I used the library with the OpenUPS but it does not report the battery capacity or the RTE, and after checking the code I found that the part responsible for getting these values is blocked with the following comment:
//TODO This breaks further communication with device. Needs more investigation.

Is there any way to make it work and return the battery capacity?

openups tools does not write configuration to device

Environment: Linux Mint 20, amd64
UPS board: OpenUps2
openups version: 1.0

  $ sudo openups -t openups2
  openups version 1.0. Device selected: openups2
  Selected device openups2: Open UPS2
  Product: OPEN-UPS2, Manufacturer: Mini-Box.Com, Firmware Version: LI-ION

A. Steps to reproduce:

  1. read confguration to a file and adjust settings. e.g.:
   $ cat /opt/openups/openups_settings.txt
  OPENUPSMODE=0 
  CAPACITY=1100 
  MOB_ONOFF_TOUT=500 
  UPS_BUTTON_ON_TOUT=100 
  UPS_CONFIG=00000100 
  UPS_CONFIG2=00000001 
  UPS_VIN_MIN_START=11.000 
  UPS_VCELL_MIN_START=3.000 
  UPS_VCELL_MIN_STOP=2.800 
  UPS_VCELL_MIN_HARD_STOP=2.500 
  UPS_VBAT_UVP_OFF_TOUT=5 
  UPS_HARDOFF_TOUT=30 
  UPS_VBAT_SLEEP_TOUT=00:00:30 
  DCHG_IMAX=3.000 
  AFE_OLV=00 
  AFE_OLD=0f 
  AFE_SCC=f0 
  AFE_SCD=f0 
  CHG_VCOND=3.000 
  CHG_TCOND=30 
  CHG_BULK_STOP_VOLTAGE=3.500 
  CHG_HYSTERESIS=0.100 
  CHG_GLOBAL_TOUT=180 
  CHG_TOPPING_TIMER=18000 
  CHG_START_VOLTAGE=3.320 
  CHG_BAT_TYPE=1 
  CHG_TEMP_COLD=5 
  CHG_TEMP_COOL=10 
  CHG_TEMP_WARM=50 
  CHG_TEMP_HOT=55 
  BAL_VCELL_MIN=3.320 
  BAL_VCELL_DIFF_START=0.070 
  BAL_VCELL_DIFF_STOP=0.030 
  OUT_VOLTAGE=12.000 
  OUT_STARTVOLTAGE_OFFSET=17 
  OUT_MAX_REGULATOR_STEP=255 
  OCV_SOC0=3.100 
  OCV_SOC10=3.200 
  OCV_SOC25=3.250 
  OCV_SOC50=3.300 
  OCV_SOC75=3.320 
  OCV_SOC100=3.350 
  WRITE COUNT=1 
  1. write configuration to device with
$ sudo openups -t openups2 -i /opt/openups/openups_settings.txt

B. Expected result:

  1. configuration is saved
  2. WRITE COUNT is incremented
  3. configuration read back with $ sudo openups -t openups2 returns values from the config file

C. Actual result:

  1. WRITE COUNT is incremented
  2. configuration read back with $ sudo openups -t openups2 returns unchanged values (other then WRITE COUNT):
    $ sudo openups -t openups2 
    openups version 1.0. Device selected: openups2
    Selected device openups2: Open UPS2
    interface 0 already claimed by driver "usbhid", attempting to detach it
    usb_detach_kernel_driver_np returned 0
    Product: OPEN-UPS2, Manufacturer: Mini-Box.Com, Firmware Version: LI-ION
    VIN: 0.000000
     VBat: 0.000000
     VOut: 0.024000 
     CCharge: 0.000000
    Temp1: 26.000000
     Temp2: 26.000000
     Temp3: 26.000000
    VCell1: 0.000000
     VCell2: 0.000000
     VCell3: 0.000000
    CDischarge: 0.000000
     VDuty: 0.000000
    VerMajor: 1
     VerMinor: 5
    State: 3
     StateUPS: 3
     stateCHG: 15
     stateDBG: 0
    Capacity: 50
    BatOn 1: 0
     BatOn 2: 0
     BatOn 3: 0
    RTE: 65535
     UPSMode: 0
     VOutPot: 0
    ConfigSwitch: 7
     ShutdownType: 0
    Read configuration
    OPENUPSMODE=0
    CAPACITY=1500
    MOB_ONOFF_TOUT=500
    UPS_BUTTON_ON_TOUT=100
    UPS_CONFIG=00000101
    UPS_CONFIG2=00000001
    UPS_VIN_MIN_START=11.000
    UPS_VCELL_MIN_START=3.000
    UPS_VCELL_MIN_STOP=2.800
    UPS_VCELL_MIN_HARD_STOP=2.500
    UPS_VBAT_UVP_OFF_TOUT=5
    UPS_HARDOFF_TOUT=60
    UPS_VBAT_SLEEP_TOUT=Never
    DCHG_IMAX=10.000
    AFE_OLV=00
    AFE_OLD=0f
    AFE_SCC=f0
    AFE_SCD=f0
    CHG_VCOND=3.000
    CHG_TCOND=30
    CHG_BULK_STOP_VOLTAGE=3.500
    CHG_HYSTERESIS=0.100
    CHG_GLOBAL_TOUT=180
    CHG_TOPPING_TIMER=18000
    CHG_START_VOLTAGE=3.320
    CHG_BAT_TYPE=1
    CHG_TEMP_COLD=5
    CHG_TEMP_COOL=10
    CHG_TEMP_WARM=50
    CHG_TEMP_HOT=55
    BAL_VCELL_MIN=3.320
    BAL_VCELL_DIFF_START=0.070
    BAL_VCELL_DIFF_STOP=0.030
    OUT_VOLTAGE=12.000
    OUT_STARTVOLTAGE_OFFSET=17
    OUT_MAX_REGULATOR_STEP=255
    OCV_SOC0=3.100
    OCV_SOC10=3.200
    OCV_SOC25=3.250
    OCV_SOC50=3.300
    OCV_SOC75=3.320
    OCV_SOC100=3.350
    WRITE COUNT=3

Acceptance criteria

  1. configuration from the config file gets saved to device

Additional information

  1. configuration is saved correctly using Windows GUI tool which has its own quirks like no possibility to import from csv or no possibility to select settings.ini file location and one hast to export to csv first which sets location where settings.ini is taken from)
  2. openups tool reports error about not being able to write to config file (not sure why it even attempts to do so). complete output of an unsuccessful write attempt:
   $ sudo openups -t openups2 -i /opt/openups/openups_settings.txt
    openups version 1.0. Device selected: openups2
    Selected device openups2: Open UPS2
    Product: OPEN-UPS2, Manufacturer: Mini-Box.Com, Firmware Version: LI-ION
    VIN: 0.000000
     VBat: 0.000000
     VOut: 0.000000 
     CCharge: 0.000000
    Temp1: 26.000000
     Temp2: 26.000000
     Temp3: 27.000000
    VCell1: 0.000000
     VCell2: 0.000000
     VCell3: 0.000000
    CDischarge: 0.000000
     VDuty: 0.000000
    VerMajor: 1
     VerMinor: 5
    State: 3
     StateUPS: 3
     stateCHG: 15
     stateDBG: 0
    Capacity: 50
    BatOn 1: 0
     BatOn 2: 0
     BatOn 3: 0
    RTE: 65535
     UPSMode: 0
     VOutPot: 0
    ConfigSwitch: 7
     ShutdownType: 0
    Read configuration
    OPENUPSMODE=0
    CAPACITY=1500
    MOB_ONOFF_TOUT=500
    UPS_BUTTON_ON_TOUT=100
    UPS_CONFIG=00000101
    UPS_CONFIG2=00000001
    UPS_VIN_MIN_START=11.000
    UPS_VCELL_MIN_START=3.000
    UPS_VCELL_MIN_STOP=2.800
    UPS_VCELL_MIN_HARD_STOP=2.500
    UPS_VBAT_UVP_OFF_TOUT=5
    UPS_HARDOFF_TOUT=60
    UPS_VBAT_SLEEP_TOUT=Never
    DCHG_IMAX=10.000
    AFE_OLV=00
    AFE_OLD=0f
    AFE_SCC=f0
    AFE_SCD=f0
    CHG_VCOND=3.000
    CHG_TCOND=30
    CHG_BULK_STOP_VOLTAGE=3.500
    CHG_HYSTERESIS=0.100
    CHG_GLOBAL_TOUT=180
    CHG_TOPPING_TIMER=18000
    CHG_START_VOLTAGE=3.320
    CHG_BAT_TYPE=1
    CHG_TEMP_COLD=5
    CHG_TEMP_COOL=10
    CHG_TEMP_WARM=50
    CHG_TEMP_HOT=55
    BAL_VCELL_MIN=3.320
    BAL_VCELL_DIFF_START=0.070
    BAL_VCELL_DIFF_STOP=0.030
    OUT_VOLTAGE=12.000
    OUT_STARTVOLTAGE_OFFSET=17
    OUT_MAX_REGULATOR_STEP=255
    OCV_SOC0=3.100
    OCV_SOC10=3.200
    OCV_SOC25=3.250
    OCV_SOC50=3.300
    OCV_SOC75=3.320
    OCV_SOC100=3.350
    WRITE COUNT=3
    Successfully erased (0xa2) configuration memory
    Erased configuration
    Failed to open /opt/openups/openups_settings.txt for writting
    Loaded configuration file: /opt/openups/openups_settings.txt
    Wrote configuration
    Restarted UPS
  1. tried 3 formats with the same results (no configuration written to device):
    conf style:
$ cat /opt/openups/openups_settings.txt
OPENUPSMODE=0 
CAPACITY=1100 
MOB_ONOFF_TOUT=500 
UPS_BUTTON_ON_TOUT=100 
UPS_CONFIG=00000100 
UPS_CONFIG2=00000001 
UPS_VIN_MIN_START=11.000 
UPS_VCELL_MIN_START=3.000 
UPS_VCELL_MIN_STOP=2.800 
UPS_VCELL_MIN_HARD_STOP=2.500 
UPS_VBAT_UVP_OFF_TOUT=5 
UPS_HARDOFF_TOUT=30 
UPS_VBAT_SLEEP_TOUT=00:00:30 
DCHG_IMAX=3.000 
AFE_OLV=00 
AFE_OLD=0f 
AFE_SCC=f0 
AFE_SCD=f0 
CHG_VCOND=3.000 
CHG_TCOND=30 
CHG_BULK_STOP_VOLTAGE=3.500 
CHG_HYSTERESIS=0.100 
CHG_GLOBAL_TOUT=180 
CHG_TOPPING_TIMER=18000 
CHG_START_VOLTAGE=3.320 
CHG_BAT_TYPE=1 
CHG_TEMP_COLD=5 
CHG_TEMP_COOL=10 
CHG_TEMP_WARM=50 
CHG_TEMP_HOT=55 
BAL_VCELL_MIN=3.320 
BAL_VCELL_DIFF_START=0.070 
BAL_VCELL_DIFF_STOP=0.030 
OUT_VOLTAGE=12.000 
OUT_STARTVOLTAGE_OFFSET=17 
OUT_MAX_REGULATOR_STEP=255 
OCV_SOC0=3.100 
OCV_SOC10=3.200 
OCV_SOC25=3.250 
OCV_SOC50=3.300 
OCV_SOC75=3.320 
OCV_SOC100=3.350 
WRITE COUNT=1 

csv

$ cat /opt/openups/openups_settings.csv
[0],OPENUPSMODE,0,[-]
[1],CAPACITY,1100,[mAh]
[2],MOB_ONOFF_TOUT,500,[mS]
[3],UPS_BUTTON_ON_TOUT,100,[mS]
[4],UPS_CONFIG,00000100,[bit7..bit0]
[5],UPS_CONFIG2,00000001,[bit7..bit0]
[6],UPS_VIN_MIN_START,11.000,[V]
[7],UPS_VCELL_MIN_START,3.000,[V]
[8],UPS_VCELL_MIN_STOP,2.800,[V]
[9],UPS_VCELL_MIN_HARD_STOP,2.500,[V]
[10],UPS_VBAT_UVP_OFF_TOUT,5,[s]
[11],UPS_HARDOFF_TOUT,30,[s]
[12],UPS_VBAT_SLEEP_TOUT,00:00:30,[HH:MM:SS]
[13],DCHG_IMAX,3.000,[A]
[14],AFE_OLV,00,[hex]
[15],AFE_OLD,0f,[hex]
[16],AFE_SCC,f0,[hex]
[17],AFE_SCD,f0,[hex]
[18],CHG_VCOND,3.000,[V]
[19],CHG_TCOND,30,[s]
[20],CHG_BULK_STOP_VOLTAGE,3.500,[V/cell]
[21],CHG_HYSTERESIS,0.100,[V/cell]
[22],CHG_GLOBAL_TOUT,180,[min]
[23],CHG_TOPPING_TIMER,18000,[s]
[24],CHG_START_VOLTAGE,3.320,[V/cell]
[25],CHG_BAT_TYPE,1,
[26],CHG_TEMP_COLD,5,[ºC]
[27],CHG_TEMP_COOL,10,[ºC]
[28],CHG_TEMP_WARM,50,[ºC]
[29],CHG_TEMP_HOT,55,[ºC]
[30],BAL_VCELL_MIN,3.320,[V]
[31],BAL_VCELL_DIFF_START,0.070,[V]
[32],BAL_VCELL_DIFF_STOP,0.030,[V]
[33],OUT_VOLTAGE,12.000,[V]
[34],OUT_STARTVOLTAGE_OFFSET,17,[nr]
[35],OUT_MAX_REGULATOR_STEP,255,[step]
[36],OCV_SOC0,3.100,[V]
[37],OCV_SOC10,3.200,[V]
[38],OCV_SOC25,3.250,[V]
[39],OCV_SOC50,3.300,[V]
[40],OCV_SOC75,3.320,[V]
[41],OCV_SOC100,3.350,[V]
[42],WRITE COUNT,6,[count]

ini

cat /opt/openups/settings.ini
#This file is a parameter and script file for Open-UPS2
#Can be created from the Open-UPS2 software importing from device
#DO NOT MODIFY IT MANUALLY! WRONG VALUES CAN BURN DOWN YOUR DEVICE!
#version:
00
#-----------------------------------
00 78 04 01 00 00 f8 2a 00 00 b8 0b f0 0a 05 00 1e 00
10 78 c4 09 00 00 00 00 b8 0b 00 0f f0 f0 4c 04 00 00
20 78 40 38 20 01 b8 0b 1e 00 00 00 ac 0d e8 03 00 00
30 78 f8 0c 01 3f 01 6e 01 d3 02 f4 02 11 f8 0c 46 1e
40 78 e0 2e 0a 00 0a ff 03 64 00 00 00 00 00 00 00 00
50 78 32 00 1c 0c 80 0c b2 0c e4 0c f8 0c 16 0d 50 46
60 78 68 01 00 00 01 1e 00 ff ff ff ff ff ff ff ff ff
70 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0 78 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
e0 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0 78 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
00 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
40 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0 79 ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
40 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0 7a ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
00 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
10 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
20 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
30 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
40 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
50 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
60 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
70 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
80 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
90 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
a0 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
b0 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
c0 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
d0 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
e0 7b ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff ff
f0 7b ff ff ff ff ff ff ff ff ff ff ff 15 0b 00 55 aa

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.