Skip to content

Unit of shutdown delay is not second. #151

@xlla

Description

@xlla

I'v write a test script to study ups auto shutdown feature.
It write 120 into ups mcu reg 24, then sleep 10s, then read from reg 24, it was 119 instead of 110 , so the unit of shutdown delay seems 10 second, in other words, decrease by 1 every 10s.

my test script

print("set ups power shutdown delay to 120s")
ups.shutdown_delay = 120
time.sleep(10)
#the unit seems is 10s 
#check value
print(f'current ups shutdown delay {ups.shutdown_delay} s')
ups.shutdown_delay = 0

the result log

set ups power shutdown delay to 120s
10499-MainThread 2025-06-15 02:29:53,298 upsPlusHelper.py:100 write_ups    DEBUG - write to ups mcu addr 23, reg 24, value 120, length 1
current ups shutdown delay 119 s
10499-MainThread 2025-06-15 02:30:03,414 upsPlusHelper.py:100 write_ups    DEBUG - write to ups mcu addr 23, reg 24, value 0, length 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions