Bug with Replace Device and Python Plugin
Posted: Tuesday 08 April 2025 19:21
Version: 2025.1 build 16627
Platform: official Docker container
Plugin/Hardware: Raspberry pi https://github.com/fleinze/Zigbee2Tasmoticz/
Description:
Every time I use the replace device function I get the following error when the plugin tries to update the device again:
2025-04-08 19:10:30.257 Error: z2t: Device creation failed, Hardware/Unit combination (2:5) already exists in Domoticz.
It seems that the Devices directory does not contain the device affected by the replace function. The plugin tries to create a new device because it can not find the device, and uses the first available unit-number for a new device. This fails because this unit is actually not available in the database, it is just not in the Devices directory.
Workaround: Reloading the plugin manually after using the replace device function.
Yes, I wrote the plugin myself but I am certain that it is not a problem specific to my code.
Platform: official Docker container
Plugin/Hardware: Raspberry pi https://github.com/fleinze/Zigbee2Tasmoticz/
Description:
Every time I use the replace device function I get the following error when the plugin tries to update the device again:
2025-04-08 19:10:30.257 Error: z2t: Device creation failed, Hardware/Unit combination (2:5) already exists in Domoticz.
It seems that the Devices directory does not contain the device affected by the replace function. The plugin tries to create a new device because it can not find the device, and uses the first available unit-number for a new device. This fails because this unit is actually not available in the database, it is just not in the Devices directory.
Workaround: Reloading the plugin manually after using the replace device function.
Yes, I wrote the plugin myself but I am certain that it is not a problem specific to my code.