Author Topic: Do not need to differentiate nodes  (Read 346 times)

ddradio

  • Newbie
  • *
  • Posts: 3
Do not need to differentiate nodes
« on: November 19, 2018, 10:27:52 AM »
Hello  :)

I am really wanting to get into using these radios (RFM69HCW) and the lowpowerlab library.  I see in all the examples, NODE is required to be unique from other nodes.   For my use case, I don't wish to use this feature.  I want my radios to talk to everyone around me.

For example, imagine on every door there is a moteino that will send a message if a door is open.  I don't need to know which node sent that, I just need that message sent out

If I have one moteino downstairs with relays to control lights and one moteino upstairs to control lights, I want them both to receive that same message (So I don't really want to use the gateway feature)

For the relay moteinos, can I have them be the same gateway?
For the door moteinos, can I have them be the same node?

(So every door moteino get's the exact same binary file, no settings changed, likewise with the relay moteinos)

Thanks for taking the time to ready.  Sorry if this is a basic question.  I didn't see any question like this in the search feature.  Sorry too if this is in the wrong forum section

Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5938
  • Country: us
    • LowPowerLab
Re: Do not need to differentiate nodes
« Reply #1 on: November 19, 2018, 01:06:49 PM »
You need a unique node ID for each sender. Ignore the node ID if you don't care about it.
You can send a broadcast message if you want everyone to receive a message (nodeID=255).
But it's needed for the RFM69 library, for ACKs.
You don't HAVE TO HAVE a gateway, it's just usually the way a network is used, to relay data from a layer (RF physical nodes) to another (internet, etc).

ddradio

  • Newbie
  • *
  • Posts: 3
Re: Do not need to differentiate nodes
« Reply #2 on: November 19, 2018, 02:26:13 PM »
Thank you for your reply!

Really like your boards and libraries.  Thanks for the time you spend on them

TomWS

  • Hero Member
  • *****
  • Posts: 1888
Re: Do not need to differentiate nodes
« Reply #3 on: November 19, 2018, 03:29:17 PM »
You need a unique node ID for each sender. Ignore the node ID if you don't care about it.
Uh, this isn't accurate.  You can set the same nodeID in all nodes and a light controller can listen to any and all that send with the same network settings.  Similarly, the lightcontroller can use radio.send() to send the same message to all of them using the same nodeId, but can not sendWithRetry() or send uniquely to any of the nodes in this case.

However, the lightcontroller will not know that there is a door open if someone opens a door at one node, but then closes a different door at another node - the first node's door could still be open.  The controller will think the 'doors' are closed since there is no unique identifier.

You can use the same code in all nodes and still have unique Node ID if you use EEPROM, for example, to save the unique node id.  The id could be assigned by the light controller the first time it 'sees' a node starting up.  The node could, for example, use a default id (254 to take a random example) until it's assigned a unique one by the light controller.  Lots of different ways to do this, this is just one example.

Tom




Felix

  • Administrator
  • Hero Member
  • *****
  • Posts: 5938
  • Country: us
    • LowPowerLab
Re: Do not need to differentiate nodes
« Reply #4 on: November 19, 2018, 03:57:39 PM »
Uh, this isn't accurate.  You can set the same nodeID in all nodes and a light controller can listen to any and all that send with the same network settings. Similarly, the lightcontroller can use radio.send() to send the same message to all of them using the same nodeId, but can not sendWithRetry() or send uniquely to any of the nodes in this case.
Right, nobody forces you to code a unique ID.
But it's good practice and many reasons to keep each node separate, and a lot of the library functionality assumes you have unique IDs for unique nodes. At one point you will want ACKs, then you're back asking why nodes act strange when you want an ACK.
I would use pseudo broadcasting to reach multiple nodes at the same time, rather than code unique IDs, that just feels wrong.

ddradio

  • Newbie
  • *
  • Posts: 3
Re: Do not need to differentiate nodes
« Reply #5 on: November 20, 2018, 02:11:32 PM »
Thank you both for your input.  Really fantastic library, thanks again Felix!