Page 1 of 1

Update Arduino code without becoming a new node in Domoticz?

Posted: Monday 27 February 2017 16:29
by popunonkok
Is there a way to update the Arduino code without the attached sensors becoming new sensors in Domoticz?

My Example is that I now have a fully functional node with 2 switches (Door/Lock). However. I would like to modify the Arduino code so that I can add the function to send Battery status as well.

Is there a way? I guess the same goes for Updating a node if the MySensors Library version changes.

Re: RE: Update Arduino code without becoming a new node in Domoticz?

Posted: Monday 27 February 2017 18:35
by jeroenvanpelt
popunonkok wrote:Is there a way to update the Arduino code without the attached sensors becoming new sensors in Domoticz?

My Example is that I now have a fully functional node with 2 switches (Door/Lock). However. I would like to modify the Arduino code so that I can add the function to send Battery status as well.

Is there a way? I guess the same goes for Updating a node if the MySensors Library version changes.
If I am not mistaken, your sensor will keep it's node ID. This means your sensor in Domoticz will stay the same. It only gets a new node ID is you use the ClearEprom.ino sketch if I remember correctly. Hopefully someone can confirm this?

Sent from my Nexus 6P using Tapatalk

Re: Update Arduino code without becoming a new node in Domoticz?

Posted: Sunday 05 March 2017 14:18
by Jimbolaya
Yes, the node ID is stored in the eprom. However, the eprom overwritten when a new sketch is uploaded. Include a line in the sketch to assign the node ID.

#DEFINE MY_NODE_ID 6

Re: RE: Re: Update Arduino code without becoming a new node in Domoticz?

Posted: Sunday 05 March 2017 19:29
by jeroenvanpelt
Jimbolaya wrote:Yes, the node ID is stored in the eprom. However, the eprom overwritten when a new sketch is uploaded. Include a line in the sketch to assign the node ID.

#DEFINE MY_NODE_ID 6
Hmm, in my (anecdotal) experience, the nodes I have worked with do not get a different ID until I use the ClearEprom sketch. Just reflashing a modified sketch does not change it. Or is it the controller (Domoticz) that causes this maybe?

Sent from my Nexus 6P using Tapatalk

Re: Update Arduino code without becoming a new node in Domoticz?

Posted: Monday 06 March 2017 10:07
by napo7
I noticed that using an USBASP with arduino IDE does clear the EEPROM memory.
To keep my nodes ID, I have to dump the EEPROM before updating (via avrdude command line), flash my new program, then write back my EEPROM dump.

Re: Update Arduino code without becoming a new node in Domoticz?

Posted: Sunday 19 March 2017 1:14
by gohan
If you just program Arduino with standard USB interface, the node ID stays in eeprom