Dallas sketch does not send temperature



  • Hi,

    I used the default guide for Dallas temperature sensor and downloaded the librarys from master github.
    Communication with the gateway works but sensor does not send the temperature value:

    (12:36:03.240) req id
    (12:36:03.250) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (12:36:05.250) sensor started, id=255, parent=0, distance=1
    (12:36:05.280) req id
    (12:36:05.280) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (12:36:07.280) req id
    (12:36:07.290) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (12:36:09.290) req id
    (12:36:09.320) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (12:36:11.460) 20.50<CR> <---- I have ve added this
    (12:36:11.460) req id
    (12:36:11.460) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    

    I've added in the sketch Serial.println(temperature); and that works so reading the temp is not an issue it is just not send in the payload part.
    I've set COMPARE_TEMP to 0 for testing.

    I'm on Arduino IDE 1.6.7
    Any idea?

    Best regards
    -Alex


  • Hero Member

    Hi!

    Attach a controller to the gateway which gives out id or set a static id in the sketch.
    The node is requesting an id and no one is answering. 🙂

    Greetings
    Tim



  • Aha, so ID is given out by the controller (openHab in my Case)? How can I set the ID static in the sketch?
    This is what I get on the gateways serial in the same time:

    0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;
    0;0;3;0;9;read: 255-255-0 s=255,c=3,t=3,pt=0,l=0,sg=0:
    255;255;3;0;3;


  • Mod



  • I've added #define MY_NODE_ID 1 in the top area of the sketch but still the same result on sensor serial:

    (13:36:29.080) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (13:36:31.040) sensor started, id=255, parent=0, distance=1
    (13:36:31.080) req id
    (13:36:31.080) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (13:36:33.070) req id
    (13:36:33.070) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (13:36:35.080) req id
    (13:36:35.080) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    (13:36:37.220) 21.00<CR>
    (13:36:37.220) req id
    (13:36:37.220) send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    
    


  • But gw.begin(NULL, 1);
    worked now. Thank you!

    Might be worth to write this somewhere in the guide.


 

326
Online

7.5k
Users

8.4k
Topics

90.4k
Posts