Skip to content
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Brand Logo
S

sPENKMAN

@sPENKMAN
About
Posts
6
Topics
2
Shares
0
Groups
0
Followers
0
Following
0

Posts

Recent Best Controversial

  • What did you build today (Pictures) ?
    S sPENKMAN

    A (long) time ago I had my own Android app which talked xmlrpc to a Python script, which talked serial with my Arduino which in his turn talked 433 Mhz to our outlets turning lights on and off. All was dandy until Android 4 came along and something stopped working security wise and we were send back into the middle ages.

    Today I successfully got MySensors working enabling me to read temp/hum from a node and letting me send Elro signals into the air over 433Mhz from OpenHAB2. Now I can scale, extend and upgrade my sensors and actuators I can move forward and start improving our home.

    Arduino Uno r3, 433Mhz transmitter, DHT11 sensor

    General Discussion

  • Unable to send message from gw to sensor(!TSF:MSG:SEND)
    S sPENKMAN

    Problem: Everything seems to work correctly except the fact that I'm unable to send any message of my own.
    Goal: Sending any given message to my sensor.
    What I need: Guidance in how I can debug this.

    After setting everything up I telnet to port 5003 on my PI and get greeted by the gateway after which I see data passing by:

    0;255;3;0;14;Gateway startup complete.
    0;255;0;0;18;2.2.0-rc.1
    2;255;1;0;16;1
    2;255;1;0;16;0
    2;255;1;0;16;1
    2;255;1;0;16;0
    2;255;1;0;16;1
    2;255;1;0;16;0
    2;255;1;0;16;1
    2;255;1;0;16;0
    

    As soon as I send my own message 2;255;1;0;16;2 I'm seeing the following in the logs of my gateway:

    mysgw: Client 0: 2;255;1;0;16;2
    mysgw: !TSF:MSG:SEND,0-0-2-2,s=255,c=1,t=16,pt=0,l=1,sg=0,ft=0,st=NACK:2
    

    At this point I don't know what I can do to debug this any further. I've tried switching power sources with and without the voltage converter and capacitors but all to no avail.


    Some logs for insight are added to the bottom of this post:

    • #1: Gateway starting up
    • #2: Gateway registering sensor
    • #3: Sensor registering to gateway

    My Gateway hardware consist of:

    • 1x Raspberry Pi 1B
    • 1x nrf24l01
    • 1x LD1337 voltage regulator
    • 2x 100uF capacitor (on 5v and 3.3v side of the regulator)
    • 1x 47uF capacitor (on the VCC/GND of the nrf24)

    and has been configured with the following:

    $ git clone https://github.com/mysensors/MySensors.git --branch development
    $ cd MySensors
    $ sudo ./configure --my-transport=nrf24
    ...
    $ make
    ...
    $ sudo ./bin/mysgw -d
    

    Note: current commit I'm on is 682a6b0.

    My Sensor hardware consists of:

    • Arduino Uno r3
    • 1x nrf24l01
    • 1x 47uF capacitor (on the VCC/GND of the nrf24)

    and has been configured with the following:

    #define MY_DEBUG
    #define MY_RADIO_NRF24
    
    #include <SPI.h>
    #include <MySensors.h>
    
    #define OPEN 1
    #define CLOSE 0
    
    MyMessage msg(MY_NODE_ID, V_TRIPPED);
    
    uint8_t value = OPEN;
    
    void presentation()
    {
        present(MY_NODE_ID, S_DOOR);
    }
    
    void loop()
    {
        value = value == OPEN ? CLOSE : OPEN;
        send(msg.set(value));
        sleep(10000);
    }
    
    void receive(const MyMessage &message)
    {
      Serial.println("Received message from the big giant head!");
    }
    

    Logs:
    #1: Gateway starting up

    $ sudo ./bin/mysgw -d
    mysgw: Starting gateway...
    mysgw: Protocol version - 2.2.0-rc.1
    mysgw: MCO:BGN:INIT GW,CP=RNNGL---,VER=2.2.0-rc.1
    mysgw: TSF:LRT:OK
    mysgw: TSM:INIT
    mysgw: TSF:WUR:MS=0
    mysgw: TSM:INIT:TSP OK
    mysgw: TSM:INIT:GW MODE
    mysgw: TSM:READY:ID=0,PAR=0,DIS=0
    mysgw: MCO:REG:NOT NEEDED
    mysgw: Listening for connections on 0.0.0.0:5003
    mysgw: MCO:BGN:STP
    mysgw: MCO:BGN:INIT OK,TSP=1
    

    #2: Gateway registering sensor

    mysgw: TSF:MSG:READ,2-2-255,s=255,c=3,t=7,pt=0,l=0,sg=0:
    mysgw: TSF:MSG:BC
    mysgw: TSF:MSG:FPAR REQ,ID=2
    mysgw: TSF:CKU:OK,FCTRL
    mysgw: TSF:MSG:GWL OK
    mysgw: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=8,pt=1,l=1,sg=0,ft=0,st=OK:0
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=3,t=24,pt=1,l=1,sg=0:1
    mysgw: TSF:MSG:PINGED,ID=2,HP=1
    mysgw: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=25,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    mysgw: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=0,t=17,pt=0,l=5,sg=0:2.1.1
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=3,t=6,pt=1,l=1,sg=0:0
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=0,t=0,pt=0,l=5,sg=0:2.1.1
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=3,t=26,pt=1,l=1,sg=0:2
    mysgw: TSF:MSG:SEND,0-0-2-2,s=255,c=3,t=27,pt=1,l=1,sg=0,ft=0,st=OK:1
    mysgw: TSF:MSG:READ,2-2-0,s=255,c=1,t=16,pt=1,l=1,sg=0:0
    

    #3: Sensor registering to gateway

    0 MCO:BGN:INIT NODE,CP=RNNNA--,VER=2.1.1
    3 TSM:INIT
    4 TSF:WUR:MS=0
    11 TSM:INIT:TSP OK
    13 TSF:SID:OK,ID=2
    14 TSM:FPAR
    51 TSF:MSG:SEND,2-2-255-255,s=255,c=3,t=7,pt=0,l=0,sg=0,ft=0,st=OK:
    177 TSF:MSG:READ,0-0-2,s=255,c=3,t=8,pt=1,l=1,sg=0:0
    182 TSF:MSG:FPAR OK,ID=0,D=1
    2058 TSM:FPAR:OK
    2059 TSM:ID
    2060 TSM:ID:OK
    2062 TSM:UPL
    2065 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=24,pt=1,l=1,sg=0,ft=0,st=OK:1
    2077 TSF:MSG:READ,0-0-2,s=255,c=3,t=25,pt=1,l=1,sg=0:1
    2082 TSF:MSG:PONG RECV,HP=1
    2085 TSM:UPL:OK
    2086 TSM:READY:ID=2,PAR=0,DIS=1
    2092 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=15,pt=6,l=2,sg=0,ft=0,st=OK:0100
    2098 TSF:MSG:READ,0-0-2,s=255,c=3,t=15,pt=6,l=2,sg=0:0100
    2105 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=17,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
    2114 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=6,pt=1,l=1,sg=0,ft=0,st=OK:0
    4121 TSF:MSG:SEND,2-2-0-0,s=255,c=0,t=0,pt=0,l=5,sg=0,ft=0,st=OK:2.1.1
    4128 MCO:REG:REQ
    4131 TSF:MSG:SEND,2-2-0-0,s=255,c=3,t=26,pt=1,l=1,sg=0,ft=0,st=OK:2
    4137 TSF:MSG:READ,0-0-2,s=255,c=3,t=27,pt=1,l=1,sg=0:1
    4143 MCO:PIM:NODE REG=1
    4145 MCO:BGN:INIT OK,TSP=1
    4149 TSF:MSG:SEND,2-2-0-0,s=255,c=1,t=16,pt=1,l=1,sg=0,ft=0,st=OK:0
    
    Troubleshooting

  • Unable to send message from gw to sensor(!TSF:MSG:SEND)
    S sPENKMAN

    I knew it had to be something simple, but damn! Thank you so much, now I finally can go forward with my project. Fun times ahead!

    I was aware that the node/child id setup wasn't quite in order but as it didn't stood in my way I hadn't made the effort to change it from the example.

    Troubleshooting
  • Login

  • Don't have an account? Register

  • Login or register to search.
  • First post
    Last post
0
  • MySensors
  • OpenHardware.io
  • Categories
  • Recent
  • Tags
  • Popular