ControllerX deCONZ unique ID

Hi,
first of all, thanks @xaviml for your great work on ControllerX. It works wonderfully with ConBee2, deCONZ and my Symfonisk remote. However, now I am struggling with including two Tradfri remotes (E1810). It works as intended with the following app code:

some_light_control:
  module: controllerx
  class: E1810Controller
  controller: tradfri_remote_control
  integration: deconz
  light: light.some_light

The problem is that deCONZ seems to give the same ID to two identical controllers (in this case ‘tradfri_remote_control’). When I listen to the event log (as to https://xaviml.github.io/controllerx/others/extract-controller-id) I can see another ‘unique_id’ which appears to be the MAC address. However, if I enter this unique_ID into the ‘controller’ field, it doesn’t work.
This must be a common problem, right? Sorry if I couldn’t find a thread where this has been discussed.

Thanks
_ses

Hi @_ses,

This must be a common problem, right? Sorry if I couldn’t find a thread where this has been discussed.

No worries, this has not been discussed as far as I know. In fact, I didn’t know that deconz allowed 2 devices to have the same id. ControllerX only reads from the “id” attribute from the event data, so pasting the “unique_id” will not work.

From the Phoscon app, you should be able to change the id of your device. A device id is assigned to you, but you can change it.

If you click in the pencil, you can edit that ID name.

I hope this helps :slight_smile:

Regards,
Xavi M.

1 Like

Thanks Xavi,
I was about to answer that in my case the name in Phoscon doesn’t have an effect on the ID. However I thought again and found out that this might have been due to the spaces (or the Å in TRÅDFRI) in the names I chose. Choosing names without spaces and strange letters now did the trick. Hope, this will help someone in the future. :slight_smile:
Thanks again!

2 Likes

Hey @xaviml , I ran into this issue too. Not every device is listet in the Phoscon UI to change the ID. I have just connected 2 Tradfri Shortcut Buttons with Deconz and ControllerX is not usable right now. The both have the ID "id": "tradfri_shortcut_button" and it is not possible to seperate them from each other.

Would it be possible to provide further filtering method e.g. Unique Device ID in ControllerX? Here is the full Event Data when pressing the Tradfri Shortcut Button:

{
    "event_type": "deconz_event",
    "data": {
        "id": "tradfri_shortcut_button",
        "unique_id": "58:8e:81:ff:fe:3e:cc:43",
        "event": 1003,
        "device_id": "4d1fc4333ef18671758127cf910f854b"
    },
    "origin": "LOCAL",
    "time_fired": "2021-07-04T20:14:08.905632+00:00",
    "context": {
        "id": "6dc39bb2da9637b90086271dc0d777f2",
        "parent_id": null,
        "user_id": null
    }
}

Hi @jones,

As of now, ControllerX only reads from the id attribute. My recommendation has always been what I already suggested in the solution for this post, which is to change the id of one of your controller, but I was not aware of not being able to change the ID at times.

I will add a new option within the integration attribute to select which attribut to listen from. I created the following ticket in GitHub: Add option to read from unique ID for deCONZ integration ¡ Issue #333 ¡ xaviml/controllerx ¡ GitHub

I will keep you updated.

Regards,
Xavi M.

1 Like

Hi @jones,

I have released a beta version with the solution you need. I tested it out myself with my deconz network, but you are more than welcome to try it out.

Your configuration should be something like this:

example_app:
  module: controllerx
  class: YourControllerClass
  integration:
    name: deconz
    listen_to: unique_id
  controller: "xx:xx:xx:xx:xx:xx:xx"
  light: light.your_light

The only part that changes and that matter for this issue is the integration. It defaults to id, so no breaking changes are added.

You can install the beta version from HACS by activating the “Show beta versions” when clicking in “Reinstall” in the ControllerX card. Then, you should be able to install v4.14.0b1.

Regards,
Xavi M.

That was fast! I’ll try it asap and get back to you.

1 Like

Hey @xaviml, it works! Absolute brilliant work. Thank you very much. Happy to see this feature in the next stable release.

Hi @jones,

Thank you for confirming :slight_smile: The stable version is now ready - v4.14.0.

Regards,
Xavi M.