Forfatter Emne: V7/V13 UDP protocol client in python  (Læst 31830 gange)

0 Medlemmer og 1 Gæst læser dette emne.

Offline barbaz

  • Begynder
  • *
  • Indlæg: 8
  • Respekt optjent: +0/-0
Sv: V7/V13 UDP protocol client in python
« Svar #45 Dato: Dec 04, 2018, 21:56 »
I've mikrotik access point and I run dump directly on them. I've tried sniffing using the mac of the phone as a filter, then I sniffed all traffic... no broadcast at all :( In fact the app didn't find the boiler on local lan but only as "remote".... It will find the boiler only if connected on the wifi lan "generated" by the boiler itself (RTB-XXXXX)
In the meantime I'll try to dump the traffic when attached to this SSID.

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 227
  • Respekt optjent: +16/-0
Sv: V7/V13 UDP protocol client in python
« Svar #46 Dato: Jan 21, 2019, 16:56 »
I'm still waiting for some info from NBE about what changed in the protocol... not much we can do without that.
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline barbaz

  • Begynder
  • *
  • Indlæg: 8
  • Respekt optjent: +0/-0
Sv: V7/V13 UDP protocol client in python
« Svar #47 Dato: Jan 21, 2019, 18:10 »
I'm still waiting for some info from NBE about what changed in the protocol... not much we can do without that.

By my side i'm not able to connect to the RTB-XXXXX wifi network :(
do you know the default password?
They told me that it's written on the boiler itself but it doesn't work....

Offline motoz

  • Top of the pop
  • *****
  • Indlæg: 227
  • Respekt optjent: +16/-0
Sv: V7/V13 UDP protocol client in python
« Svar #48 Dato: Feb 11, 2019, 07:46 »
Barbaz, can you test the nbetest client from this branch https://github.com/motoz/nbetest/tree/testing/v13 ?

Seems as the v13 controller flips out when it receives a valid frame with a source port higher than 9999, in the testing/v13 branch the source port is set to a free port between 8483 and 9999. The v13 also requires a correct serial number to respond so this is also set in the discovery frame. Would be good to know if this works as I can't test it myself.
« Senest Redigeret: Feb 13, 2019, 07:20 af motoz »
Bio Comfort 30kW, compressor cleaning, lambda. Termax 25cr boiler. Matene vertical pellet conveyor. PellMon open source pellet logger: https://github.com/motoz/PellMon

Offline barbaz

  • Begynder
  • *
  • Indlæg: 8
  • Respekt optjent: +0/-0
Sv: V7/V13 UDP protocol client in python
« Svar #49 Dato: Feb 16, 2019, 12:46 »
Barbaz, can you test the nbetest client from this branch https://github.com/motoz/nbetest/tree/testing/v13 ?


Hi motoz! sorry for delay but I didn't have the possibility to test it.... it works! that's fine!
Thank you very much, it seems that you find the problem and now the boiler didn't disconnect anymore.

Some examples:
Kode: [Vælg]
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxxx get
settings/
operating_data/
advanced_data/
consumption_data/
event_log/
sw_versions/
info/
osmc@osmc:~/nbetest-testing-v13$

osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxx get  info
Traceback (most recent call last):
  File "client.py", line 81, in <module>
    args.func(args, proxy)
  File "client.py", line 27, in getfunc
    l = proxy.get(args.path)
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 135, in get
    response = self.make_request(9, '')
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 176, in make_request
    self.response.decode(data)
  File "/home/osmc/nbetest-testing-v13/frames.py", line 171, in decode
    raise IOError
IOError
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxx get  settings
settings/boiler/
settings/hot_water/
settings/regulation/
settings/weather/
settings/weather2/
settings/oxygen/
settings/cleaning/
settings/hopper/
settings/fan/
settings/auger/
settings/ignition/
settings/pump/
settings/sun/
settings/vacuum/
settings/misc/
settings/alarm/
settings/manual/
osmc@osmc:~/nbetest-testing-v13$
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxx get sw_versions
Traceback (most recent call last):
  File "client.py", line 81, in <module>
    args.func(args, proxy)
  File "client.py", line 27, in getfunc
    l = proxy.get(args.path)
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 129, in get
    response = self.make_request(10, '')
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 176, in make_request
    self.response.decode(data)
  File "/home/osmc/nbetest-testing-v13/frames.py", line 171, in decode
    raise IOError
IOError
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxxx get sw_versions
Traceback (most recent call last):
  File "client.py", line 80, in <module>
    with Proxy(args.password, PORT, args.address, args.serial) as proxy:
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 75, in __init__
    data, server = self.s.recvfrom(4096)
socket.timeout: timed out
osmc@osmc:~/nbetest-testing-v13$
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxxx get advanced_data
Traceback (most recent call last):
  File "client.py", line 80, in <module>
    with Proxy(args.password, PORT, args.address, args.serial) as proxy:
  File "/home/osmc/nbetest-testing-v13/protocol.py", line 75, in __init__
    data, server = self.s.recvfrom(4096)
socket.timeout: timed out


as you can see it gives IOerror getting info, advanced_data and sw_versions ... sometimes it returns socket timeout instead

settings seems to work correctly:
Kode: [Vælg]
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxx -p xxxxx set settings/regulation/boiler_power_min 30
OK
osmc@osmc:~/nbetest-testing-v13$ python client.py -a 192.168.12.22 -s xxxx get settings/regulation/boiler_power_min
30
osmc@osmc:~/nbetest-testing-v13$

thank you a lot!!!!