ioBroker / ioBroker.zigbee

Zigbee communcation with Hue, Xiaomi, Lighttify... via TI CC2xxx USB stick
MIT License
313 stars 190 forks source link

change icon in adapter view #2232

Open averlon opened 6 days ago

averlon commented 6 days ago

I would like to change the icon/image of a device in the adapter-view.

I have an image stored in /opt/iobroker/iobroker-data/files/zigbee.admin/img

I have changed the icon in the object data:

{ "type": "device", "common": { "name": "MOE_Test_1", "type": "TS0001_switch_module", "icon": "img/o_moes_p_zigbee_switch_mini_01.png", ... }

This helped in the object-view, but not in the adapter-view.

Is there any way to change the icon?

asgothian commented 5 days ago

did you perform an adapter upload ?

averlon commented 5 days ago

did you perform an adapter upload ?

No!

asgothian commented 5 days ago

why not ?

averlon commented 5 days ago

O.K.! 1) Would this be a solution to solve the issue? 2) howto? - or even better, what would I have to do to change the icon?

asgothian commented 4 days ago

The admin requires certain assets to be copied to a specific location. Upload does that. There are 2 sensible ways of doing it:

A

averlon commented 4 days ago

We war still not on the same page!

The zigbee-adapter works. It shows icons/images for all devices.

But the images shown don't fit to the devices.

So I downloaded images from the supplier of the devices and uploaded the images to the files directory "img" of zigbee.admin.

Now - and that's the point of the issue - I would like to change the image in the view of the zigbee adapter.

As stated, I can change the image in the object adapter. This changes the image in the object-adapter view, but still not in the zigebee-adapter view.

So I would like to know how to change the icon/image in the zigbee-adapter view.

asgothian commented 4 days ago

You can’t unless the device is not using exposes. You can change that but you don’t want to go there. What you can try to do is name the download images to match the expected file names.

A.

On Monday, Oct 14, 2024 at 7:47 AM, Karl-Heinz Fischbach @. @.)> wrote:

We war still not on the same page!

The zigbee-adapter works. It shows icons/images for all devices.

But the images shown don't fit to the devices.

So I downloaded images from the supplier of the devices and uploaded the images to the files directory "img" of zigbee.admin.

Now - and that's the point of the issue - I would like to change the image in the view of the zigbee adapter.

As stated, I can change the image in the object adapter. This changes the image in the object-adapter view, but still not in the zigebee-adapter view.

So I would like to know how to change the icon/image in the zigbee-adapter view.

— Reply to this email directly, view it on GitHub (https://github.com/ioBroker/ioBroker.zigbee/issues/2232#issuecomment-2409994684), or unsubscribe (https://github.com/notifications/unsubscribe-auth/AK4NGX6BB7CQYRCBIZ5YA3DZ3NLF3AVCNFSM6AAAAABP2FZIXOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMBZHE4TINRYGQ). You are receiving this because you commented.Message ID: @.***>

averlon commented 4 days ago

That will not help since, as far as I have seen, most of the devices I use from different suppliers use the same image.

So I would like to change this issue to a Feature Request!

asgothian commented 4 days ago

That will not help since, as far as I have seen, most of the devices I use from different suppliers use the same image.

So I would like to change this issue to a Feature Request!

Are you certain they use the exact same image ? If so, they should be recognized by the adapter as the exact same device, making your feature request next to impossible to fill. The file name of the image is linked to the device ID reported by the device.

A.

Apollon77 commented 4 days ago

How did you added the file? Please DO NOT just copy it in on filesystem because then this file is unknown and ignored. User Adm -> Files to upload it

averlon commented 4 days ago

yes, I am sure:

This: grafik

is in Fact a Moes Switch: grafik

This: grafik

is in Fact an Aubess Switch: grafik

This: grafik

is a Girier-Switch. And this icon/image is used for the MOES and the GIRIER Switches. The Aubess-Switches have a different icon as you can see, although they have the same functionality. The only difference of these switches are a) dimensions, and b) 8A or 16A

averlon commented 4 days ago

How did you added the file? Please DO NOT just copy it in on filesystem because then this file is unknown and ignored. User Adm -> Files to upload it

Sure, I did it via the admin-files GUI, not on system level! The image is known, since I can change it in the object-view. The selected image is then shown in the object-view, but not in the zigbee-view.

asgothian commented 3 days ago

Please check the device info page for the affected devices. Most important info: Model ModelZigbee manufacturer

as reported by the device.

Please also follow the link behind the model and obtain the image file name of the image linked there.

A.

averlon commented 3 days ago

you mean, as an example? grafik

The link to follow: https://www.zigbee2mqtt.io/devices/WHD02.html

The filename of the image: https://www.zigbee2mqtt.io/images/devices/WHD02.png

asgothian commented 3 days ago

Yes, like that.

The above example will be automatically fixed when moving to the updated zigbee adapter, as the error was present in zigbee2mqtt.io.

What should be possible:

Alternatively, you can install the current test branch 1.10.10 from https://github.com/asgothian/ioBroker.zigbee/tarball/MapTest

Note that there are a few caveats:

This will fix the image in cases where the zigbee-herdsman-converters previously linked old images. It does NOT offer the option to manually replace the images.

A.

averlon commented 3 days ago

I will give it at try, but I doubt, the procedure will fix the issue! I will see.

Based on my experience, zigbee2mqtt has for several manufacturers the same image. I searched arround a bit in the products they support.

So overwriting the WHD02.png with a new file will change all images of products which use this filename. As stated, if I am not wrong, several switches of different manufacturers use this image!

WHD02 was only an example I used. Most Swtiches have the model "TS0001_switch_module". But since they all use the same model, they have the same image. But they look in fact different!

But I will try!

asgothian commented 3 days ago

You are most likely correct, but updating on the zigbee2mqtt.io side is the only sensible way of doing this. Adding our own means of adding device images generates additional work which we do not see feasible to handle as we cannot test this properly - most of the developers do not have the devices.

So if there is a set of devices where zigbee2mqtt.io is using a wrong image, the correct way to fix this is to request the image to be changed there. This change will then trickle down to the iobroker.zigbee Adapter as well.

A. Note: With TuYa - it even gets worse. Some devices report as the same device, have the same functionality, but live in different hardware, and as such would require different images for something which cannot be identified from the zigbee network data.

averlon commented 3 days ago

...most of the developers do not have the devices.

What devices do you have? Such switches are widely used!

grafik

The 1Channes device looks in reality much the same as the Wall switch model!

But I see your point!

asgothian commented 3 days ago

I have next to no TuYa compatible devices. Nor do I use any of these wall switch devices, as there is not enough room behind the switches to include them, and I simply do not trust these small devices. During testing, I had more than one blow up on me. I cannot speak for other developers. But keep in mind that as of writing this, zigbee2mqtt.io supports 3819 devices. With the test branch linked above, the zigbee Adapter supports all of those. It is a given that not all devices are present at the developers, given that the number of active developers on the zigbee Adapter is <10, and neither of us has the resources to just buy stuff to have hanging around.

As to the example pictures - if you have a TMZ02 module, you should be able to request an image change on that model, as it clearly uses the same image as the WHD02.

As with the TMZ02L - I cannot tell wether this one is correct or not. It seems to be wrong, but based on a hunch, the developers at zigbee2mqtt.io will not replace the image either.

A.

averlon commented 3 days ago

...as there is not enough room behind the switches to include them

Beside the issue: I had the same problem with space in the wallbox. A Friend has a 3d-printer and we designed some spacer to put between the wallbox and the Rocker.

untitled

We have created one with 6mm and one with 12mm. This normally works!

We think about to sell them since many houses may have the problem!