Minimum sketch requirement for OpenHAB discovery to work



  • Hi.
    I upgraded my gateway to latest stable version. (great tutorial btw)

    I had some really old nodes which I decommissioned and want to build new ones.

    Since there were some major changes in mysensors since ver 1.4 upon which they were built,
    I was thinking that I would like OpenHAB to autodetect new nodes and would like to know what is the minimum that has to be done in sketch to be autodetected by OpenHAB.

    Right now Iam testing actuator sktech with staticaly set address.
    here

    When I delete this manually added node, I would like to be discovered by OpenHAB.
    Or does it work only with new nodes (never registered to gateway?)

    Or is there any other rule which I need to follow?

    Thank you.
    p.
    p.s.:
    Iam running on RPI2 wheezy latest apt-get update & upgrade,
    GW is on RPI2 connected using SPI and built from latest stable git repo.
    OpenHAB ver 2.4 from apt-get.
    MySensors binding ver 2.4.0.
    Communication is tested and I can see node on gateway (in debug logs)



  • You have to present a node and it will appear as a thing. The rest can be empty.

    I'm talking about mysensors-binding over mqtt, which is what I'm using.



  • Thank you.
    I did eprom reset and then uploaded another sketch from mysensors examples at arduino.

    Where i start the node everything seems to be fine
    log from gw

    2019-02-09 20:26:15.253 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Presentation Message received
    2019-02-09 20:26:15.272 [DEBUG] [ensors.factory.MySensorsCacheFactory] - Writing on cache given_ids, content: [0,1,2,3]
    2019-02-09 20:26:15.289 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;255;3;0;11;DimmableLED
    2019-02-09 20:26:15.293 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;255;3;0;12;1.1
    2019-02-09 20:26:15.298 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;0;2;0;3;
    2019-02-09 20:26:15.304 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    2019-02-09 20:26:15.309 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 3
    2019-02-09 20:26:15.314 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Request received!
    2019-02-09 20:26:15.322 [DEBUG] [rsAbstractConnection$MySensorsWriter] - Sending to MySensors: 3;0;1;0;3;0
    2019-02-09 20:26:15.350 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;0;1;0;2;0
    2019-02-09 20:26:15.355 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    2019-02-09 20:26:15.361 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 3
    2019-02-09 20:26:15.378 [DEBUG] [rsAbstractConnection$MySensorsReader] - Message from gateway received: 3;0;1;0;3;0
    2019-02-09 20:26:15.383 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Node 3 found in gateway
    2019-02-09 20:26:15.388 [DEBUG] [rs.internal.gateway.MySensorsGateway] - Child 0 found in node 3
    

    log from node

    16 MCO:BGN:INIT NODE,CP=RNNNA---,REL=255,VER=2.3.1
    26 TSM:INIT
    27 TSF:WUR:MS=0
    33 TSM:INIT:TSP OK
    35 TSM:FPAR
    37 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    730 TSF:MSG:READ,0-0-255,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    735 TSF:MSG:FPAR OK,ID=0,D=1
    2046 TSM:FPAR:OK
    2048 TSM:ID
    2049 TSM:ID:REQ
    2052 TSF:MSG:SEND,255-255-0-0,s=1,c=3,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    2138 TSF:MSG:READ,0-0-255,s=255,c=3,t=4,pt=0,l=1,sg=0:3
    2143 TSF:SID:OK,ID=3
    2145 TSM:ID:OK
    2147 TSM:UPL
    2173 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2185 TSF:MSG:READ,0-0-3,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2189 TSF:MSG:PONG RECV,HP=1
    2192 TSM:UPL:OK
    2193 TSM:READY:ID=3,PAR=0,DIS=1
    2198 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2207 TSF:MSG:READ,0-0-3,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2214 TSF:MSG:SEND,3-3-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.3.1
    2223 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    2272 TSF:MSG:READ,0-0-3,s=255,c=3,t=6,pt=0,l=1,sg=0:M
    2278 TSF:MSG:SEND,3-3-0-0,s=0,c=0,t=4,pt=0,l=0,sg=0,ft=0,st=OK:
    2286 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=11,pt=0,l=11,sg=0,ft=0,st=OK:DimmableLED
    2295 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=12,pt=0,l=3,sg=0,ft=0,st=OK:1.1
    2301 MCO:REG:REQ
    2306 TSF:MSG:SEND,3-3-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    2312 TSF:MSG:READ,0-0-3,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    2317 MCO:PIM:NODE REG=1
    2319 MCO:BGN:STP
    2322 TSF:MSG:SEND,3-3-0-0,s=0,c=2,t=3,pt=0,l=0,sg=0,ft=0,st=OK:
    2328 MCO:BGN:INIT OK,TSP=1
    2371 TSF:MSG:READ,0-0-3,s=0,c=1,t=3,pt=0,l=1,sg=0:0
    Changing level to 0, from 0
    2378 TSF:MSG:SEND,3-3-0-0,s=0,c=1,t=2,pt=1,l=1,sg=0,ft=0,st=OK:0
    2385 TSF:MSG:SEND,3-3-0-0,s=0,c=1,t=3,pt=2,l=2,sg=0,ft=0,st=OK:0
    
    

    But I still cant see it in OpenHab inbox or find it using autodiscovery.

    When I add thing manually everything works as it should.

    Are there some cashes which needs to be cleared?
    Thank you.



  • try giving it a different node id



  • @pavel-hrudka I know this is quite an old post but I discovered tonight that when openHAB would not discover my node, I hit reset on the node and openHAB discovered the sensor when it restarted and contacted the GW. May help someone in the future!


Log in to reply
 

Suggested Topics

  • 22
  • 132
  • 7
  • 3
  • 4
  • 19

53
Online

11.4k
Users

11.1k
Topics

112.7k
Posts