Page 1 of 1

How can I replace a device?

Posted: Sunday 28 February 2016 15:57
by wolph
Is there any way to replace a switch with a different (unassigned) one?
Due to broken hardware and house layout changes I need to switch some devices around at times and it seems impossible to replace the device within domoticz. Any replacement requires modifying all scripts, scenes, groups and timers that are linked to the device which is a bit of a drag.

I know there are some possibilities for sensors, but I'm looking for a solution for switches.
Relevant reading for sensors: viewtopic.php?t=3448

Re: How can I replace a device?

Posted: Sunday 28 February 2016 16:19
by simonrg
I guess what you are trying to do is keep the log history for your old device alternatively scripts other than Lua or Blockly within Domoticz.

In terms of just replacing devices so they work in Lua or Blockly scripts without having to change the script, it is just a matter of deleting the old device and then creat a new device with the old device's name. Scripts work on names rather than indexes, so will work with the new devices with the same name.

Other scripting langagues outside Domoticz you would need to look up the new idx.

Re: How can I replace a device?

Posted: Sunday 28 February 2016 16:58
by wolph
Great to hear that the Lua and Blockly scripts are not an issue but that still leaves the scenes, groups and schedules.

Ideally I would just like to replace all references to a specific ID or replace the underlying device for a specific ID.