Unable to delete custom images in plugin
Posted: Sunday 21 September 2025 13:22
Version: 2025.1 both stable and beta (build 16782)
Platform: Raspberry Pi / ODroid (Docker)
Plugin/Hardware: xxxx
Description:
As previously described in viewtopic.php?p=328277#p328277, I am unable to delete custom images which where created at the start of the plugin.
After some more investigation I found that the naming of the images is important, in that the name of the icon should start with the plugin key.
Before this was not the case and that was also the reason that with every update of the hardware, the icons would be created again. Even though this did not prevent the plugin for using them in the devices.
After changing the icon naming to reflect the plugin key, the images are now populated in the Images dict at the start/update of the plugin and only created once during the initial hardware add.
Now, I thought, this could be the cause of the problem of not able to delete the images as they were not 'linked' to the plugin.
Alas, still the same error:
I am neither fluent in C++ nor understand the domoticz design enough, but when looking at the code (e.g. /hardware/plugins/PythonObjects.cpp) the main difference I see is that the insert of the image is done on the domoticz/plugin object and that the delete of the image is done on the Images dict; where the missing reference to self->plugin is the cause of the error.
Thanks in advance!
Platform: Raspberry Pi / ODroid (Docker)
Plugin/Hardware: xxxx
Description:
As previously described in viewtopic.php?p=328277#p328277, I am unable to delete custom images which where created at the start of the plugin.
After some more investigation I found that the naming of the images is important, in that the name of the icon should start with the plugin key.
Before this was not the case and that was also the reason that with every update of the hardware, the icons would be created again. Even though this did not prevent the plugin for using them in the devices.
After changing the icon naming to reflect the plugin key, the images are now populated in the Images dict at the start/update of the plugin and only created once during the initial hardware add.
Now, I thought, this could be the cause of the problem of not able to delete the images as they were not 'linked' to the plugin.
Alas, still the same error:
Code: Select all
Error: Image deletion failed, Image object is not associated with a plugin.Thanks in advance!