Ausgelagert aus Stromzähler mit Raspberry Pi und ModBus auslesen
Hallo zusammen,
ich habe mir auch einen Stromzähler SD630 zugelegt und ebenfalls alles installiert. Ich bekomme nun folgende Fehlermeldung:
root@raspberrypi:/home/pi/smartmeter# python3 smartmeter-own.py
06.05.2021 11:45:04 INFO: Initialisierung abgeschlossen - Start Messungen
06.05.2021 11:45:05 ERROR: Kommunikationserror Nr. 1
06.05.2021 11:45:11 ERROR: Kommunikationserror Nr. 2
06.05.2021 11:45:16 ERROR: Kommunikationserror Nr. 3
Beim Abbruch mit CTRL C bekomme ich folgende Ausgabe und einen Fehler bei der Checksum im rtu mode:
----------------------------------------------------------------------------------------------------------------
root@raspberrypi:/home/pi/smartmeter# python3 smartmeter-own.py
06.05.2021 11:45:04 INFO: Initialisierung abgeschlossen - Start Messungen
06.05.2021 11:45:05 ERROR: Kommunikationserror Nr. 1
06.05.2021 11:45:11 ERROR: Kommunikationserror Nr. 2
06.05.2021 11:45:16 ERROR: Kommunikationserror Nr. 3
^C06.05.2021 11:45:17 ERROR: Schwerwiegender Fehler aufgetreten
Traceback (most recent call last):
File "/home/pi/smartmeter/electric_meter.py", line 633, in read_input_values
"digits"])
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 667, in read_float
payloadformat=_PAYLOADFORMAT_FLOAT,
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1170, in _generic_command
payload_from_slave = self._perform_command(functioncode, payload_to_slave)
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1244, in _perform_command
response, self.address, self.mode, functioncode
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1756, in _extract_payload
raise InvalidResponseError(text)
minimalmodbus.InvalidResponseError: Checksum error in rtu mode: ':m' instead of '\x13Î' . The response is: '\x01\x10C«f:m' (plain response: '\x01\x10C«f:m')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "smartmeter-own.py", line 246, in <module>
main()
File "smartmeter-own.py", line 222, in main
messwerte = smartmeter.read_input_values(messauftrag)
File "/home/pi/smartmeter/electric_meter.py", line 637, in read_input_values
sleep(5)
KeyboardInterrupt
Traceback (most recent call last):
File "/home/pi/smartmeter/electric_meter.py", line 633, in read_input_values
"digits"])
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 667, in read_float
payloadformat=_PAYLOADFORMAT_FLOAT,
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1170, in _generic_command
payload_from_slave = self._perform_command(functioncode, payload_to_slave)
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1244, in _perform_command
response, self.address, self.mode, functioncode
File "/root/.local/lib/python3.7/site-packages/minimalmodbus.py", line 1756, in _extract_payload
raise InvalidResponseError(text)
minimalmodbus.InvalidResponseError: Checksum error in rtu mode: ':m' instead of '\x13Î' . The response is: '\x01\x10C«f:m' (plain response: '\x01\x10C«f:m')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "smartmeter-own.py", line 246, in <module>
main()
File "smartmeter-own.py", line 222, in main
messwerte = smartmeter.read_input_values(messauftrag)
File "/home/pi/smartmeter/electric_meter.py", line 637, in read_input_values
sleep(5)
KeyboardInterrupt
---------------------------------------------------------------------------
Hat einer von euch einen Rat?
Vielen Dank und Grüsse