Using NRF24 - How can I limit the max auto NodeID number?

  • Hi,
    I would like to use Auto NodeID however I would like limit the max number of node ID to be 100 so that there is no change I will have a node with an ID greater than 100.
    How can this be done?

  • Hardware Contributor

    I am not sure but I don't think so. All controllers I have used yet give incrementing auto Ids though. So if you have less than 100 (auto id) nodes you can simply set the id in code for your test nodes.

  • Tnx but this doesn't help much.
    Setting up manually 100 nodes is not good for me.
    I am sure that there is somewhere in the code of configuration, a var with the max node ID, because using NRF24 is limited to 254 nodes... so I need someone who knows around the code to help me out finding how to changes this number...

  • Hardware Contributor


    note : I don't think you need to open 3 threads for this.

    MySensors doesn't set any node id.
    If MySensors doesn't set ids, then who?? controller or you by using manual ids.
    nrf24 limited to 254 nodes, doesn't remove the need to set an id. Again, Mysensors doesn't handle this part 🙂

  • Mod

    I don't see the need to limit to 100 the id assignment. If you only need 100 just setup those and turn off auto ID assignment

  • Let's make it more simple.
    I will have 100 nodes in my property which I don't want to preset with static id.
    I don't have a controller, only one NodeMCU with NRF24 which is the "gateway" to Wifi - I use receive on the GateWay and upload the received data from nodes to POST on local MySQL server (I have a computer at home network with MySQL).
    I need to track each node and know it's ID. Was that ID assigned automatically when I use AUTO mode?

    And, do you have any suggestions on how to approach this?

    The most important is that I want it to be seamless with IDs, I don't want to program each node of the 100 with static ID, cause if I make changes, it adds more complexity to update the system.

  • As @scalz already pointed out:
    No controller, no ID... You may try to implement this part of regular controller functions to your NodeMCU, but I really doubt if this is worth the effort.

    Once, the ID is assigned from controller side, it is stored in EEPROM and no longer dynamic, so this is a one-time question.

    So how to get the ID in EEPROM? Once more: the easiest way to achive that is to assign it in the sketch before uploading.

    Btw.: 100 Nodes sounds quite a lot. How about combining sensors?

  • Mod

    If your gateway is ethernet you can use myscontroller and use its auto ID function

Log in to reply

Suggested Topics

  • 4
  • 5
  • 9
  • 3
  • 274
  • 9