Dev console in Z2M

Hi,
Can somebody help me out with a few steps in the Zigbee2Mqtt dev console?
I got some Aetoec Picco Shutter devices which I want to use on shutter blinds. Now the device itself is suppose to support this, but it seems like you have to change a value for this and this cannot be done via switch control or something like that. And now my problem begins:
I do not understand the Aeotec manual how exactly to do that. There is an entire section about cluster settings and I think it probably is an easy send command, but I have no idea how to exactly do that via the Z2M dev console.
Actually I just want to be able to change switch type from (apparently standard?) toggle to momentary, use a continues close/open with a momentary switch and want to be able to set/configure the shutter tilt level. I am a bit surprised that those functions seem to be only available through console functions though.

Somebody else on a German forum seems to be having the same issue. And the device manual can be find here.

@LotF I’m only just learning how to write an external converter myself but here is what I can suggest.

You need to add a ‘deviceAddCustomCluser’ section to the extend section and list the cluster and attributes for it to show in the exposes and dev console tabs. If you get that right you will be able to set and read values for those cluster attributes.

You also need to add a converter (enumLookup or binary or numeric etc) if you want those values to be read or sent as part of the mqtt messages.

I don’t have the device so I can’t test anything but here is a sample external converter that might get you part of the way. I’ve entered the values from that very helpful device manual.

This partial external converter has added custom clusters for both 0xfd00 and 0xfd03. All the attributes are listed for 0xfd00 but I’ve only listed the first attribute for 0xfd03. I’ve included one enum converter for switch type attribute. If that works it might be enough for you and you can add the others only if you need them.

Note: I’m hoping this external converter for the zga004 will take precedence over the default definition but I’m not sure how that all works. I’ve only ever played with external converters for devices that aren’t built-in to zigbee2mqtt.

const {
    commandsLevelCtrl,
    commandsOnOff,
    commandsWindowCovering,
    deviceEndpoints,
    deviceTemperature,
    electricityMeter,
    identify,
    onOff,
    windowCovering,
    deviceAddCustomCluster,
    binary,
    enumLookup,
    numeric,
} = require('zigbee-herdsman-converters/lib/modernExtend');

const definitions = [
    {
        zigbeeModel: ['ZGA004'],
        model: 'ZGA004',
        vendor: 'Aeotec',
        description: 'Pico shutter',
        extend: [
            deviceEndpoints({endpoints: {'1': 1, '2': 2, '3': 3, '4': 4, '5': 5}}),
            deviceTemperature(),
            identify(),
            windowCovering({controls: ['lift', 'tilt']}),
            commandsWindowCovering({legacyAction: false, endpointNames: ['3']}),
            commandsOnOff({endpointNames: ['4', '5']}),
            commandsLevelCtrl({endpointNames: ['4', '5']}),
            deviceAddCustomCluster('manuSpecificAeotecSwitchType', {
                ID: 0xfd00,
                manufacturerCode: 0x1310,
                attributes: {
                    switchType: {ID: 0x0000, type: 0x30}, // ENUM8
                    switchActions: {ID: 0x0010, type: 0x30}, // ENUM8
                    controls: {ID: 0x0011, type: 0x30}, // ENUM8
                    groupID: {ID: 0x0012, type: 0x21}, // UINT16
                },
                commands: {},
                commandsResponse: {},
            }),
            enumLookup({
                name: 'switch_type',
                lookup: {toggle: 0, momentary: 1, 'into_auto_recognise_mode': 4},
                cluster: 'manuSpecificAeotecSwitchType',
                attribute: 'switchType',
                description: 'Choose the switch type',
                zigbeeCommandOptions: {manufacturerCode: 0x1310},
                access: 'STATE_SET',
            }),
            deviceAddCustomCluster('manuSpecificAeotecWindowConfig', {
                ID: 0xfd03,
                manufacturerCode: 0x1310,
                attributes: {
                    operatingModes: {ID: 0x0001, type: 0x20}, // UINT8
                },
                commands: {},
                commandsResponse: {},
            }),
        ],
    },
];

module.exports = definitions;

oh! Thank you so much for your reply and all the effort! But unfortunately, I was not precise enough with my post:

I do not believe I need an external converter.

EDIT: Thinking about and looking at your ext. converter code: This “just” let’s me do all the desired configuration right in the device settings, right? That would be pretty nice indeed!

Everything is exposed in the dev console already. I just don’t understand how/what to pick from which drop down to “overwrite” the device with the correct values :confused:

At least I thought, I can just pick “Endpoint 1”, Cluser “Clousures” (not what it’s called in the manual, but this is the cluster after “alarms” in the dropdown), pick the attribute “covering mode” and then put in “1” and write, but that is not possible (read only error?) “covering type” is writeable, but reads “8” and I understood the shutter or roller setting is 0 or 1?

Thus I was not sure, if I have to use the dev console part beneath that, chose endpoint 1 and 2, type in “0x0102” for cluster, but what for command then? Or do I have to use “payload” somehow?

Had a look at the manual you linked, and momentary (0x01) IS the default:

There is also this, which switches between momentary and continuous movement modes by holding down both switch buttons for 5s. Not sure if this applies in your case though:

I was suggest you raise an issue or discussion in the Z2m github, but you seem to have done it already (unless this is a massive coincidence).

Thanks for your time and answer!
In the box with the device there is a small manual, which states “The default external witch setting utilizes a general double-pole toggle switch. To change the switch type follow the extended manual to configure Pico Shutter”. That is the reason I wrote “apparently standard?”. It’s not my biggest issue though, because I actually had a toggle and a momentary switch and both work. Just a continuous movement with the momentary switch would be nice. And there is the thing: At least in my country double blind/shutter switches - does not matter toggle/momentary - are designed that not both can be pressed at the same time (as far as I can remember because it could destroy the motor). Yes yes, I could unplug the motor, find another double light switch and do that. Okay. But since I am having another (main) issue as well, I was trying to solve this via cluster stuff.

So: The z2m integration provides a tilt setting, which does not work at all. I assumed I have to calibrate tilt first (and maybe through this activate the “shutter mode”), but the manual states to activate calibration with pressing 6x S2 and nothing happens. 6x S1 starts endpoint calibration just fine, so I don’t think I am doing something wrong here. It seems like there is no way to set the device in shutter mode via this active button on the back or some sort of S1/S2 combination, just leaving me with the cluster settings. Now, I thought I can just look for the attribute in the dev console drop down and change 0 to 1, then activate calibration of tilt (endpoint 2) via 6x S2 and basically be done (maybe do the same for continuous mode, see above), but I am just not able to accomplish that in the dev console. Maybe using the fields with “payload”? But I have no idea how to exactly do that.
I assume it could be all done with an external converter and changing the settings on the device page as well, but I do not necessarily need that if I could just push a command to the three devices I have.

And no, it is no coincidence. I started a topic on github as well, because I thought it’s more a z2m than Home assistant thing :slight_smile:

It is indeed. Hopefully someone there is more knowledgeable and will be able to help you.