Unable to delete custom images in plugin

Please use template to report bugs and problems. Post here your questions when not sure where else to post
Only for bugs in the Domoticz application! other problems go in different subforums!

Moderators: leecollings, remb0

Forum rules
Before posting here, make sure you are on the latest Beta or Stable version.
If you have problems related to the web gui, clear your browser cache + appcache first.

Use the following template when posting here:

Version: xxxx
Platform: xxxx
Plugin/Hardware: xxxx
Description:
.....

If you are having problems with scripts/blockly, always post the script (in a spoiler or code tag) or screenshots of your blockly

If you are replying, please do not quote images/code from the first post

Please mark your topic as Solved when the problem is solved.
Post Reply
domja
Posts: 8
Joined: Friday 20 June 2025 19:36
Target OS: Raspberry Pi / ODroid
Domoticz version: 2025.1
Contact:

Unable to delete custom images in plugin

Post by domja »

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:

Code: Select all

 Error: Image deletion failed, Image object is not associated with a plugin.
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!
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest