Zigbee2MQTT doesnt recognize good device

Hi all,
For some reason my new HEIMAN HS2IRC is not supported, but the Zigbee2mqtt website said it is.
see:

the information in Zigbee2MQTT:
Device type
Router
Zigbee Model
IRControl2-EF-3.0
Zigbee Manufacturer
HEIMAN
Support status
Not supported [(how_to_add_support)]

anyone knows how to fix this?

EDIT:
Zigbee version 2.1.1

What version of Zigbee2MQTT are you using ?

Zigbee2MQTT version 2.1.1.
also tried making a .js in /homeassistant/zigbee2mqtt/external_converters.
then restarting, but still not supported.

It’s saying unsupported because the model isn’t an exact match.

Yours seems to be a v2 model (IRControl2-EF-3.0), but the closest match in the zigbee herdsman converters github is IRControl-EM

Start with something like this as your external converter (make sure you change the model & modelID), then create a PR to add support:

    {
        fingerprint: [{modelID: "IRControl-EM", manufacturerName: "HEIMAN"}],
        model: "HS2IRC",
        vendor: "HEIMAN",
        description: "Smart IR Control",
        fromZigbee: [fz.battery, fz.heiman_ir_remote],
        toZigbee: [tz.heiman_ir_remote],
        exposes: [e.battery()],
        configure: async (device, coordinatorEndpoint) => {
            const endpoint = device.getEndpoint(1);
            await reporting.bind(endpoint, coordinatorEndpoint, ["genPowerCfg", "heimanSpecificInfraRedRemote"]);
            await reporting.batteryPercentageRemaining(endpoint);
        },
    }


I was trying some external convertions, now it is stuck at Battery and action.
i deleted the old JS files and restarted, it seems stuck at this…

Battery will take a little while to populate - don’t worry about it.

Action was deprecated in zigbee version 2.0.0, and you’re running 2.1.1. You will need to read the breaking changes to find alternatives or to fix it*

*Spoiler alert (but read the breaking changes anyway): You need to set the following to get it back:

homeassistant:
  legacy_action_sensor: true

Hi thanks for the reply.
the link takes me to Workday, is this right?
anyways, i tried the legacy, restarted, but still it its on battery and action instead of “learning IRcode” and “IR code to send”.
Also there is no battery or action with this device, thats why its weird.

Sorry, can’t even copy & paste. This is the correct link Zigbee2MQTT 2.0.0 breaking changes · Koenkk/zigbee2mqtt · Discussion #24198 · GitHub

Okey, i tried both legacy and the other : advanced:
homeassistant_legacy_entity_attributes: false
homeassistant_legacy_triggers: false
legacy_api: false
legacy_availability_payload: false
device_options:
legacy: false

Now the device is back to unsupported.
for some reason it wil not pick up the .JS file…
i tested it by editing the description, but the description remains empty…
any idea why it is not picking up my .js file?
here is one i tested:

const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const e = exposes.presets;

const definition = {
    zigbeeModel: ['IRControl2-EF-3.0'],
    model: 'IRControl2-EF-3.0',
    vendor: 'HEIMAN',
    description: 'testing',
    fromZigbee: [fz.command_recall],
    toZigbee: [],
    exposes: [e.learn_ir_code(),       // Switch to initiate learning mode
        e.learned_ir_code(),     // Text attribute to display the learned IR code
        e.ir_code_to_send(),     // Text attribute to send an IR code
        ],
};

module.exports = definition;

You stopped reading the breaking changes and applied code which is now the default setting already.

Keep reading for the part which I posted. Remove your previous changes and apply that part only

Thanks for all the help!
Yes already done that: nly breaking when legacy is enabled :

  • All click sensors have been removed (homeassistant.legacy_triggers setting). This means all sensor.*_click entities are removed. Use the MQTT device trigger instead.
  • All action sensors are now disabled by default (sensor.*_action entities). It’s recommended to use the MQTT device trigger instead. In case you really need the action sensors, add the following to your configuration.yaml.

homeassistant: legacy_action_sensor: true

But it doesnt change anything.

The only .js code that seems to work is:



const definition = {
    zigbeeModel: ['IRControl2-EF-3.0'],
    model: 'IRControl2-EF-3.0',
    vendor: 'HEIMAN',
    description: '2',
    extend: [],
    meta: {},
};

module.exports = definition;

i can edit the description, this will update on the “about” in zigbee2mqtt.

i made a new .js file with some new testing codes.
code seems to work (i see “learn” and “Send” buttons, but when i touch them i get:

z2m: Publish 'set' 'action' to '************** failed: 'Error: Cluster 'heimanSpecificInfraRedRemote' has no command 'IRControl''
const fz = require('zigbee-herdsman-converters/converters/fromZigbee');
const tz = require('zigbee-herdsman-converters/converters/toZigbee');
const exposes = require('zigbee-herdsman-converters/lib/exposes');
const reporting = require('zigbee-herdsman-converters/lib/reporting');
const e = exposes.presets;
const ea = exposes.access;

const tzLocal = {
    heiman_ir_action: {
        key: ['action'],
        convertSet: async (entity, key, value, meta) => {
            const lookup = {
                learn: 0x00,  // IR-leer modus starten
                send: 0x01    // IR-commando verzenden
            };
            if (lookup.hasOwnProperty(value)) {
                await entity.command('heimanSpecificInfraRedRemote', 'IRControl', { value: lookup[value] }, {});
            } else {
                throw new Error(`Unsupported action: ${value}`);
            }
        },
    },
};

const definition = {
    fingerprint: [{ modelID: "IRControl2-EF-3.0", manufacturerName: "HEIMAN" }],
    model: "IRControl2-EF-3.0",
    vendor: "HEIMAN",
    description: "HEIMAN Zigbee IR Blaster",
    fromZigbee: [fz.battery],
    toZigbee: [tzLocal.heiman_ir_action],
    exposes: [
        e.battery(),
        exposes.enum('action', ea.SET, ['learn', 'send'])
            .withDescription('Use "learn" to capture an IR command, or "send" to transmit a stored IR command'),
        exposes.text('command', ea.SET)
            .withDescription('Send an IR command in raw format'),
    ],
    configure: async (device, coordinatorEndpoint, logger) => {
        try {
            const endpoint = device.getEndpoint(1);
            logger.info(`Configuring ${device.ieeeAddr}...`);
            await reporting.bind(endpoint, coordinatorEndpoint, ["genPowerCfg", "heimanSpecificInfraRedRemote"]);
            await reporting.batteryPercentageRemaining(endpoint);
            logger.info(`Configuration of ${device.ieeeAddr} completed.`);
        } catch (error) {
            logger.error(`Configuration failed: ${error}`);
        }
    },
};

module.exports = definition;

Where did you get the code for this from? Was this provided by ChatGPT by any chance?

I’m searching through the zigbee herdsman converters github and don’t see anything which matches your local code.

Again, you really should be copying the setup for the HS2IRC like I explained yesterday. It has different Tz & Fz than what you have which you should be recreating locally:

 fromZigbee: [fz.battery, fz.heiman_ir_remote],
 toZigbee: [tz.heiman_ir_remote]

yes tried about 4 hours to find on internet and GPT.
the code you send on it self doesnt work (just no change to the device) (sorry, kinda new to this).

so i tried to combine it like this, it does work (its updateing the device) but the function doesnt work.
i guess i need to expose the right thing?
also looked at the log when i aim a remote to it an push some buttons, no respone however.

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

const definition = {
    fingerprint: [{modelID: "IRControl-EM", manufacturerName: "HEIMAN"}],
    zigbeeModel: ['IRControl2-EF-3.0', 'HS2IRC'], 
    model: 'IRControl2-EF-3.0',
    vendor: 'HEIMAN',
    description: 'Smart IR Control213',
    
    fromZigbee: [fz.battery, fz.heiman_ir_remote],
    toZigbee: [tz.heiman_ir_remote], 
    exposes: [e.battery()], 
    
    configure: async (device, coordinatorEndpoint) => {
        const endpoint = device.getEndpoint(1);
        await reporting.bind(endpoint, coordinatorEndpoint, ["genPowerCfg", "heimanSpecificInfraRedRemote"]);
        await reporting.batteryPercentageRemaining(endpoint);
    },

    extend: [],
    meta: {},
};

module.exports = definition;

Have you tried creating local copies of fz.heiman_ir_remote and tz.heiman_ir_remote and changing them to fzLocal.heiman_ir_remote and tzLocal.heiman_ir_remote?

It should be pretty much what you did with tzLocal.heiman_ir_action (including creating local copies within the same file like you did here), only this time you’ll be using the actual code instead of something that ChatGPT hallucinated.

You can find the relevant part of the code by searching for heiman_ir_remote here for FZ and here for TZ.

If that still doesn’t work, I recommend you raise a device support request over on the Z2M github.