Raspberry Gateway and first sensor HC-SR04



  • Hi all, I am a complete newbie and this is my first try in the smart home area. My goal is to have a few sensors and actors around the house, a raspberry gateway and iobroker as controller.

    So I build the gateway on the raspberry 1 and connected a NRF24L01+ to it. The software build without errors and starting it seems to be successfull. Next I took a arduino uno and connected a HC-SR04 to it. I ran a sketch that I found somewhere and in the serial monitor it reported correct results for different distances. So I added a radio as well, loaded the sketch for the HC-SR04 found on this page and uploaded it. Both gateway and sensor use version 2.3.1. The sensor's the output in the serial monitor is the following:

    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:
    2046 !TSM:FPAR:NO REPLY
    2049 TSM:FPAR
    2051 TSF:MSG:SEND,255-255-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    4059 !TSM:FPAR:NO REPLY
    4061 TSM:FPAR

    the output from the gateway is this:

    Dec 15 15:53:16 INFO Starting gateway...
    Dec 15 15:53:16 INFO Protocol version - 2.3.1
    Dec 15 15:53:16 DEBUG MCO:BGN:INIT GW,CP=RNNGL---,REL=255,VER=2.3.1
    Dec 15 15:53:16 DEBUG TSF:LRT:OK
    Dec 15 15:53:16 DEBUG TSM:INIT
    Dec 15 15:53:16 DEBUG TSF:WUR:MS=0
    Dec 15 15:53:16 DEBUG TSM:INIT:TSP OK
    Dec 15 15:53:16 DEBUG TSM:INIT:GW MODE
    Dec 15 15:53:16 DEBUG TSM:READY:ID=0,PAR=0,DIS=0
    Dec 15 15:53:16 DEBUG MCO:REG:NOT NEEDED
    Dec 15 15:53:16 DEBUG Listening for connections on 0.0.0.0:5003
    Dec 15 15:53:16 DEBUG MCO:BGN:STP
    Dec 15 15:53:16 DEBUG MCO:BGN:INIT OK,TSP=1
    Dec 15 15:53:16 DEBUG TSM:READY:NWD REQ
    Dec 15 15:53:18 DEBUG TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:
    Dec 15 16:08:16 DEBUG TSF:SAN:OK
    Dec 15 16:13:16 DEBUG TSM:READY:NWD REQ
    Dec 15 16:13:18 DEBUG TSF:MSG:SEND,0-0-255-255,s=255,c=3,t=20,pt=0,l=0,sg=0,ft=0,st=OK:

    I tried to replace the radios but this didn't change anything. I don't have any capacitors (ordered some), but as I understand the output, both gateway and sensor seem to work, but won't get a connection. Am I correct that I would see a message on the gateway if/when it receives something from the sensor? I didn't hook up the controller yet. Aside from waiting for the capacitor, can I check something else?

    regards, Hajo


  • Mod

    @hhn10 missing capacitor is the top reason for bad communication so your best bet is to wait for the capacitors to arrive.

    Welcome to the forum


 

280
Online

8.5k
Users

9.3k
Topics

98.5k
Posts