Browse Source

[modbus] ajout log debug pour lecture des variables

Maxime Alves LIRMM@home 4 years ago
parent
commit
013771579b
1 changed files with 3 additions and 0 deletions
  1. 3
    0
      pyheatpump/cli.py

+ 3
- 0
pyheatpump/cli.py View File

76
         ))
76
         ))
77
         res = modbus.read_holding_registers(analog.start_address, analog.end_address)
77
         res = modbus.read_holding_registers(analog.start_address, analog.end_address)
78
 
78
 
79
+        logger.debug(f'analog length : {len(res)}')
79
         for r in range(len(res)):
80
         for r in range(len(res)):
80
             var = Variable(**{
81
             var = Variable(**{
81
                 'type': analog,
82
                 'type': analog,
101
         ))
102
         ))
102
         res = modbus.read_holding_registers(integer.start_address, integer.end_address)
103
         res = modbus.read_holding_registers(integer.start_address, integer.end_address)
103
 
104
 
105
+        logger.debug(f'integer length : {len(res)}')
104
         for r in range(len(res)):
106
         for r in range(len(res)):
105
             var = Variable(**{
107
             var = Variable(**{
106
                 'type': integer,
108
                 'type': integer,
125
         ))
127
         ))
126
         res = modbus.read_coils(digital.start_address, digital.end_address)
128
         res = modbus.read_coils(digital.start_address, digital.end_address)
127
 
129
 
130
+        logger.debug(f'digital length : {len(res)}')
128
         for r in range(len(res)):
131
         for r in range(len(res)):
129
             var = Variable(**{
132
             var = Variable(**{
130
                 'type': digital,
133
                 'type': digital,

Loading…
Cancel
Save