Page 1 of 1

Change hardware on current devices???

Posted: Sunday 30 May 2021 13:24
by EddyG
I have 2 type of Zigbee hardware.
1. When I started with Zigbee, I decided to go for Nodered, so Dummy hardware with Virtual devices.
2. Later I switched to the Zigbee2MQTT plugin.
The latter is my main hardware, but I am getting unsatisfied with the updates and performance of the plugin. Almost nothing happens there anymore.

So I would like to switchback to the Nodered solution, where I have FULL control but a little bit more work.
I would like to keep my current devices from the plugin, because of history and of the work connected to create over 100 devices again.
Is it possible to change the hardware on the plugin devices to the hardware (ID) of the Dummy?
Would that break things or would that go well?

Re: Change hardware on current devices???

Posted: Sunday 30 May 2021 16:52
by waaren
EddyG wrote: Sunday 30 May 2021 13:24 Is it possible to change the hardware on the plugin devices to the hardware (ID) of the Dummy?
Yes.

Code: Select all

oldID=12 # change to ID of "old hardware"
newID=15 # change to ID of "new hardware"
cd <domoticz dir>
sudo service domoticz stop
sudo cp domoticz.db domoticz.keep
sqlite3 domoticz.db "UPDATE deviceStatus SET HardwareID=$newID WHERE HardwareID = $oldID"
sudo service domoticz start
Would that go well?
Yes

Re: Change hardware on current devices???

Posted: Sunday 30 May 2021 19:00
by EddyG
Tnx, for the answer, but I think you mean the 'DeviceStatus' table.
I will make all the nodered flows for all the devices (will take a while) and switch over.
Then I can also delete the totally unnecessary devices like *_volt *_ampere *_pwrmem that saves a lot, because I think that the max. number of devices on hardware is 255

Re: Change hardware on current devices???

Posted: Sunday 30 May 2021 20:10
by waaren
EddyG wrote: Sunday 30 May 2021 19:00 Tnx, for the answer, but I think you mean the 'DeviceStatus' table.
:oops: You are right.
Updated my original post to reflect this.

Re: Change hardware on current devices???

Posted: Tuesday 16 April 2024 22:19
by sincze
waaren wrote: Sunday 30 May 2021 16:52
EddyG wrote: Sunday 30 May 2021 13:24 Is it possible to change the hardware on the plugin devices to the hardware (ID) of the Dummy?
Yes.

Code: Select all

oldID=12 # change to ID of "old hardware"
newID=15 # change to ID of "new hardware"
cd <domoticz dir>
sudo service domoticz stop
sudo cp domoticz.db domoticz.keep
sqlite3 domoticz.db "UPDATE deviceStatus SET HardwareID=$newID WHERE HardwareID = $oldID"
sudo service domoticz start
Would that go well?
Yes
Tnx with these instructions I was able to phase out the Mysensor Integration.
By moving the mysensors sensor nodes over to virtual hardware nodes!