Zigbee herman converter - Danfoss Icon Floor Heating

Hi All,

I hope I might find some help here.
I am trying to create an external converter for the Danfoss Icon Zigbee module. However it turned out to be a bit trickier.

The thermostats alone not Zigbee enabled, they are connected to the Danfoss Master Controller through RF and the Zigbee Module exposes them to Zigbee2Mqtt. The endpoint schematics looks as below.

- Zigbee Module

    - Endpoint --1--

      - Input_clusters
              - genBasic
              - genPowerCfg
              - genIdentify
              - hvacThermostat
              - msTemperatureMeasurement

    - Endpoint --2--

      - Input_clusters
              - genBasic
              - genPowerCfg
              - genIdentify
              - hvacThermostat
              - msTemperatureMeasurement

    - Endpoint --XX--

      - Input_clusters
              - genBasic
              - genPowerCfg
              - genIdentify
              - hvacThermostat
              - msTemperatureMeasurement

    - Endpoint --9--

      - Input_clusters
              - genBasic
              - genPowerCfg
              - genIdentify
              - hvacThermostat
              - msTemperatureMeasurement

    - Endpoint --232--

      - Output clusters
              - genTime
              - genOta
      - Input_clusters
              - genBasic
              - genIdentify
              - haDiagnostic

    - Endpoint --242--

      - Output clusters
            - greenPower

Right know i am playing with a simple external converter, but I cannot make to see all the endpoint values, only just the first one. I tried with looping through the endpoint, with no success. So if somebody have some suggestion I would appreciate it.

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const ota = require('zigbee-herdsman-converters/lib/ota');
const constants = require('zigbee-herdsman-converters/lib/constants');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;


const getKey = (object, value) => {
    for (const key in object) {
        if (object[key] == value) return key;
    }
};
const bind = async (endpoint, target, clusters) => {
    for (const cluster of clusters) {
        await endpoint.bind(cluster, target);
    }
};

const definition = {
    fingerprint: [{modelID: '0x8030', manufacturerName: 'Danfoss'}],
    model: 'Icon',
    vendor: 'Danfoss',
    description: 'Danfoss icon floor heating (Regulator, Zigbee module & Thermostats)',
    fromZigbee: [fz.battery, fz.thermostat,fz.hvac_user_interface],
    toZigbee: [tz.thermostat_local_temperature,tz.thermostat_occupied_heating_setpoint, tz.thermostat_unoccupied_heating_setpoint,
            tz.thermostat_keypad_lockout, tz.thermostat_system_mode],
    meta: {multiEndpoint: true},
    exposes: [].concat(((enpoinsCount) => {
        const features = [];
        for (let i = 0; i < enpoinsCount; i++) {
            const epName = `thermotat_${i+1}`;
            features.push(e.battery().withEndpoint(epName));
            }
        return features;
    })(9)),

    endpoint: (device) => {
        const all_endpoint = {};
        for (let i = 0; i < device._endpoints.length; i++) {
            if(device._endpoints.ID != 232 || device._endpoints.ID != 242){
                const ep = `thermotat_${i+1}`;
                all_endpoint[ep] = i+1
            }
        }
        return all_endpoint;
    },
    configure: async (device, coordinatorEndpoint, logger) => {

        device._endpoints.forEach(async (ep) => {
            if(device._endpoints.ID != 232 || device._endpoints.ID != 242){
                await reporting.bind(ep, coordinatorEndpoint, ['genPowerCfg']);
                // await reporting.batteryPercentageRemaining(ep, {min: constants.repInterval.HOUR, max: 43200, change: 1});
                }
        });       
    }
    
};

module.exports = definition;
5 Likes

Hi, very interesting topic!
Had any luck get it to work?

Yes, I made the support and since November is already in the master branch. I will add additional support for enabling thermostats with IR sensors

Great, how to integrate it? (:slight_smile:

add the z2m addon, put your zigbee module to pairing mode and it will be recognized

That sounds really cool. Maybe it is a stupid question, but I need to download the z2m from Github, right? and how to install then?

Hardware:
https://www.zigbee2mqtt.io/guide/adapters/
Software:
https://www.zigbee2mqtt.io/guide/installation/03_ha_addon.html
Danfoss Icon zigbee module:
https://store.danfoss.com/en/Climate-Solutions-for-heating/Hydronic-floor-heating/Room-Controls/Floor-Heating-Controls%2C-Danfoss-Icon%2C-Zigbee-module%2C-5-0-V%2C-Attachable/p/088U1130

3 Likes

Aha, Zigbee2mqtt :slight_smile: didn’t catch that z2m was that.

Already setup in my HA.

The question is now, is it only possible to have it connected to eather my HA or Danfoss app?

yes either this or that. since there is only one app rj45 socket. if you have an Danfoss Ally module, then there is some API connection that somebody made it

Okay, so not possible to integrate the Danfoss gateway itself, so it gets all devices connected to that?

Yes either this or that. if you have the Ally gateway then you should look into this:

1 Like

Pretty need, just what i seeked for. Thanks a lot - works like a charm.
Have a pleasant evening

Looks very good.

I have a Danfoss Icon system with RF Sensors and some with Infrared. I use the App module, but it is really Limited what you can do. My floor heating is in concrete so I do know that it is Limited what you should do when it comes to setting up schedules etc.

But integrating it directly with Home Assistant - what’s not to like!??!!

Do you have a few screenshots from your UI of how the controller or the Room controller card looks like?

Just to confirm once again, I need to buy the Danfoss ZigBee module and then remove the App Module. But I assume I can do the same based on rules from Home Assistant as if I used the App module.

I created the Zigbee converter in order to be completely off cloud solution, but you can use with the App module with the above mentioned repo(As I remember it relies on cloud polling). About the z2m integration:
There are some updates I am planning to do during the summer. Fixing the state not only showing heat but heat or off, and setting the allowed max temperature back to the factory values.
Here are some pics.:

2 Likes

But if I remove the App module and buy the Danfoss Zigbee Module - then I would be able to connect that with Zigbee2MQTT right and poll all the information from my Thermostats?

1 Like

Yes, it will. that is the point :slight_smile:

1 Like

Hi. Nice job.
I have any problems :slight_smile:
1. Some thermostats disconnect.
This takes about 20 seconds: Link
And this occurs every 18 hours and 10 seconds: Link
After disconnection setpoint_change_source_lx change from externally to manual. https://prnt.sc/vMxNNRyUGafG

2. Scheduler. Danfoss controller has algorithms (scenario) depending on the heating inertions (Slow, medium, fast)
To make them work properly, sheduller tasks must be transferred to the controller and setpoint_change_source_lx must have: "schedule".
3. I have error in log:
https://prnt.sc/Ya73z0UnXNFx
Could it be because connected only l1, l2, l3, l4 channels, and other is free?
4. Thermostat with IR ( 088U1082) works normally?
Maybe there are some ideas

Hi. Nice job.
I have any problems :slight_smile:
1. Some thermostats disconnect.
This takes about 20 seconds: Link
I don’t really know why those this happens, I have no issues with connectivity. Occasionally I have the issue that I am getting -273.3333 Celsius, but I received the latest OTA file from Danfoss, I will check if that will solves it.
And this occurs every 18 hours and 10 seconds: Link
After disconnection setpoint_change_source_lx change from externally to manual. https://prnt.sc/vMxNNRyUGafG
Same as above I have no idea. If you want to have an investigation, reach out to me on github.
2. Scheduler. Danfoss controller has algorithms (scenario) depending on the heating inertions (Slow, medium, fast)
To make them work properly, sheduller tasks must be transferred to the controller and setpoint_change_source_lx must have: "schedule".
I meant to do this, but it is hard to implement, due to the limitation on z2m. Again if you wanna help me, we can figure out together.
3. I have error in log:
https://prnt.sc/Ya73z0UnXNFx
Could it be because connected only l1, l2, l3, l4 channels, and other is free?
it would be wise to see what MQTT messages you get, so enable the debug logging on the Matt component
4. Thermostat with IR ( 088U1082) works normally?
I don’t have thermostat with IR, and some of the endpoint not implemented, regarding to that.
Maybe there are some ideas

1 Like

I have an easy dummy question: I want to upgrade my Danfoss Master Controller to the ICON model with a Zigbee module. I already have HA temperature sensors in all rooms. For cost-saving reasons, I would avoid buying Danfoss thermostats for each room. Can I use my existing HA sensors to pilot the Danfoss Control directly through Home Assistant automation ? Thanks for your answer.

Hi @SwissLB, I think it is not possible in a plug an play way. If you want to do this way, you need to customise the repo from Z2M and somehow parse your temp values into Z2M to fake some thermostat. So in a long run I think it is not feasible.

1 Like