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
  1. Home
  2. Bug Reports
  3. Static IDs

Static IDs

Scheduled Pinned Locked Moved Bug Reports
6 Posts 2 Posters 2.1k Views 1 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.
  • tekkaT Offline
    tekkaT Offline
    tekka
    Admin
    wrote on last edited by tekka
    #1

    A static ID is not saved in eeprom. As a consequence, OTA bootloader will request new ID for bootloading, until the sketch takes over with the static ID.

    Resolution in MySensors.cpp / MySensor::begin procedure

    if ( (_nodeId != AUTO) && (nc.nodeId != _nodeId) ) {
    	// Set static id
    	nc.nodeId = _nodeId;
    	// Save static id in eeprom
    	eeprom_write_byte((uint8_t*)EEPROM_NODE_ID_ADDRESS, _nodeId);
    }
    
    1 Reply Last reply
    0
    • hekH Offline
      hekH Offline
      hek
      Admin
      wrote on last edited by
      #2

      @tekka

      Thanks, will be added.

      tekkaT 1 Reply Last reply
      0
      • hekH hek

        @tekka

        Thanks, will be added.

        tekkaT Offline
        tekkaT Offline
        tekka
        Admin
        wrote on last edited by tekka
        #3

        @hek

        Same for static parent node id in MySensors.cpp / MySensor::begin procedure:

        Resolution:

        if ( (_parentNodeId != AUTO) && (nc.parentNodeId != _parentNodeId) ) {
        	// Set static parent id
        	nc.parentNodeId = _parentNodeId;
        	// Save static parent id in eeprom
        	eeprom_write_byte((uint8_t*)EEPROM_PARENT_NODE_ID_ADDRESS, _parentNodeId);
        	autoFindParent = false;
        } else {
        	autoFindParent = true;
        }
        

        A general thought: If the parent node is not static (there are a few cases where static parent nodes make sense), it would be better to re-discover the closest node/repeater during each startup. This concept makes also more sense for OTA bootloading - you do not want to have an assigned parent node that is eventually down...

        1 Reply Last reply
        0
        • hekH Offline
          hekH Offline
          hek
          Admin
          wrote on last edited by
          #4

          Agree, but I think the bootloader code size must be kept to a bare minimum (I didn't write that part).

          tekkaT 1 Reply Last reply
          0
          • hekH hek

            Agree, but I think the bootloader code size must be kept to a bare minimum (I didn't write that part).

            tekkaT Offline
            tekkaT Offline
            tekka
            Admin
            wrote on last edited by
            #5

            @hek the findParentNode() part is already part of the initial OTA bootloader and only takes a few lines.

            hekH 1 Reply Last reply
            0
            • tekkaT tekka

              @hek the findParentNode() part is already part of the initial OTA bootloader and only takes a few lines.

              hekH Offline
              hekH Offline
              hek
              Admin
              wrote on last edited by
              #6

              @tekka

              Haha.. ok. I see. someone should probably take care of the bootloader code while @ToSa is busy..

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


              18

              Online

              11.7k

              Users

              11.2k

              Topics

              113.1k

              Posts


              Copyright 2025 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
              • MySensors
              • OpenHardware.io
              • Categories
              • Recent
              • Tags
              • Popular