zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Ubisys C4 does not report all commmand to coordinator

Open chris-1243 opened this issue 1 year ago • 2 comments

What happened?

Commands brightness_move_down and brightness_stop are not reported to the coordinator. If the device is bound to a light, all commands are sent correctly and the dimming works as expected.

I do use dimmer_single as configuration for the two first inputs.

My S2 are working fine and do report all commands.

What did you expect to happen?

No response

How to reproduce it (minimal and precise)

No response

Zigbee2MQTT version

1.37.1

Adapter firmware version

20240315

Adapter

Sonoff Dongle-P

Setup

Docker container

Debug log

herdsmann-debug.txt log.txt

chris-1243 avatar May 24 '24 14:05 chris-1243

What do your bindings look like ?

Old fw revisions came pre-bound to the coordinator and we just fill in the info. I wonder if newer device do not do this and we need to actually bind them. (That used to fail)

image

Have them bound to the group (or device) and the coordinator seems to work fine on newer firmwares too, this way both the group and coordinator get all the commands.

sjorge avatar May 24 '24 20:05 sjorge

My bindings look like yours. All the endpoints are bound to the coordinator

image

(Sorry for the quality, cell phone screenshot)

What strange, I receive via mqtt brightness_move_up but not the down or stop... As I have a spare one, I had a try with a Domgle-E and ember driver. Same result.

chris-1243 avatar May 24 '24 22:05 chris-1243

@sjorge I just checked Ubisys converters and compared the fromZigbee definition and I'm wondering if the legacy.fz.ubisys_c4_level could have an impact.

The S2 uses fz.command_move and fz.command_stop

chris-1243 avatar Jun 12 '24 20:06 chris-1243

I made an external converter for some test

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 extend = require('zigbee-herdsman-converters/lib/extend');
const e = exposes.presets;
const ea = exposes.access;

const definition = {
    zigbeeModel: ['C4 (5504)'],
    model: 'C4',
    vendor: 'Ubisys',
    description: 'Control unit C4',
    fromZigbee: [fz.on_off, fz.metering, fz.command_toggle, fz.command_on, fz.command_off, fz.command_recall, fz.command_move,
        fz.command_stop],
//    fromZigbee: [legacy.fz.ubisys_c4_scenes, legacy.fz.ubisys_c4_onoff, legacy.fz.ubisys_c4_level, legacy.fz.ubisys_c4_cover,
//        ubisys.fz.configure_device_setup],
    toZigbee: [tz.on_off],
    exposes: [
        e.action([
            'toggle_s1', 'toggle_s2', 'toggle_s3', 'toggle_s4', 'on_s1', 'on_s2', 'on_s3', 'on_s4',
            'off_s1', 'off_s2', 'off_s3', 'off_s4', 'recall_*_s1', 'recal_*_s2', 'recall_*_s3', 'recal_*_s4',
            'brightness_move_up_s1', 'brightness_move_up_s2', 'brightness_move_up_s3', 'brightness_move_up_s4',
            'brightness_move_down_s1', 'brightness_move_down_s2', 'brightness_move_down_s3', 'brightness_move_down_s4',
            'brightness_stop_s1', 'brightness_stop_s2', 'brightness_stop_s3', 'brightness_stop_s4',
            'cover_open_s5', 'cover_close_s5', 'cover_stop_s5',
            'cover_open_s6', 'cover_close_s6', 'cover_stop_s6',
        ]),
    ],
//    extend: [
//        ubisysModernExtend.addCustomClusterManuSpecificUbisysDeviceSetup(),
//    ],
    configure: async (device, coordinatorEndpoint) => {
        for (const ep of [1, 2, 3, 4]) {
            await reporting.bind(device.getEndpoint(ep), coordinatorEndpoint, ['genScenes', 'genOnOff', 'genLevelCtrl']);
        }
        for (const ep of [5, 6]) {
            await reporting.bind(device.getEndpoint(ep), coordinatorEndpoint, ['genScenes', 'closuresWindowCovering']);
        }
    },
    meta: {multiEndpoint: true},
    endpoint: (device) => {
        return {'s1': 1, 's2': 2, 's3': 3, 's4': 4, 's5': 5, 's6': 6};
    },
//    ota: ota.ubisys,
};

module.exports = definition;

My guess seems to be right. The fromZigbee: [legacy.fz.ubisys_c4_scenes, legacy.fz.ubisys_c4_onoff, legacy.fz.ubisys_c4_level, legacy.fz.ubisys_c4_cover, ubisys.fz.configure_device_setup], seems to be the problem. My external converter works (partially..). At least the commands are correctly sent. Any help then would be much appreciated

chris-1243 avatar Jun 12 '24 22:06 chris-1243