thomasjsn/powerwalker-python-lib

shutdown_restore did not work

also73 opened this issue · 1 comments

also73 commented

I got my new PowerWalker PDU RC-16A IEC device and tryed to work with this great software.
it looked fine for all stuff till shutdown_restart I got:

root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu shutdown_restore 8 2 0
Traceback (most recent call last):
  File "/root/temp/powerwalker-python-lib-master_orig/powerwalker/pw_common.py", line 32, in send
    c = os.read(self.fd, 8)
BlockingIOError: [Errno 11] Resource temporarily unavailable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/root/temp/powerwalker-python-lib-master_orig/cli.py", line 36, in <module>
    response = method(*args)
  File "/root/temp/powerwalker-python-lib-master_orig/powerwalker/pdu.py", line 205, in shutdown_restore
    response = self.send('S,' + idx + shdn_str + 'R' + rst_str)
  File "/root/temp/powerwalker-python-lib-master_orig/powerwalker/pdu.py", line 19, in send
    return super().send(cmd)
  File "/root/temp/powerwalker-python-lib-master_orig/powerwalker/pw_common.py", line 34, in send
    raise ValueError('blocking error')
ValueError: blocking error
root@Framework:~/temp/powerwalker-python-lib-master_orig #

with the windows software it worked fine

some information from the other commands

root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu info
{   'in_out_phase': '1/1',
    'in_socket_no': '1',
    'model': '############PDU',
    'nom_in_voltage': '230',
    'nom_out_voltage': '230',
    'out_socket_no': '8'}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu status
{   'in_current': 0.0,
    'in_freq': 49.9,
    'in_voltage': 227.7,
    'int_temp': 36.0,
    'out1_current': 0.0,
    'out2_current': 0.0,
    'out3_current': 0.0,
    'out4_current': 0.0,
    'out5_current': 0.0,
    'out6_current': 0.0,
    'out7_current': 0.0,
    'out8_current': 0.0,
    'status': {   'a01_low_in_voltage': 0,
                  'a02_high_in_voltage': 0,
                  'f09_low_in_current': 0,
                  'f10_high_in_current': 0,
                  'f11_pwr_fail_aux1': 0,
                  'f12_pwr_fail_aux2': 0,
                  'na_b8': 0,
                  'na_b9': 0,
                  'out1_status': 1,
                  'out2_status': 1,
                  'out3_status': 1,
                  'out4_status': 1,
                  'out5_status': 0,
                  'out6_status': 1,
                  'out7_status': 1,
                  'out8_status': 1}}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu firmware
{'verfw': 0.15}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu protocol
{'prot_id': 'PI90'}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu countdown_times
{   'out1_cd_sec': {'r': 0, 's': 0},
    'out2_cd_sec': {'r': 0, 's': 0},
    'out3_cd_sec': {'r': 0, 's': 0},
    'out4_cd_sec': {'r': 0, 's': 0},
    'out5_cd_sec': {'r': 0, 's': 0},
    'out6_cd_sec': {'r': 0, 's': 0},
    'out7_cd_sec': {'r': 0, 's': 0},
    'out8_cd_sec': {'r': 0, 's': 0}}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu shutdown 4 20
'ACK'
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu countdown_times
{   'out1_cd_sec': {'r': 0, 's': 0},
    'out2_cd_sec': {'r': 0, 's': 0},
    'out3_cd_sec': {'r': 0, 's': 0},
    'out4_cd_sec': {'r': 0, 's': 1196},
    'out5_cd_sec': {'r': 0, 's': 0},
    'out6_cd_sec': {'r': 0, 's': 0},
    'out7_cd_sec': {'r': 0, 's': 0},
    'out8_cd_sec': {'r': 0, 's': 0}}
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu shutdown_cancel 4
'ACK'
root@Framework:~/temp/powerwalker-python-lib-master_orig # python3 cli.py pdu countdown_times
{   'out1_cd_sec': {'r': 0, 's': 0},
    'out2_cd_sec': {'r': 0, 's': 0},
    'out3_cd_sec': {'r': 0, 's': 0},
    'out4_cd_sec': {'r': 0, 's': 0},
    'out5_cd_sec': {'r': 0, 's': 0},
    'out6_cd_sec': {'r': 0, 's': 0},
    'out7_cd_sec': {'r': 0, 's': 0},
    'out8_cd_sec': {'r': 0, 's': 0}}
root@Framework:~/temp/powerwalker-python-lib-master_orig #

That is a little weird, the BlockingIOError indicates that the serial resource is blocked. Unfortunately I don't have the PDU unit anymore, I only use the ATS implementation.