Skip to content

Commit

Permalink
Add Aqara Relay T1 CN.
Browse files Browse the repository at this point in the history
  • Loading branch information
niceboy committed Jul 5, 2021
1 parent 7e4c741 commit 3731106
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 20 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,9 @@ Then restart gateway by reboot command.
cd /tmp
wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1"
chmod a+x /tmp/curl
/tmp/curl -s -k -L -o /tmp/linux.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/blob/main/original/M1S/3.2.4_0014.0520_mi_fw_ver_3.1.3_0011/linux_3.2.4_0014.0520_mi_fw_ver_3.1.3_0011.bin
/tmp/curl -s -k -L -o /tmp/linux.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/blob/main/original/M1S/3.2.7_0020.0524/linux_3.2.7_0020.0524.bin
fw_update /tmp/linux.bin
/tmp/curl -s -k -L -o /tmp/rootfs.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/blob/main/modified/M1S/3.2.4_0014.0520_mi_fw_ver_3.1.3_0011/rootfs_3.2.4_0014.0520_mi_fw_ver_3.1.3_0011_modification.bin
/tmp/curl -s -k -L -o /tmp/rootfs.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/blob/main/modified/M1S/3.2.7_0020.0524/rootfs_3.2.7_0020.0524_modified.bin
fw_update /tmp/rootfs.bin
```
If there is no any error generated, then restart gateway by reboot command.
Expand All @@ -74,9 +74,9 @@ If there is no any error generated, then restart gateway by reboot command.
cd /tmp
wget -O /tmp/curl "http://master.dl.sourceforge.net/project/mgl03/bin/curl?viasf=1"
chmod a+x /tmp/curl
/tmp/curl -s -k -L -o /tmp/linux.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/original/M2/3.2.7_0018_0524/linux_3.2.7_0018_0524.bin
/tmp/curl -s -k -L -o /tmp/linux.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/original/M2/3.2.8_0006.0526/linux_3.2.8_0006.0526.bin
fw_update /tmp/linux.bin
/tmp/curl -s -k -L -o /tmp/rootfs.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/modified/M2/3.2.7_0018_0524/rootfs_3.2.7_0018_0524_modification.bin
/tmp/curl -s -k -L -o /tmp/rootfs.bin https://raw.githubusercontent.com/niceboygithub/AqaraM1SM2fw/main/modified/M2/3.2.8_0006.0526/rootfs_3.2.8_0006.0526_modified.bin
fw_update /tmp/rootfs.bin
```
If there is no any error generated, then restart gateway by reboot command.
Expand Down
2 changes: 2 additions & 0 deletions custom_components/aqara_gateway/core/const.py
Original file line number Diff line number Diff line change
Expand Up @@ -268,6 +268,8 @@
}

SWITCH_ATTRIBUTES = (
'channel_decoupled',
'channel_loading_type',
'channel_1_decoupled',
'channel_2_decoupled',
'channel_3_decoupled',
Expand Down
81 changes: 65 additions & 16 deletions custom_components/aqara_gateway/core/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -444,20 +444,6 @@
['13.1.85', 'alarm', 'tvoc_level', 'air_quality'],
['14.1.85', None, 'unit', None],
]
}, {
# no N, https://www.aqara.com/en/single_switch_T1_no-neutral.html
'lumi.switch.l0agl1': ["Aqara", "Relay T1", "SSM-U02"],
'mi_spec': [
['2.1', '2.1', 'switch', 'switch'],
]
}, {
# with N, https://www.aqara.com/en/single_switch_T1_with-neutral.html
'lumi.switch.n0agl1': ["Aqara", "Relay T1", "SSM-U01"],
'mi_spec': [
['2.1', '2.1', 'switch', 'switch'],
['3.2', '3.2', 'power', 'sensor'],
# ['5.7', '5.7', 'voltage', 'sensor'],
]
}, {
'lumi.switch.b1lc04': ["Aqara", "Single Wall Switch E1", "QBKG38LM"],
'mi_spec': [
Expand Down Expand Up @@ -522,7 +508,6 @@
}, {
# with neutral wire, thanks @Mantoui
'lumi.switch.n3acn3': ["Aqara", "Triple Wall Switch D1", "QBKG26LM"],
'lumi.switch.n4acn4': ["Aqara", "Scene Panel", "ZNCJMB14LM"], # @miniknife88
'lumi.switch.n3acn1': ["Aqara", "Triple Wall Switch H1 Pro", "QBKG32LM"], # @Kris
'params': [
['0.12.85', 'load_power', 'power', 'sensor'],
Expand All @@ -538,6 +523,37 @@
['13.7.85', None, 'button_both_23', None],
[None, None, 'switch', 'binary_sensor'],
]
}, {
# with neutral wire
'lumi.switch.n4acn4': ["Aqara", "Scene Panel", "ZNCJMB14LM"], # @miniknife88
'params': [
['0.12.85', 'load_power', 'power', 'sensor'],
['0.13.85', None, 'consumption', 'sensor'],
['1.1.85', None, 'brightness', None],
['1.2.85', None, 'standby_brightness', None],
['4.1.85', 'channel_0', 'channel 1', 'switch'],
['4.2.85', 'channel_1', 'channel 2', 'switch'],
['4.3.85', 'channel_2', 'channel 3', 'switch'],
['4.9.85', None, 'auto_brightness', None],
['13.1.85', None, 'button_1', None],
['13.2.85', None, 'button_2', None],
['13.3.85', None, 'button_3', None],
['13.4.85', None, 'scenes', None],
['13.5.85', None, 'button_both_12', None],
['13.6.85', None, 'button_both_13', None],
['13.7.85', None, 'button_both_23', None],
['14.6.85', None, 'language', None],
['14.7.85', None, 'prompt_voice', None],
['14.8.85', None, 'screen_saver_styles', None],
['14.9.85', None, 'theme', None],
['14.10.85', None, 'standby_times', None],
['14.11.85', None, 'font_size', None],
['14.12.85', None, 'homepage', None],
['14.13.85', None, 'screen_saver', None],
['14.21.85', None, 'channel_number', None],
['20.4.85', None, 'sync', None],
[None, None, 'switch', 'binary_sensor'],
]
}, {
'lumi.switch.b1laus01': ["Aqara", "Single Wall Switch US", "WS-USC01"],
'lumi.switch.l1aeu1': ["Aqara", "Single Wall Switch EU H1", "WS-EUK01"],
Expand Down Expand Up @@ -581,6 +597,23 @@
['13.5.85', None, 'button_both', None],
[None, None, 'switch', 'binary_sensor'],
]
}, {
# no N, https://www.aqara.com/en/single_switch_T1_no-neutral.html
'lumi.switch.l0agl1': ["Aqara", "Relay T1", "SSM-U02"],
'lumi.switch.l0acn1': ["Aqara", "Relay T1", "DLKZMK12LM"], # @Kris
'params': [
['4.1.85', 'switch', 'switch', 'switch'],
['14.5.85', None, 'channel_loading_type', None]
]
}, {
# with N, https://www.aqara.com/en/single_switch_T1_with-neutral.html
'lumi.switch.n0agl1': ["Aqara", "Relay T1", "SSM-U01"],
'lumi.switch.n0acn1': ["Aqara", "Relay T1", "DLKZMK12LM"],
'params': [
['4.1.85', '4.1.85', 'switch', 'switch'],
['0.12.85', 'load_power', 'power', 'sensor'],
# ['5.7', '5.7', 'voltage', 'sensor'],
]
}, {
'lumi.motion.agl04': ["Aqara", "Precision Motion Sensor", "RTCGQ13LM"],
'params': [
Expand Down Expand Up @@ -761,6 +794,22 @@
['9.1', None, 'button_both: 4', None],
[None, None, 'switch', 'binary_sensor'],
]
}, {
# no N, https://www.aqara.com/en/single_switch_T1_no-neutral.html
'lumi.switch.l0agl1': ["Aqara", "Relay T1", "SSM-U02"],
'lumi.switch.l0acn1': ["Aqara", "Relay T1", "DLKZMK12LM"], # @Kris
'mi_spec': [
['2.1', '2.1', 'switch', 'switch'],
]
}, {
# with N, https://www.aqara.com/en/single_switch_T1_with-neutral.html
'lumi.switch.n0agl1': ["Aqara", "Relay T1", "SSM-U01"],
'lumi.switch.n0acn1': ["Aqara", "Relay T1", "DLKZMK11LM"],
'mi_spec': [
['2.1', '2.1', 'switch', 'switch'],
['3.2', '3.2', 'power', 'sensor'],
# ['5.7', '5.7', 'voltage', 'sensor'],
]
}, {
'lumi.motion.agl04': ["Aqara", "Precision Motion Sensor", "RTCGQ13LM"],
'mi_spec': [
Expand Down Expand Up @@ -950,7 +999,7 @@ def get_device(zigbee_model: str, cloud: str) -> Optional[dict]:
devices.extend(DEVICES)
if cloud and cloud == "aiot":
devices.extend(DEVICES_AIOT)
elif cloud and cloud == "miot":
else:
devices.extend(DEVICES_MIOT)

for device in devices:
Expand Down

0 comments on commit 3731106

Please sign in to comment.