Node Auto ID not firing requestNodeId()



  • I start my node with

    gw.begin();
    

    And I would assume that would send out a message to the controller to request an id. But that does not appear to happen.

    MySensors.cpp shows my nc.nodeID as

    Node id (0) : 0
    

    So the code in MySensors.cpp, never fires the requestNodeId() function to retrieve an id since nc.nodeId = 0 and not AUTO.
    How do I get nc.nodeId to equal AUTO. I am not seeing anywhere in the MySensors code where that would get written to EEPROM. Am I doing something wrong? Overlooking something?

    nc.nodeId == AUTO && isValidParent(nc.parentNodeId)) 
    
    		if (_nodeId != AUTO) {
    			// Set static id
    			nc.nodeId = _nodeId;
    			// Save static id in eeprom
    			hw_writeConfig(EEPROM_NODE_ID_ADDRESS, _nodeId);
    		} else if (nc.nodeId == AUTO && isValidParent(nc.parentNodeId)) {
    			// Try to fetch node-id from gateway
    			requestNodeId();
    		}
    

  • Admin

    Do you have something in your eeprom already blocking? Try clearing it using the provided ClearEprom sketch in examples.


Log in to reply
 

Suggested Topics

  • 1
  • 3
  • 2
  • 10
  • 5
  • 1

0
Online

11.4k
Users

11.1k
Topics

112.7k
Posts