Finally i received my dongle… jesus it takes time sometimes.
I have been looking so much up to get things running… and now there seems to be some kind of connection.
If shortcircut pin 1 and 2, and connect gnd, + and - to the respective on a LAN cable… Thats a good start. I start python, and loads the lib + map the port. Just like described on Github. I tried to run eg. wa.readRegisterFromIndex(2, 0, 3, 17)
but i just get random responses: Example:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "wavin_modbus.py", line 43, in readRegisterFromIndex
reply = minimalmodbus._extractPayload(response, self.address, self.mode, functioncode)
File "/usr/local/lib/python2.7/dist-packages/minimalmodbus.py", line 1075, in _extractPayload
raise ValueError(text)
ValueError: Checksum error in rtu mode: 'C\x1e' instead of '\xc3\x97' . The response is: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Iz\x02C\x01\x00#\x0f\x1c\xfe\x02C\x1e' (plain response: '\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00Iz\x02C\x01\x00#\x0f\x1c\xfe\x02C\x1e')
If i start serdump in a seperate terminal, and then run the exact same code i get a fine and 95% consistent response.
wa.readRegisterFromIndex(2, 0, 3, 17)
repl 35
[220, 210, 190, 150, 60, 250, 0, 16384, 60, 400, 220, 270, 30, 500, 2, 0, 220]
But sometimes serdump then crashes, and needs to be restartet to provide with a response. Seems to make no difference if display is connected or not.
Can spiff42 help me out here ?? seems to be pretty close.