Cannot detect my ds18b20 temp probes



  • I built a wifi gateway to work with the Vera. I can see in the Vera logs where it goes into inclusion mode, but nothing is detected.

    My sensor that I'm trying to include is a Nano, with a single ds18b20 remote probe connected to it. It has red, green, and yellow wires. I have tried using both the green and the yellow as data, and it doesn't make a difference. There's a 4.7k resistor across VCC and data. VCC is plugged into 5v. I'm using the DallasTemperatureSensor example code, with the only change being COMPARE_TEMP set to 0.

    When I power up the sensor, I can see in the serial console on the gateway data being received from it:

    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:49
    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;
    Client 0: 255;255;3;0;4;50
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:50
    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;
    Client 0: 255;255;3;0;4;51
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:51
    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;
    Client 0: 255;255;3;0;4;52
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=2,sg=0,st=bc:52```
    

    Is there any way to issue a serial command to the sensor to see if it's even detecting it? I've checked and rechecked nearly everything and cannot figure this out. Is there any code I can put into the sensor to give more verbose troubleshooting?


  • Hero Member

    if you use the inbuilt dallas temp example in Arduino ( forget mysensors temporaily) - does it detect and read the values?



  • Yes, they work. So I went back to the example code provided on mysensors.org, and I added some Serial.print commands. Here's the output when I start the sensor now:

    sensor started, id=255, parent=0, distance=1
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    Found 1 devices.
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    req id
    send: 255-255-0-0 s=255,c=3,t=3,pt=0,l=0,sg=0,st=ok:
    25.00
    

    It says it found one device, and that 25.00 is the temp in C for it. So, it IS finding it. It just seems inclusion is not working, even it appears my gateway is seeing data from the sensor when I look at it in the serial monitor.


  • Hero Member

    If you see the traffic on your gateway requesting the id, then the Vera is not providing the id for some reason, or it is supplying the id, but the sensor is not receiving the response.



  • This is what it says in the gw serial console when I manage to get it into inclusion mode and restart my sensor:

    Client 0: 0;0;3;0;5;1
    
    0;0;3;0;5;1
    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;
    Client 0: 255;255;3;0;4;103
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:103
    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;
    Client 0: 255;255;3;0;4;104
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:104
    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;
    Client 0: 255;255;3;0;4;105
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:105
    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;
    Client 0: 255;255;3;0;4;106
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:106
    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;
    Client 0: 255;255;3;0;4;107
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:107
    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;
    Client 0: 255;255;3;0;4;108
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:108
    0;0;3;0;5;0
    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;
    Client 0: 255;255;3;0;4;109
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:109
    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;
    Client 0: 255;255;3;0;4;110
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:110
    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;
    Client 0: 255;255;3;0;4;111
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:111
    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;
    Client 0: 255;255;3;0;4;112
    
    0;0;3;0;9;send: 0-0-255-255 s=255,c=3,t=4,pt=0,l=3,sg=0,st=bc:112
    

    The Vera didn't find any devices. Is it a problem with the gateway maybe not requesting the ID from the sensor?



  • So I cleared EEPROM on both the sensor and gw. I deleted the Mysensors device in Vera and recreated it.

    Now, this is what I get on the sensor, and I can see all messages received on the gw. But, it seems my sensor is still not registering with the gateway/controller. Before I was occasionally getting st=ok on the sensor, now it's st=bc. Any thoughts?

    ind parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    sensor started, id=255, parent=255, distance=255
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    Found 1 devices.
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    find parent
    send: 255-255-255-255 s=255,c=3,t=7,pt=0,l=0,sg=0,st=bc:
    21.50
    

  • Hero Member

    How are you putting the gateway into inclusion mode? Via the Vera UI, or a button on the gateway? Ive only ever used the Vera UI.



  • @gregl

    Through the Vera UI. But, I just got it working. I got a new power supply for the ESP board, and then I used tin foil to shield my gateway.


 

269
Online

7.8k
Users

8.7k
Topics

92.9k
Posts