ptvoinfo / neptun2mqtt

Neptun ProW+ - MQTT bridge
MIT License
15 stars 6 forks source link

Can't get it work #1

Open ilyadavydyuk opened 4 years ago

ilyadavydyuk commented 4 years ago

Nothing appear in my mqtt broker, logfile is

2020-09-03 23:14:08,691 INFO [192.168.10.154]: <-- 192.168.10.154 :
2020-09-03 23:14:08,691 INFO [192.168.10.154]: Invalid length of a data packet

if i remove data length check - i get this:

2020-09-03 23:11:40,328 INFO [192.168.10.154]: Can't incoming data b'': ['Traceback (most recent call last):', '  File "/home/ilya/neptun2mqtt/neptun.py", line 461, in check_incoming\n    self.handle_incoming_data(self.socket, addr, data)', '  File "/home/ilya/neptun2mqtt/neptun.py", line 486, in handle_incoming_data\n    if not crc16_check(data):', '  File "/home/ilya/neptun2mqtt/neptun.py", line 77, in crc16_check\n    return (data[i - 1] == crc_lo) and (data[i - 2] == crc_hi)', 'IndexError: index out of range']
2020-09-03 23:11:40,328 INFO [192.168.10.154]: Error in connector's thread: ['Traceback (most recent call last):', '  File "/home/ilya/neptun2mqtt/neptun.py", line 344, in run\n    self.check_incoming()', '  File "/home/ilya/neptun2mqtt/neptun.py", line 461, in check_incoming\n    self.handle_incoming_data(self.socket, addr, data)', '  File "/home/ilya/neptun2mqtt/neptun.py", line 486, in handle_incoming_data\n    if not crc16_check(data):', '  File "/home/ilya/neptun2mqtt/neptun.py", line 77, in crc16_check\n    return (data[i - 1] == crc_lo) and (data[i - 2] == crc_hi)', 'IndexError: index out of range']

There is a piece from start:

2020-09-03 23:13:02,256 INFO [192.168.10.154]: Thread started
2020-09-03 23:13:02,256 INFO [192.168.10.154]: ++Q (192.168.10.154:6350) : bytearray(b'\x02TQR\x00\x00*E')
2020-09-03 23:13:02,257 INFO Starting main thread
2020-09-03 23:13:02,256 INFO [192.168.10.154]: Allocating socket
2020-09-03 23:13:02,257 INFO Connected with result code: 5
2020-09-03 23:13:02,257 INFO [192.168.10.154]: Connecting to: ('192.168.10.154', 6350)
2020-09-03 23:13:02,258 INFO [192.168.10.154]: Connected successfully to: ('192.168.10.154', 6350)
2020-09-03 23:13:02,259 INFO [192.168.10.154]: --> (192.168.10.154:6350): 02 54 51 52 00 00 2A 45
2020-09-03 23:13:02,727 INFO [192.168.10.154]: <-- 192.168.10.154 : 02 54 41 52 00 5C 49 00 05 4E 33 32 32 30 4D 00 11 36 30 3A 43 35 3A 41 38 3A 37 37 3A 38 46 3A
31 44 41 00 01 00 53 00 07 01 00 00 00 00 03 00 73 00 00 4C 00 04 00 00 00 00 43 00 14 00 00 00
00 01 00 00 00 00 01 00 00 00 00 01 00 00 00 00 01 44 00 0A 31 35 39 39 31 37 34 37 37 31 57 00
01 04 B3 9B
2020-09-03 23:13:02,727 INFO [192.168.10.154]: ++Q (192.168.10.154:6350) : bytearray(b'\x02TQc\x00\x00\xd8\xd0')
2020-09-03 23:13:02,728 INFO Subscribing to: home/Neptun/command/+
2020-09-03 23:13:02,728 INFO Subscribing to: home/Neptun/command
2020-09-03 23:13:03,228 INFO [192.168.10.154]: --> (192.168.10.154:6350): 02 54 51 63 00 00 D8 D0
2020-09-03 23:13:03,259 INFO Connected with result code: 5
2020-09-03 23:13:03,340 INFO [192.168.10.154]: <-- 192.168.10.154 : 02 54 41 FB 00 00 12 EF
2020-09-03 23:13:05,262 INFO Connected with result code: 5
2020-09-03 23:13:09,264 INFO Connected with result code: 5
2020-09-03 23:13:17,266 INFO Connected with result code: 5
2020-09-03 23:13:33,268 INFO Connected with result code: 5
2020-09-03 23:13:43,140 INFO [192.168.10.154]: <-- 192.168.10.154 :
2020-09-03 23:13:43,140 INFO [192.168.10.154]: Invalid length of a data packet
lych commented 3 years ago

Hello. The same problem. The logs are almost the same. @ilyadavydyuk what is your firmware version? Mine is 2.2.0. @ptvoinfo what firmware did you use?

Vittaly76 commented 3 years ago

Hi! A'm using ver 2.2.0 and have the same problems. Is there any solution? @ptvoinfo ?

vanelizarov commented 2 years ago

Have the same problem with 2.2.0