Skip to content

Commit

Permalink
add 3 new lumi sensors (Koenkk#1272)
Browse files Browse the repository at this point in the history
* add 4 devices

add feibit smart light switch 2 gang without neutral wire and TUYATEC smart switchs without neutral wire (1 gang , 2 gang , 3 gang)

* fix feibit 2 gang switch model name

fix feibit 2 gang smart switch device model name

* fix format error & passed npm run eslint

* Update devices.js

fix tuya smart switch model name

* Update devices.js

* add 3 sensors support

lumi.sensor_ht.agl02,
lumi.flood.agl02,
lumi.vibration.agl01,

WSDCGQ12LM is still experimental and may not work property

* fix lint error

* replace SJCGQ12LM_water_leak_iaszone  with ias_water_leak_alarm_1

* change DJT12LM genOnOff to action: 'vibration'

* fix lint error

* remove some properties of djt12lm and wsdcgq12lm

* Update devices.js

Co-authored-by: Koen Kanters <koenkanters94@gmail.com>
  • Loading branch information
zhouF96 and Koenkk authored Jun 9, 2020
1 parent de80167 commit 2c059b4
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
node_modules/
node_modules/
.vs/slnx.sqlite
.vs/ProjectSettings.json
7 changes: 7 additions & 0 deletions converters/fromZigbee.js
Original file line number Diff line number Diff line change
Expand Up @@ -2075,6 +2075,13 @@ const converters = {
return result;
},
},
DJT12LM_vibration: {
cluster: 'genOnOff',
type: 'commandOn',
convert: (model, msg, publish, options, meta) => {
return {action: 'vibration'};
},
},
CC2530ROUTER_led: {
cluster: 'genOnOff',
type: ['attributeReport', 'readResponse'],
Expand Down
33 changes: 33 additions & 0 deletions devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -800,6 +800,21 @@ const devices = [
],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_ht.agl02'],
model: 'WSDCGQ12LM',
vendor: 'Xiaomi',
description: 'Aqara temperature, humidity and pressure sensor',
supports: 'temperature, humidity and pressure',
fromZigbee: [fz.xiaomi_battery_3v, fz.temperature, fz.humidity, fz.pressure],
toZigbee: [],
meta: {configureKey: 1},
configure: async (device, coordinatorEndpoint) => {
const endpoint = device.getEndpoint(1);
const binds = ['msTemperatureMeasurement', 'msRelativeHumidity', 'msPressureMeasurement'];
await bind(endpoint, coordinatorEndpoint, binds);
},
},
{
zigbeeModel: ['lumi.sensor_motion'],
model: 'RTCGQ01LM',
Expand Down Expand Up @@ -854,6 +869,15 @@ const devices = [
fromZigbee: [fz.xiaomi_battery_3v, fz.SJCGQ11LM_water_leak_iaszone],
toZigbee: [],
},
{
zigbeeModel: ['lumi.flood.agl02'],
model: 'SJCGQ12LM',
vendor: 'Xiaomi',
description: 'Aqara water leak sensor',
supports: 'water leak true/false',
fromZigbee: [fz.xiaomi_battery_3v, fz.ias_water_leak_alarm_1],
toZigbee: [],
},
{
zigbeeModel: ['lumi.sensor_cube', 'lumi.sensor_cube.aqgl01'],
model: 'MFKZQ01LM',
Expand Down Expand Up @@ -982,6 +1006,15 @@ const devices = [
fromZigbee: [fz.xiaomi_battery_3v, fz.DJT11LM_vibration],
toZigbee: [tz.DJT11LM_vibration_sensitivity],
},
{
zigbeeModel: ['lumi.vibration.agl01'],
model: 'DJT12LM',
vendor: 'Xiaomi',
description: 'Aqara vibration sensor',
supports: 'action',
fromZigbee: [fz.DJT12LM_vibration],
toZigbee: [],
},
{
zigbeeModel: ['lumi.curtain', 'lumi.curtain.aq2'],
model: 'ZNCLDJ11LM',
Expand Down

0 comments on commit 2c059b4

Please sign in to comment.