Difficulties developing a Zigbee implementation

I’m trying to develop an implementation for the Danfoss Zigbee module. The Zigbee module is plugged into a Danfoss Icon Master Controller. The Icon controller controls multiple thermostats. The goal is to read and set temperature settings for each thermostat. I’m currently focussing on only getting the temperature values. The module is connected with App ethernet port of the controller.

Pairing the module with Homey drives me nuts. 9 out of 10 pairing attempts fail. When I put the module in pairing mode Homey finds it really fast but shortly it shows a screen saying that pairing is taking longer than expected. I then get a screen that something went wrong and need to try it again.

So my first question, is there a log somewhere available where I can see the actual error that occurred when pairing? I couldn’t find any setting so far.

Also removed all devices near the module and the homey, reset the Zigbee network but the issues with pairing remains. While pairing I put the module right next to homey. It has no effect on pairing succession rate.

When it does pair I can view it in the developer portal. I can interview the device. Based on the output I was able to retrieve the productId(modelId) and manufacturerName. With that information and the rest of the output I created a basic application, which should log the temperature.

Despite having set the productId and the manufacturerName in driver.compose.json the module is not recognised on (rare) successful pairing attempts and adds it as a generic Zigbee device. The log on my laptop while running homey app run also shows no errors or anything.

The code of app can be viewed here. It also contains a dump of the interview data (interview.json).

I’m not sure what I’m doing wrong with pairing. Why does it fail all the time and only succeeds 1 in 10 times. Why does Homey not recognise the module when having the app in place? If anyone could take a look at the code, that would be much appreciated.

When it does add the device as a generic Zigbee device is there a way to add it as a device to my own app? That would also be really helpful but it seems that’s not possible.

Thanks! Nick

Also good to note. When the module is being added as a generic Zigbee device. The Product ID doesn’t match the top level modelId as show in interview.json. It shows the modelId within the endoints key of the json object: 0x0200:

Also tried updating the productId in my app with that id (0x0200) but that also results in the message that it seems there is no app installed for the device. Only option is to add it again as a generic Zigbee Device.

My current assumption is that the first modelId in interview.json corresponds with the Zigbee module. And the second modelId corresponds with the controller perhaps?

From what I understand (source #1, source #2), for each thermostat that is connected to the controller, one of the endpoints 1-15 is used, and its modelId property will reflect the thermostat’s internal product id.

In your case, it looks like there’s one thermostat connected (represented by endpoint 1), and in the extendedEndpointDescriptors property of your interview data you can see it has model id 0x8020 (which would make it an “RT24V Display” thermostat).

The second modelId (0x0200) is indeed the modelId of the module, as can be found in the extended endpoint data for endpoint 232 (which is the endpoint used for the module device itself).

I don’t know how Homey’s interviewing process picks the value for ids, but it might point to some sort of heuristic (“let’s find the first modelId in the endpoint data and use that”). Have you tried to use both id’s in the config?

"productId": ["0x8020", "0x0200"]

As for problems with pairing, I’m afraid that’s just Life With Homey. Zigbee for some people is very unstable, and for others it works fine :man_shrugging:t3:

FWIW, with this device you’re going to have to think about handling changes, because you basically have to re-pair the device in order to receive updated endpoint information (when a thermostat has been added or removed, for example).

Hi Robert,

That’s really helpful information. So far I didn’t have any luck repairing with those values. I keep getting “Something went wrong, please try again”. I’ll keep trying in the coming days and hope it will pair at some point. The weird thing is that I have about 20 Zigbee devices right now and non caused any uses while pairing or while in operation. Perhaps it’s just this Zigbee module that has a mind of its own.

That google drive doc is a great find. Lots of info in there that I will need for the implementation. Thanks!

What Homey model do you have?

Homey Pro, v10.0.8. Using app version 7.4.2.1338.

So a Homey Pro 2023 model. How far is the Danfoss Icon away from your Homey, and do you have many Zigbee router devices connected to Homey, or mostly end devices?

The danfoss controller and zigbee module is really close to the homey. So close that I can physically put the module on top of the homey.

To rule out the issue was caused by other zigbee devices I reset the zigbee network. So the danfoss zigbee module would be the only device connecting to honey. But the same behaviour of lots of unsuccessful pairing remains.

Then there’s a chance that the combination of Homey with the Danfoss device just isn’t a happy one :frowning:

If you can get it to work, i am very interested how i can install it. I have a homey pre 2023 (2019 i think).

Yeah I’m afraid so too. But the times it did pair the connection seemed stable, so I have hope that once I get it paired properly get it recognised by my app I can start developing the app properly. At least to my understanding I won’t have to re-pair every time I do an update on my code once it got paired properly before.

There is an alternative route I could take. Buy a Danfoss ally gateway (which is a bridge) and link the Zigbee module with that, I imagine pairing would go smoother between those devices. I could then use the Danfoss cloud api to create a Homey app. But the downside is that such a gateway is €200 I believe and I’ll be dependant on the Danfoss cloud. Not ideal at all.

Will let you know :slight_smile:

After ±20 re-pair attempts I still had no success with pairing. This was a clue as I had a significant higher success rate before (although the module was added as a generic Zigbee device). My assumption was it was connecting but getting stuck on something. So I ended up clearing my endpoints key in driver.compose.js. Re-paired and it got paired on the first attempt! So the content of my endpoints key was invalid all the time.

Based on this thread Zigbee Thermostat cluster undefined I was able to log the current temperature. Progress! Now I can finally start developing the app. Thanks again @robertklep !

1 Like

Hey @Mark_Steneker I made some progress on the app. Made a new topic to share the progress: [APP][PRO] Danfoss Icon