I have a few Aqara T1s that I want to respond to a rebound switch. I know if I add it to an Aqara hub, I can adjust some settings in the Aqara hub - but is there any way of doing it without having a hub?
1 Like
Did you ever found the answer? I’m also want to control the T1 switch with a push button.
Found this the other day, but haven’t gotten around to try it. Under switch type
https://www.zigbee2mqtt.io/devices/DLKZMK11LM.html
Thanks, the Switch_type (enum) is probably the anwser to the question. I’m not using the mqtt bridge as I use the direct integration with HA. I’ll need to check if I need to install the bridge or that I can call this service somehowe from HA directly. If somebody knows how, please enlighen us.
Are you using zigbee2mqtt?
If so, I think if you head to ypur mqtt in home assistant, and then configurate, you can send those packages there maybe?
No I’m using ZHA. In ZHA you can configure the Cluster attributes of the device wich is a lower level than the Switch_Type in MQTT. Actually this is the code that implements the mqtt switch_type command:
xiaomi_switch_type: {
key: [‘switch_type’],
convertSet: async (entity, key, value, meta) => {
const lookup = {‘toggle’: 1, ‘momentary’: 2};
value = value.toLowerCase();
utils.validateValue(value, Object.keys(lookup));
await entity.write(‘aqaraOpple’, {0x000A: {value: lookup[value], type: 0x20}}, manufacturerOptions.xiaomi);
return {state: {switch_type: value}};
},
convertGet: async (entity, key, meta) => {
await entity.read(‘aqaraOpple’, [0x000A], manufacturerOptions.xiaomi);
},
},
I would like to reverse engineer what the values are for the set cluster attribute request in ZHA?
For example:
service: zha.set_zigbee_cluster_attribute
service data:
ieee: ‘84:2e:14:aa:bb:cc:eb:c0’
endpoint_id: 1
cluster_id: 513
attribute: 16387
cluster_type: out
value: 1
manufacturer: ‘4678’
The “ieee” i can figure out. But what are the other values for the switch_type equivalent in mqtt? I’m not able to figure out what the attribute identifier would be. I tried 0x000A but what is the cluster_id and endpoint?
moelito
(Fredric Moestedt)
February 10, 2022, 11:56am
7
Hi,
I assume this is not at all possible if using the deConz integration, right?
GrzesiuS
(Grzesiek)
April 24, 2022, 6:34am
8
Any updates?
I would like to change fibaro switches to those Aqara T1s but this blocks me
Hedda
(Hedda)
April 28, 2022, 12:16pm
9
Tom_Lambrechts:
Thanks, the Switch_type (enum) is probably the anwser to the question. I’m not using the mqtt bridge as I use the direct integration with HA. I’ll need to check if I need to install the bridge or that I can call this service somehowe from HA directly. If somebody knows how, please enlighen us.
[/quote][quote=“Tom_Lambrechts, post:6, topic:345580”]
I’m using ZHA. In ZHA you can configure the Cluster attributes of the device
Does the ZHA integration not expose all of the configuration attributes that Zigbee2MQTT does for it?
https://www.zigbee2mqtt.io/devices/DLKZMK11LM.html
Exposes: switch (state), power, energy, temperature, voltage, power_outage_memory, led_disabled_night, switch_type, linkquality
If not then suggest mention it to ZHA devs here → https://github.com/zigpy/zigpy/discussions/934
No, in the zigbee cluster the switch type is not present
Hedda
(Hedda)
May 10, 2022, 10:14am
11
Recommend also submit a new device support request mentioning this if this is not the same device:
opened 07:19PM - 26 Dec 21 UTC
**Is your feature request related to a problem? Please describe.**
By default t… he Aqara's T1 with neutral (lumi.switch.n0agl1) `switch_type` is set to a rocker switch by default and cannot be changed via ZHA. This makes it impossible to use the switch with a momentary (push) button.
**Describe the solution you'd like**
Making it possible to change the `switch_type` attribute via ZHA.
**Device signature - this can be acquired by removing the device from ZHA and pairing it again from the add devices screen. Be sure to add the entire content of the log panel after pairing the device to a code block below this line.**
```{
"node_descriptor": "NodeDescriptor(logical_type=<LogicalType.Router: 1>, complex_descriptor_available=0, user_descriptor_available=0, reserved=0, aps_flags=0, frequency_band=<FrequencyBand.Freq2400MHz: 8>, mac_capability_flags=<MACCapabilityFlags.AllocateAddress|RxOnWhenIdle|MainsPowered|FullFunctionDevice: 142>, manufacturer_code=4447, maximum_buffer_size=82, maximum_incoming_transfer_size=82, server_mask=11264, maximum_outgoing_transfer_size=82, descriptor_capability_field=<DescriptorCapability.NONE: 0>, *allocate_address=True, *is_alternate_pan_coordinator=False, *is_coordinator=False, *is_end_device=False, *is_full_function_device=True, *is_mains_powered=True, *is_receiver_on_when_idle=True, *is_router=True, *is_security_capable=False)",
"endpoints": {
"1": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0000",
"0x0002",
"0x0003",
"0x0004",
"0x0005",
"0x0006",
"0x0009",
"0x000a",
"0x0702",
"0x0b04",
"0xfcc0"
],
"out_clusters": [
"0x0019"
]
},
"21": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"31": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x000c"
],
"out_clusters": []
},
"41": {
"profile_id": 260,
"device_type": "0x0100",
"in_clusters": [
"0x0012"
],
"out_clusters": []
},
"242": {
"profile_id": 41440,
"device_type": "0x0061",
"in_clusters": [],
"out_clusters": [
"0x0021"
]
}
},
"manufacturer": "LUMI",
"model": "lumi.switch.n0agl1",
"class": "zigpy.device.Device"
}
```
**Additional context**
Zigbee2MQTT supports changing the switch_type - [link](https://www.zigbee2mqtt.io/devices/SSM-U01.html#switch-type-enum).
Probably a good idea there also mention this PR:
zigpy:dev
← dumpfheimer:dumpfheimer/xiaomi-d1-3button-wall-switch
opened 09:33PM - 22 Feb 22 UTC
Added quirk for Xiaomi H1 double rocker switche with neutral (n2aeu1)
Hedda
(Hedda)
May 11, 2022, 11:17am
12
FYI, again see more related info on “switch_type” development discussion for ZHA and zigpy here:
https://github.com/zigpy/zigpy/discussions/934
Summery is that ZHA developers are working on adding configuration to ZHA but you will probably still need a ZHA quirk in ZHA Device Handlers library/repository for the devices as well so submit request:
https://github.com/zigpy/zha-device-handlers/issues/1231
https://github.com/zigpy/zha-device-handlers/blob/b802c1fb2cf2682f9a4722bfb57a1958cad9dad7/README.md
https://www.home-assistant.io/integrations/zha#zha-exception-and-deviation-handling
This is also discussed here:
https://community.home-assistant.io/t/zha-aqara-switch-module-t1-mqtt-switch-type/379399/
Some of the switch modules have a setting to set the type of analogue wall switch you can use to trigger the switch module. The options are either toggle or momentary. In ZigbeetoMQTT it’s implemented by the “Switch_Type” command.
That looks like this in the Herdsman Adapter:
xiaomi_switch_type: {
key: [‘switch_type’],
convertSet: async (entity, key, value, meta) => {
const lookup = {‘toggle’: 1, ‘momentary’: 2};
value = value.toLowerCase();
utils.validateValue(value, Object.keys(lookup))…