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

Loading…
Cancel
Save