Modify Node ID?
-
Is there a way to modify the Node ID once a Node ID has been issues to a sensor node that was originally configured in AUTO Node ID mode?
Thanks,
Tony@tcontrada
I think only way is to clear eeprom and then use NODE number in gw.beginEg. gw.begin(NULL, 12, true)
-
You can use this code to change the node ID without erasing the rest of the eeprom:
#define MY_CORE_ONLY #include <MySensor.h> #define NEW_NODE_ID 42 // Change 42 to the new node ID you want void setup() { Serial.begin(MY_BAUD_RATE); Serial.print("Old node ID: "); Serial.println(hwReadConfig(EEPROM_NODE_ID_ADDRESS)); Serial.println("Writing new ID"); hwWriteConfig(EEPROM_NODE_ID_ADDRESS, NEW_NODE_ID); Serial.print("New node ID: "); Serial.println(hwReadConfig(EEPROM_NODE_ID_ADDRESS)); } void loop() { // Nothing to do here... }The output will look like this:
Old node ID: 69 Writing new ID New node ID: 42I have tested this code with the MySensors development version only, but I think it should work on older versions as well.
-
@tcontrada and if you want to get new node id request, just write new node id as
255. -
@tcontrada I guess you are using 1.5 branch, If I am not wrong
hwReadConfigandhwWriteConfigare not available in 1.5. Which is available in development branch(2.0 beta).My guess!! In 1.5 equivalent functions are
hw_readConfigandhw_writeConfig
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login