Update Arduino code without becoming a new node in Domoticz?

Moderator: leecollings

Post Reply
popunonkok
Posts: 6
Joined: Friday 01 November 2013 19:02
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

Update Arduino code without becoming a new node in Domoticz?

Post 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.
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

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

Post 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
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
User avatar
Jimbolaya
Posts: 12
Joined: Thursday 18 February 2016 21:28
Target OS: Raspberry Pi / ODroid
Domoticz version: 4.11207
Location: New York, USA
Contact:

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

Post 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
Jim
jeroenvanpelt
Posts: 20
Joined: Saturday 30 January 2016 13:19
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Contact:

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

Post 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
--
Domoticz latest stable - RaspberryPi 2 B - MySensors - Controlicz - Google Home - RFLink (w/MiLight)
napo7
Posts: 20
Joined: Monday 06 February 2017 8:33
Target OS: Raspberry Pi / ODroid
Domoticz version:
Contact:

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

Post 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.
gohan
Posts: 36
Joined: Monday 13 February 2017 23:42
Target OS: Windows
Domoticz version:
Contact:

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

Post by gohan »

If you just program Arduino with standard USB interface, the node ID stays in eeprom
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest