-
Notifications
You must be signed in to change notification settings - Fork 2
/
SMBUS-problem.txt
138 lines (120 loc) · 5.2 KB
/
SMBUS-problem.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
pi@RPI-HUB:~ $ $HOME/UPS+/UPS_report
Raspberry Pi supply voltage: 4.920 V
Raspberry Pi current consumption: 2.090 A
Raspberry Pi power consumption: 10.600 W
Battery voltage (from INA219): 4.220 V
Battery current (charging): 0.160 A
Power supplied to the batteries: 0.790 W
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 119, in <module>
aReceiveBuf.append(bus.read_byte_data(DEVICE_ADDR, i))
File "/home/pi/.local/lib/python3.7/site-packages/smbus2/smbus2.py", line 433, in read_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
TimeoutError: [Errno 110] Connection timed out
pi@RPI-HUB:~ $
i: 10 - byte: 0B
i: 11 - byte: F0
i: 12 - byte: 0A
i: 13 - byte: 63
i: 14 - byte: 00
i: 15 - byte: 02
i: 16 - byte: 00
i: 17 - byte: 01
i: 18 - byte: 00
i: 19 - byte: 00
i: 1A - byte: 00
i: 1B - byte: 00
i: 1C - byte: 33
i: 1D - byte: A4
i: 1E - byte: 06
i: 1F - byte: 00
i: 20 - byte: E7
j= 62
i: 01 - byte: CD
i: 02 - byte: 0C
i: 03 - byte: 34
i: 04 - byte: 13
i: 05 - byte: 49
i: 06 - byte: 10
i: 07 - byte: CC
i: 08 - byte: 23
i: 09 - byte: 00
i: 0A - byte: 00
i: 0B - byte: 2C
i: 0C - byte: 00
i: 0D - byte: DB
i: 0E - byte: 10
i: 0F - byte: F0
TimeoutError 16
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_reportX.py", line 51, in <module>
print("i: %02X" % i, " - byte: %02X" % bReceiveBuf[i])
IndexError: list index out of range
pi@RPI-HUB:~ $
pi@RPI-HUB:~ $ python3 $HOME/UPS+/UPS_report.py
*** Data from INA219 at 0x40:
Raspberry Pi supply voltage: 4.920 V
Raspberry Pi current consumption: 2.340 A
Raspberry Pi power consumption: 11.000 W
*** Data from INA219 at 0x45:
Battery voltage: 4.220 V
Battery current (charging): 0.232 A
Power supplied to the batteries: 1.010 W
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 81, in <module>
aReceiveBuf.append(bus.read_byte_data(DEVICE_ADDR, i))
File "/home/pi/.local/lib/python3.7/site-packages/smbus2/smbus2.py", line 433, in read_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 84, in <module>
print(i, ' - ', aReceiveBuf[i], ' - ', e)
IndexError: list index out of range
pi@RPI-HUB:~ $
*** Data from INA219 at 0x45:
Battery voltage: 4.160 V
Battery current (discharging): 2.800 A
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 47, in <module>
print("Battery power consumption: %8.3f W" % round_sig(ina.power()/1000,n=3))
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 204, in power
self._handle_current_overflow()
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 245, in _handle_current_overflow
while self._has_current_overflow():
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 359, in _has_current_overflow
ovf = self._read_voltage_register() & self.__OVF
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 367, in _read_voltage_register
return self.__read_register(self.__REG_BUSVOLTAGE)
File "/home/pi/.local/lib/python3.7/site-packages/ina219.py", line 394, in __read_register
register_value = self._i2c.readU16BE(register)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_GPIO/I2C.py", line 190, in readU16BE
return self.readU16(register, little_endian=False)
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_GPIO/I2C.py", line 164, in readU16
result = self._bus.read_word_data(self._address,register) & 0xFFFF
File "/home/pi/.local/lib/python3.7/site-packages/Adafruit_PureIO/smbus.py", line 224, in read_word_data
ioctl(self._device.fileno(), I2C_RDWR, request)
TimeoutError: [Errno 110] Connection timed out
pi@RPI-HUB:~ $
pi@RPI-HUB:~ $ python3 $HOME/UPS+/UPS_report.py
*** Data from INA219 at 0x40:
Raspberry Pi supply voltage: 4.920 V
Raspberry Pi current consumption: 2.290 A
Raspberry Pi power consumption: 10.700 W
*** Data from INA219 at 0x45:
Battery voltage: 4.130 V
Battery current (discharging): 2.900 A
Battery power consumption: 12.100 W
i= 225
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 80, in <module>
aReceiveBuf.append(bus.read_byte_data(DEVICE_ADDR, i))
File "/home/pi/.local/lib/python3.7/site-packages/smbus2/smbus2.py", line 433, in read_byte_data
ioctl(self.fd, I2C_SMBUS, msg)
TimeoutError: [Errno 110] Connection timed out
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/home/pi/UPS+/UPS_report.py", line 84, in <module>
print('byte read=', aReceiveBuf[i], ' error:', e)
IndexError: list index out of range
pi@RPI-HUB:~ $