Skip to content
  • 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
  1. Home
  2. Troubleshooting
  3. Static Node ID and other Unanswered Questions
  • Getting Started
  • Controller
  • Build
  • Hardware
  • Download/API
  • Forum
  • Store

Static Node ID and other Unanswered Questions

Scheduled Pinned Locked Moved Troubleshooting
powerserial protocolnode idnrf24l01+humidity
3 Posts 3 Posters 6.7k Views 2 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • ? Offline
    ? Offline
    A Former User
    wrote on last edited by
    #1

    Hello all,

    This website is pretty awesome, however, there are some things that I could use clarification on. (It might be a good idea to make a simple FAQ section). The main questions are bolded.

    I don't want to use a controller. The application I am working on will have at most 10 sensors, no repeaters, and one gateway/main hub, which will work almost in reverse. The main hub will have sensors attached to it, and will send out commands to the sensors to light LEDs. The application will be extremely low power, meaning the sensors will most likely sleep, waking every percentage of a second to check for a message.

    Doing some searching, I've found out that the controller (not the gateway) usually hands out ids to the sensors, however, since I won't have a supported controller connected, I would like an example of how to best assign static id's to sensors. What are all of the arguments? Do I first have to clear the eeprom? Do I type "gw.begin(5);" to assign id 5 to a sensor?

    To start, I've set up a gateway device using code for an arduino, and set up a sensor node using the DHT humidity example. (Some codebender options give compilation errors as well, but that's a different subject)

    I did find a post for a repeater node and modified the "gw.begin();" to "gw.begin(NULL,4,false);" and there is communication, but there is not a good break down of what exactly I'm seeing in the arduino serial monitor, even in the API. Below is the output that I see from the gateway:

    0;0;3;0;14;Gateway startup complete.
    0;0;3;0;9;read: 4-4-0 s=255,c=0,t=17,pt=0,l=5:1.4.1
    4;255;0;0;17;1.4.1
    0;0;3;0;9;read: 4-4-0 s=255,c=3,t=6,pt=1,l=1:0
    4;255;3;0;6;0
    0;0;3;0;9;read: 4-4-0 s=255,c=3,t=11,pt=0,l=8:Humidity
    4;255;3;0;11;Humidity
    0;0;3;0;9;read: 4-4-0 s=255,c=3,t=12,pt=0,l=3:1.0
    4;255;3;0;12;1.0
    0;0;3;0;9;read: 4-4-0 s=0,c=0,t=7,pt=0,l=5:1.4.1
    4;0;0;0;7;1.4.1

    I know it's communicating because of the word "Humidity", however, I don't understand the output from the serial monitor. Can someone explain this? I'm using the DHT11 sensor. I also don't understand why I stop receiving output. The devices sat for 5 minutes after initially being plugged in, but the output above is all that was received.

    Lastly, is there any more information about using the sleep command? The NRF chips have several sleep/standby options, as does the AT328p. I'm guessing the power down mode is the only option supported. Can I get the gateway to resend a message to a sensor until it receives a acknowledge? This will be important if I have the sensors sleeping for percentages of a second.

    Thank you for all of the hard work!

    Hagan

    1 Reply Last reply
    0
    • tbowmoT Offline
      tbowmoT Offline
      tbowmo
      Admin
      wrote on last edited by tbowmo
      #2

      You have found the correct way of assigning fixed node id's, with gw.begin(null,4,false);
      It's kind of embedded in the apI description here
      http://mysensors.org/build/sensor_api

      For the serial communication part, there is a description of the protocol on http://mysensors.org/build/serial_api, look for the strings that start with 4 (your node id)

      For the retransmit question, have you thought about reversing things, and let the nodes request updates when they wake up, instead of the gateway transmitting things to a node that might be a sleep.

      Something like:
      node hey i'm awake, give me some data
      gw ok here you are
      node thanks, goodnight

      1 Reply Last reply
      0
      • B Offline
        B Offline
        boozz
        wrote on last edited by
        #3

        Does this help:

        http://forum.mysensors.org/topic/748/manual-assigning-node-id-s-for-network-with-repeaters

        I agree with you that the serial messages are not perfectly documented, but realise that this site has been made (as far as I know) by a bunch of people that share their 'love' for home automation.....

        boozz

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        16

        Online

        11.7k

        Users

        11.2k

        Topics

        113.0k

        Posts


        Copyright 2019 TBD   |   Forum Guidelines   |   Privacy Policy   |   Terms of Service
        • Login

        • Don't have an account? Register

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