Zigbee2mqtt duplicate devices

Xiaomi, Ikea TRÅDFRI, Philips Hue and more.

Moderator: leecollings

Post Reply
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Zigbee2mqtt duplicate devices

Post by peteralm »

I have managed to get 66 devices created for my Sonoff Motion Detector on domoticz :oops: . I am running zigbee2mqtt, latest domoticz beta on a raspberrypi.

This probably happened during pairing and what I thought was a hang, but whatever I do these devices come back and are added to by another 6!

I have tried a remove and ticked the delete associated devices - but this did not work
I have tried force remove the device and a cleanup of devices (probably the wrong thing to do)

I am just stumped! Does anyone have ant suggestions for getting domoticz and zigbee2mqtt to forget this device and all sub devices?

P
User avatar
Xenomes
Posts: 416
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Zigbee2mqtt duplicate devices

Post by Xenomes »

I had the same problem, just delete the duplicate devices. Also clean the 'Plugin Configuration' for the duplicate devices and disabled detecting new hardware.

Domoticz Version: 2021.1 (build 13499)
Zigbee2MQTT Version 1.21.1 commit: 4a51e0c0
Zigbee2MQTT Plugin (v. 3.1.0-beta)
HP T630 (256GB SSD/8GB Mem) - Ubuntu 24.04.2 LTS (64Bit) - Domoticz 2025.1 (Docker) Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Zigbee2mqtt duplicate devices

Post by peteralm »

Phew!

Deleting devices is no problem I can do this from the domoticz devices - last time I did this they all came back - I now have over 100+
Where should I look to clean the plugin configuration?

Still :oops:

P.
User avatar
Xenomes
Posts: 416
Joined: Tuesday 27 November 2018 19:05
Target OS: Linux
Domoticz version: 2025.1
Location: Netherlands
Contact:

Re: Zigbee2mqtt duplicate devices

Post by Xenomes »

The 'Plugin Configuration' is in the Custom => Zigbee2mqtt => plugin configuration
Just saw in the log:
2021-09-19 22:02:52.675 Error: MQTT Zigbee: (MQTT Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
HP T630 (256GB SSD/8GB Mem) - Ubuntu 24.04.2 LTS (64Bit) - Domoticz 2025.1 (Docker) Machinon theme - RFLink - KaKu - Sonoff - Tasmota - Shelly - MQTT2Zigbee - OpenTherm Gateway - Tinytuya - IR Blaster - P1 Smart Meter - NPN Watermeter - Google Assistant
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Zigbee2mqtt duplicate devices

Post by peteralm »

Thanks - I had forgotten (or not seen the new tab)

So I have cleaned the plugin configuration and saved it. Deleted all the devices and also disabled the new devices in the settings... However...

However the plugin configuration is now adding them all back almost faster than I can remove them.

Code: Select all

2021-09-19 21:43:44.488 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:44.541 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:44.594 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:44.647 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:44.701 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:52.495 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:52.497 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/6
2021-09-19 21:43:52.562 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:52.563 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/7
2021-09-19 21:43:52.624 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:52.625 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/8
2021-09-19 21:43:52.683 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:43:52.685 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/9
2021-09-19 21:44:00.241 Status: EventSystem: Opening a URL after 0.2 seconds...
2021-09-19 21:44:16.382 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:44:16.383 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/11
2021-09-19 21:44:16.432 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:44:16.433 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/12
2021-09-19 21:44:16.483 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:44:16.484 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/13
2021-09-19 21:44:16.534 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:44:16.535 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/14
2021-09-19 21:44:16.587 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:44:16.588 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/15
2021-09-19 21:45:00.249 Status: EventSystem: Opening a URL after 0.2 seconds...
2021-09-19 21:45:54.756 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:45:54.758 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/16
2021-09-19 21:45:54.827 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:45:54.828 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/17
2021-09-19 21:45:54.887 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:45:54.888 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/18
2021-09-19 21:45:55.237 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:45:55.238 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/19
2021-09-19 21:45:55.301 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:45:55.302 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/20
2021-09-19 21:46:00.264 Status: EventSystem: Opening a URL after 0.2 seconds...
2021-09-19 21:46:10.941 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:46:10.943 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/21
2021-09-19 21:46:11.012 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:46:11.014 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/22
2021-09-19 21:46:11.082 Error: Zigbee: (Zigbee) Unit creation failed, Domoticz settings prevent accepting new devices.
2021-09-19 21:46:11.083 Error: Zigbee: Update to 'UnitEx' failed to update any DeviceStatus records for key 24/0x00124b0023b85c06/23
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Zigbee2mqtt duplicate devices

Post by EddyG »

Plugin configuration is under Setup -> Hardware -> zigbee2mqtt plugin.
@peteralm did you update your plugin to version 3.1.0?
Accepting new hardware is not an option. Accepting new devices is and is found Setup -> Settings -> Accept new Hardware Devices
I you disable that it prevents new devices to be created, but probably the new devices will come if you enable it again.
@peteralm is there a logic in ID and unit in the devices that get created?
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Zigbee2mqtt duplicate devices

Post by EddyG »

I see you have the latest (new) version of the plugin, seen by UnitEx
Could you go back to version 3.0.1 of the plugin?
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Zigbee2mqtt duplicate devices

Post by peteralm »

OK, @EddyG thanks - I think we are talking about the same things, I will be a bit more careful in describing them so avoid confusion.

I have disabled new devices in the domoticz settings.
I have deleted all the devices associated with the zigbee unit.
I have gone into the custom screen for zigbee2mqtt and used the plugin configuration tab to delete the device aliases sections that mention my zigbee unit.
I think there is probably an order here that I need to be careful with as after I have enabled the debugging on the zigbee2mqtt plugin this is now coming up and it gives a clue...

Code: Select all

2021-09-19 21:50:56.267 Zigbee: (Zigbee) Trying to get legacy device 0x00124b0023b85c06(motion)
2021-09-19 21:50:56.267 Zigbee: (Zigbee) No such device found
2021-09-19 21:50:56.267 Zigbee: (Zigbee) Creating domoticz device to handle "occupancy" key for device with ieeeAddr 0x00124b0023b85c06
2021-09-19 21:50:56.323 Zigbee: (Zigbee) Trying to get legacy device 0x00124b0023b85c06(lowbtr)
2021-09-19 21:50:56.323 Zigbee: (Zigbee) No such device found
2021-09-19 21:50:56.324 Zigbee: (Zigbee) Creating domoticz device to handle "battery_low" key for device with ieeeAddr 0x00124b0023b85c06
2021-09-19 21:50:56.664 Zigbee: (Zigbee) Trying to get legacy device 0x00124b0023b85c06(tamper)
2021-09-19 21:50:56.664 Zigbee: (Zigbee) No such device found
2021-09-19 21:50:56.664 Zigbee: (Zigbee) Creating domoticz device to handle "tamper" key for device with ieeeAddr 0x00124b0023b85c06
2021-09-19 21:50:56.721 Zigbee: (Zigbee) Trying to get legacy device 0x00124b0023b85c06(btperc)
2021-09-19 21:50:56.722 Zigbee: (Zigbee) No such device found
2021-09-19 21:50:56.722 Zigbee: (Zigbee) Creating domoticz device to handle "battery" key for device with ieeeAddr 0x00124b0023b85c06
2021-09-19 21:50:56.778 Zigbee: (Zigbee) Trying to get legacy device 0x00124b0023b85c06(signal)
What I think is happening is that the plugin can't see the devices that it wants to is creating them in the plugin configuration, this has become itterative and is getting out of control.
I think I need to find a way of stopping the plugin from running a cycle, in order that I can remove the sections from the plugin configuration and then, perhaps let it create the devices it wants so that it can match them next time round...

I think if I leave it overnight it will create another 21k lines in the configuration!

I really appreciate the support on this one!

P.
EddyG
Posts: 1042
Joined: Monday 02 November 2015 5:54
Target OS: -
Domoticz version:

Re: Zigbee2mqtt duplicate devices

Post by EddyG »

Go back to a previous version is currently your only way out I guess.
You can checkout the commit of 30 july 2021 ( 78c090a8a695002d3fbf4227a0624259e174d7dd )
I know for sure that that is the previous version.
peteralm
Posts: 31
Joined: Saturday 08 August 2015 0:12
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Oxfordshire, UK
Contact:

Re: Zigbee2mqtt duplicate devices

Post by peteralm »

:D I really appreciate the support here and I have an update...

The tip to edit the configuration in the custom screen was a good one.

I have removed all the ever increasing aliases from the list (I had 100+ created...)
I have removed the domoticz devices associated with the zigbee unit
I have re-enabled domoticz setting to add new devices

Now it has run a cycle and created the new devices in the plugin, and in domoticz and it seems to be happy it is finding these and updating them as it should now.
I guess to sum up this evening for me is that there exists a possibility to create duplicate devices during the pairing process / failed pairing process and that this can lead to a runaway domoticz device creation and a lost evening of worry!
If there are multiple devices it seems not to know which one to update and creates another...
It is nice to have these wobbles with someone else around on the forum to help and give good tips - and to leave this here so that someone else can get themselves out of the hole I fell in!

Thanks all. :D

P.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest