From a17dfb12c6767134d5a95f4d886a14887030eb99 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 11 Apr 2018 00:54:18 +0200 Subject: [PATCH 1/2] Add Philips Hue rules --- FloorMotion/off.json | 24 +++++++++++++++++++ FloorMotion/on-bright.json | 39 ++++++++++++++++++++++++++++++ FloorMotion/on-dim.json | 45 +++++++++++++++++++++++++++++++++++ LivingDimmer/dn-hold.json | 30 +++++++++++++++++++++++ LivingDimmer/dn-short.json | 30 +++++++++++++++++++++++ LivingDimmer/off-short.1.json | 35 +++++++++++++++++++++++++++ LivingDimmer/off-short.2.json | 35 +++++++++++++++++++++++++++ LivingDimmer/on-long.json | 32 +++++++++++++++++++++++++ LivingDimmer/on-short.1.json | 35 +++++++++++++++++++++++++++ LivingDimmer/on-short.2.json | 35 +++++++++++++++++++++++++++ LivingDimmer/up-hold.json | 30 +++++++++++++++++++++++ LivingDimmer/up-short.json | 30 +++++++++++++++++++++++ SimpleTap/1.json | 23 ++++++++++++++++++ SimpleTap/2.json | 25 +++++++++++++++++++ SimpleTap/3.json | 25 +++++++++++++++++++ SimpleTap/4.json | 25 +++++++++++++++++++ 16 files changed, 498 insertions(+) create mode 100644 FloorMotion/off.json create mode 100644 FloorMotion/on-bright.json create mode 100644 FloorMotion/on-dim.json create mode 100644 LivingDimmer/dn-hold.json create mode 100644 LivingDimmer/dn-short.json create mode 100644 LivingDimmer/off-short.1.json create mode 100644 LivingDimmer/off-short.2.json create mode 100644 LivingDimmer/on-long.json create mode 100644 LivingDimmer/on-short.1.json create mode 100644 LivingDimmer/on-short.2.json create mode 100644 LivingDimmer/up-hold.json create mode 100644 LivingDimmer/up-short.json create mode 100644 SimpleTap/1.json create mode 100644 SimpleTap/2.json create mode 100644 SimpleTap/3.json create mode 100644 SimpleTap/4.json diff --git a/FloorMotion/off.json b/FloorMotion/off.json new file mode 100644 index 0000000..0319efc --- /dev/null +++ b/FloorMotion/off.json @@ -0,0 +1,24 @@ +{ + "name": "%basename%.off", + "conditions": [ + { + "address": "/sensors/%motion%/state/presence", + "operator": "eq", + "value": "false" + }, + { + "address": "/sensors/%motion%/state/lastupdated", + "operator": "ddx", + "value": "PT00:03:00" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/FloorMotion/on-bright.json b/FloorMotion/on-bright.json new file mode 100644 index 0000000..f71783f --- /dev/null +++ b/FloorMotion/on-bright.json @@ -0,0 +1,39 @@ +{ + "name": "%basename%.on-bright", + "conditions": [ + { + "address": "/sensors/%ambient%/state/daylight", + "operator": "eq", + "value": "false" + }, + { + "address": "/groups/%group%/state/any_on", + "operator": "eq", + "value": "false" + }, + { + "address": "/config/localtime", + "operator": "in", + "value": "T07:00:00/T00:00:00" + }, + { + "address": "/sensors/%motion%/state/presence", + "operator": "eq", + "value": "true" + }, + { + "address": "/sensors/%motion%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": true, + "bri": 230 + } + } + ] +} diff --git a/FloorMotion/on-dim.json b/FloorMotion/on-dim.json new file mode 100644 index 0000000..c49c94f --- /dev/null +++ b/FloorMotion/on-dim.json @@ -0,0 +1,45 @@ +{ + "name": "%basename%.on-dim", + "conditions": [ + { + "address": "/sensors/%ambient%/state/daylight", + "operator": "eq", + "value": "false" + }, + { + "address": "/groups/%group%/state/any_on", + "operator": "eq", + "value": "false" + }, + { + "address": "/config/localtime", + "operator": "in", + "value": "T00:00:00/T07:00:00" + }, + { + "address": "/sensors/%motion%/state/presence", + "operator": "eq", + "value": "true" + }, + { + "address": "/sensors/%motion%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": true, + "bri": 5 + } + }, + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + } + } + ] +} diff --git a/LivingDimmer/dn-hold.json b/LivingDimmer/dn-hold.json new file mode 100644 index 0000000..75b5fa2 --- /dev/null +++ b/LivingDimmer/dn-hold.json @@ -0,0 +1,30 @@ +{ + "name": "%basename%.dn-hold", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "3001" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "ct_inc": 100 + } + }, + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "ct_inc": 100 + } + } + ] +} diff --git a/LivingDimmer/dn-short.json b/LivingDimmer/dn-short.json new file mode 100644 index 0000000..309329f --- /dev/null +++ b/LivingDimmer/dn-short.json @@ -0,0 +1,30 @@ +{ + "name": "%basename%.dn-short", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "3002" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "bri_inc": -16 + } + }, + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "bri_inc": -14 + } + } + ] +} diff --git a/LivingDimmer/off-short.1.json b/LivingDimmer/off-short.1.json new file mode 100644 index 0000000..2004e1a --- /dev/null +++ b/LivingDimmer/off-short.1.json @@ -0,0 +1,35 @@ +{ + "name": "%basename%.off-short.1", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "4002" + }, + { + "address": "/sensors/%mem%/state/status", + "operator": "eq", + "value": "1" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/sensors/%mem%/state", + "method": "PUT", + "body": { + "status": 0 + } + }, + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/LivingDimmer/off-short.2.json b/LivingDimmer/off-short.2.json new file mode 100644 index 0000000..0cbdd89 --- /dev/null +++ b/LivingDimmer/off-short.2.json @@ -0,0 +1,35 @@ +{ + "name": "%basename%.off-short.2", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "4002" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/%mem%/state/status", + "operator": "gt", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "on": false + } + }, + { + "address": "/sensors/%mem%/state", + "method": "PUT", + "body": { + "status": 1 + } + } + ] +} diff --git a/LivingDimmer/on-long.json b/LivingDimmer/on-long.json new file mode 100644 index 0000000..1cc6de6 --- /dev/null +++ b/LivingDimmer/on-long.json @@ -0,0 +1,32 @@ +{ + "name": "%basename%.on-long", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "1001" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "bri": 203, + "ct": 357 + } + }, + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "bri": 203, + "ct": 357 + } + }, + ] +} diff --git a/LivingDimmer/on-short.1.json b/LivingDimmer/on-short.1.json new file mode 100644 index 0000000..d9e7e71 --- /dev/null +++ b/LivingDimmer/on-short.1.json @@ -0,0 +1,35 @@ +{ + "name": "%basename%.on-short.1", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "1002" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/%mem%/state/status", + "operator": "lt", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "on": true + } + }, + { + "address": "/sensors/%mem%/state", + "method": "PUT", + "body": { + "status": 1 + } + } + ] +} diff --git a/LivingDimmer/on-short.2.json b/LivingDimmer/on-short.2.json new file mode 100644 index 0000000..004ffad --- /dev/null +++ b/LivingDimmer/on-short.2.json @@ -0,0 +1,35 @@ +{ + "name": "%basename%.on-short.2", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "1002" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/%mem%/state/status", + "operator": "eq", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "on": true + } + }, + { + "address": "/sensors/%mem%/state", + "method": "PUT", + "body": { + "status": 2 + } + } + ] +} diff --git a/LivingDimmer/up-hold.json b/LivingDimmer/up-hold.json new file mode 100644 index 0000000..156f4b1 --- /dev/null +++ b/LivingDimmer/up-hold.json @@ -0,0 +1,30 @@ +{ + "name": "%basename%.up-hold", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "2001" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "ct_inc": -100 + } + }, + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "ct_inc": -100 + } + } + ] +} diff --git a/LivingDimmer/up-short.json b/LivingDimmer/up-short.json new file mode 100644 index 0000000..a8137ed --- /dev/null +++ b/LivingDimmer/up-short.json @@ -0,0 +1,30 @@ +{ + "name": "%basename%.up-short", + "conditions": [ + { + "address": "/sensors/%dimmer%/state/buttonevent", + "operator": "eq", + "value": "2002" + }, + { + "address": "/sensors/%dimmer%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group1%/action", + "method": "PUT", + "body": { + "bri_inc": 16 + } + }, + { + "address": "/groups/%group2%/action", + "method": "PUT", + "body": { + "bri_inc": 15 + } + } + ] +} diff --git a/SimpleTap/1.json b/SimpleTap/1.json new file mode 100644 index 0000000..1a80dcd --- /dev/null +++ b/SimpleTap/1.json @@ -0,0 +1,23 @@ +{ + "name": "%basename%.1", + "conditions": [ + { + "address": "/sensors/%tap%/state/buttonevent", + "operator": "eq", + "value": "34" + }, + { + "address": "/sensors/%tap%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/SimpleTap/2.json b/SimpleTap/2.json new file mode 100644 index 0000000..996a163 --- /dev/null +++ b/SimpleTap/2.json @@ -0,0 +1,25 @@ +{ + "name": "%basename%.2", + "conditions": [ + { + "address": "/sensors/%tap%/state/buttonevent", + "operator": "eq", + "value": "16" + }, + { + "address": "/sensors/%tap%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": true, + "bri": 5, + "ct": 400 + } + } + ] +} diff --git a/SimpleTap/3.json b/SimpleTap/3.json new file mode 100644 index 0000000..7aa7d72 --- /dev/null +++ b/SimpleTap/3.json @@ -0,0 +1,25 @@ +{ + "name": "%basename%.3", + "conditions": [ + { + "address": "/sensors/%tap%/state/buttonevent", + "operator": "eq", + "value": "17" + }, + { + "address": "/sensors/%tap%/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": true, + "bri": 52, + "ct": 286 + } + } + ] +} diff --git a/SimpleTap/4.json b/SimpleTap/4.json new file mode 100644 index 0000000..eb3b307 --- /dev/null +++ b/SimpleTap/4.json @@ -0,0 +1,25 @@ +{ + "name": "%basename%.4", + "conditions": [ + { + "address": "/sensors/%tap%/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/%tap%/state/buttonevent", + "operator": "eq", + "value": "18" + } + ], + "actions": [ + { + "address": "/groups/%group%/action", + "method": "PUT", + "body": { + "on": true, + "bri": 205, + "ct": 182 + } + } + ] +} From d4c606f619d60b49a6f27251ad809057b49cd5d2 Mon Sep 17 00:00:00 2001 From: Adrian Date: Wed, 11 Apr 2018 00:54:18 +0200 Subject: [PATCH 2/2] Add Philips Hue rules --- FloorMotion/off.rule.json | 24 ++++++++++++++++ FloorMotion/on-bright.rule.json | 39 ++++++++++++++++++++++++++ FloorMotion/on-dim.rule.json | 45 ++++++++++++++++++++++++++++++ LivingDimmer/dn-hold.rule.json | 30 ++++++++++++++++++++ LivingDimmer/dn-short.rule.json | 30 ++++++++++++++++++++ LivingDimmer/off-short.1.rule.json | 35 +++++++++++++++++++++++ LivingDimmer/off-short.2.rule.json | 35 +++++++++++++++++++++++ LivingDimmer/on-long.rule.json | 32 +++++++++++++++++++++ LivingDimmer/on-short.1.rule.json | 35 +++++++++++++++++++++++ LivingDimmer/on-short.2.rule.json | 35 +++++++++++++++++++++++ LivingDimmer/up-hold.rule.json | 30 ++++++++++++++++++++ LivingDimmer/up-short.rule.json | 30 ++++++++++++++++++++ SimpleTap/1.rule.json | 23 +++++++++++++++ SimpleTap/2.rule.json | 25 +++++++++++++++++ SimpleTap/3.rule.json | 25 +++++++++++++++++ SimpleTap/4.rule.json | 25 +++++++++++++++++ 16 files changed, 498 insertions(+) create mode 100644 FloorMotion/off.rule.json create mode 100644 FloorMotion/on-bright.rule.json create mode 100644 FloorMotion/on-dim.rule.json create mode 100644 LivingDimmer/dn-hold.rule.json create mode 100644 LivingDimmer/dn-short.rule.json create mode 100644 LivingDimmer/off-short.1.rule.json create mode 100644 LivingDimmer/off-short.2.rule.json create mode 100644 LivingDimmer/on-long.rule.json create mode 100644 LivingDimmer/on-short.1.rule.json create mode 100644 LivingDimmer/on-short.2.rule.json create mode 100644 LivingDimmer/up-hold.rule.json create mode 100644 LivingDimmer/up-short.rule.json create mode 100644 SimpleTap/1.rule.json create mode 100644 SimpleTap/2.rule.json create mode 100644 SimpleTap/3.rule.json create mode 100644 SimpleTap/4.rule.json diff --git a/FloorMotion/off.rule.json b/FloorMotion/off.rule.json new file mode 100644 index 0000000..aabdbda --- /dev/null +++ b/FloorMotion/off.rule.json @@ -0,0 +1,24 @@ +{ + "name": "BASENAME.off", + "conditions": [ + { + "address": "/sensors/MOTION/state/presence", + "operator": "eq", + "value": "false" + }, + { + "address": "/sensors/MOTION/state/lastupdated", + "operator": "ddx", + "value": "PT00:03:00" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/FloorMotion/on-bright.rule.json b/FloorMotion/on-bright.rule.json new file mode 100644 index 0000000..b523a19 --- /dev/null +++ b/FloorMotion/on-bright.rule.json @@ -0,0 +1,39 @@ +{ + "name": "BASENAME.on-bright", + "conditions": [ + { + "address": "/sensors/AMBIENT/state/daylight", + "operator": "eq", + "value": "false" + }, + { + "address": "/groups/GROUP/state/any_on", + "operator": "eq", + "value": "false" + }, + { + "address": "/config/localtime", + "operator": "in", + "value": "T07:00:00/T00:00:00" + }, + { + "address": "/sensors/MOTION/state/presence", + "operator": "eq", + "value": "true" + }, + { + "address": "/sensors/MOTION/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": true, + "bri": 230 + } + } + ] +} diff --git a/FloorMotion/on-dim.rule.json b/FloorMotion/on-dim.rule.json new file mode 100644 index 0000000..cb19ce9 --- /dev/null +++ b/FloorMotion/on-dim.rule.json @@ -0,0 +1,45 @@ +{ + "name": "BASENAME.on-dim", + "conditions": [ + { + "address": "/sensors/AMBIENT/state/daylight", + "operator": "eq", + "value": "false" + }, + { + "address": "/groups/GROUP/state/any_on", + "operator": "eq", + "value": "false" + }, + { + "address": "/config/localtime", + "operator": "in", + "value": "T00:00:00/T07:00:00" + }, + { + "address": "/sensors/MOTION/state/presence", + "operator": "eq", + "value": "true" + }, + { + "address": "/sensors/MOTION/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": true, + "bri": 5 + } + }, + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + } + } + ] +} diff --git a/LivingDimmer/dn-hold.rule.json b/LivingDimmer/dn-hold.rule.json new file mode 100644 index 0000000..181017f --- /dev/null +++ b/LivingDimmer/dn-hold.rule.json @@ -0,0 +1,30 @@ +{ + "name": "BASENAME.dn-hold", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "3001" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "ct_inc": 100 + } + }, + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "ct_inc": 100 + } + } + ] +} diff --git a/LivingDimmer/dn-short.rule.json b/LivingDimmer/dn-short.rule.json new file mode 100644 index 0000000..19e364c --- /dev/null +++ b/LivingDimmer/dn-short.rule.json @@ -0,0 +1,30 @@ +{ + "name": "BASENAME.dn-short", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "3002" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "bri_inc": -16 + } + }, + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "bri_inc": -14 + } + } + ] +} diff --git a/LivingDimmer/off-short.1.rule.json b/LivingDimmer/off-short.1.rule.json new file mode 100644 index 0000000..046e96f --- /dev/null +++ b/LivingDimmer/off-short.1.rule.json @@ -0,0 +1,35 @@ +{ + "name": "BASENAME.off-short.1", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "4002" + }, + { + "address": "/sensors/MEM/state/status", + "operator": "eq", + "value": "1" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/sensors/MEM/state", + "method": "PUT", + "body": { + "status": 0 + } + }, + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/LivingDimmer/off-short.2.rule.json b/LivingDimmer/off-short.2.rule.json new file mode 100644 index 0000000..1cf4a19 --- /dev/null +++ b/LivingDimmer/off-short.2.rule.json @@ -0,0 +1,35 @@ +{ + "name": "BASENAME.off-short.2", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "4002" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/MEM/state/status", + "operator": "gt", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "on": false + } + }, + { + "address": "/sensors/MEM/state", + "method": "PUT", + "body": { + "status": 1 + } + } + ] +} diff --git a/LivingDimmer/on-long.rule.json b/LivingDimmer/on-long.rule.json new file mode 100644 index 0000000..92826f9 --- /dev/null +++ b/LivingDimmer/on-long.rule.json @@ -0,0 +1,32 @@ +{ + "name": "BASENAME.on-long", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "1001" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "bri": 203, + "ct": 357 + } + }, + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "bri": 203, + "ct": 357 + } + }, + ] +} diff --git a/LivingDimmer/on-short.1.rule.json b/LivingDimmer/on-short.1.rule.json new file mode 100644 index 0000000..a5ad252 --- /dev/null +++ b/LivingDimmer/on-short.1.rule.json @@ -0,0 +1,35 @@ +{ + "name": "BASENAME.on-short.1", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "1002" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/MEM/state/status", + "operator": "lt", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "on": true + } + }, + { + "address": "/sensors/MEM/state", + "method": "PUT", + "body": { + "status": 1 + } + } + ] +} diff --git a/LivingDimmer/on-short.2.rule.json b/LivingDimmer/on-short.2.rule.json new file mode 100644 index 0000000..94f709b --- /dev/null +++ b/LivingDimmer/on-short.2.rule.json @@ -0,0 +1,35 @@ +{ + "name": "BASENAME.on-short.2", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "1002" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/MEM/state/status", + "operator": "eq", + "value": "1" + } + ], + "actions": [ + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "on": true + } + }, + { + "address": "/sensors/MEM/state", + "method": "PUT", + "body": { + "status": 2 + } + } + ] +} diff --git a/LivingDimmer/up-hold.rule.json b/LivingDimmer/up-hold.rule.json new file mode 100644 index 0000000..b0dc947 --- /dev/null +++ b/LivingDimmer/up-hold.rule.json @@ -0,0 +1,30 @@ +{ + "name": "BASENAME.up-hold", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "2001" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "ct_inc": -100 + } + }, + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "ct_inc": -100 + } + } + ] +} diff --git a/LivingDimmer/up-short.rule.json b/LivingDimmer/up-short.rule.json new file mode 100644 index 0000000..62a787d --- /dev/null +++ b/LivingDimmer/up-short.rule.json @@ -0,0 +1,30 @@ +{ + "name": "BASENAME.up-short", + "conditions": [ + { + "address": "/sensors/DIMMER/state/buttonevent", + "operator": "eq", + "value": "2002" + }, + { + "address": "/sensors/DIMMER/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP1/action", + "method": "PUT", + "body": { + "bri_inc": 16 + } + }, + { + "address": "/groups/GROUP2/action", + "method": "PUT", + "body": { + "bri_inc": 15 + } + } + ] +} diff --git a/SimpleTap/1.rule.json b/SimpleTap/1.rule.json new file mode 100644 index 0000000..14b38d1 --- /dev/null +++ b/SimpleTap/1.rule.json @@ -0,0 +1,23 @@ +{ + "name": "BASENAME.1", + "conditions": [ + { + "address": "/sensors/TAP/state/buttonevent", + "operator": "eq", + "value": "34" + }, + { + "address": "/sensors/TAP/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": false + } + } + ] +} diff --git a/SimpleTap/2.rule.json b/SimpleTap/2.rule.json new file mode 100644 index 0000000..cefc50a --- /dev/null +++ b/SimpleTap/2.rule.json @@ -0,0 +1,25 @@ +{ + "name": "BASENAME.2", + "conditions": [ + { + "address": "/sensors/TAP/state/buttonevent", + "operator": "eq", + "value": "16" + }, + { + "address": "/sensors/TAP/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": true, + "bri": 5, + "ct": 400 + } + } + ] +} diff --git a/SimpleTap/3.rule.json b/SimpleTap/3.rule.json new file mode 100644 index 0000000..a7adf53 --- /dev/null +++ b/SimpleTap/3.rule.json @@ -0,0 +1,25 @@ +{ + "name": "BASENAME.3", + "conditions": [ + { + "address": "/sensors/TAP/state/buttonevent", + "operator": "eq", + "value": "17" + }, + { + "address": "/sensors/TAP/state/lastupdated", + "operator": "dx" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": true, + "bri": 52, + "ct": 286 + } + } + ] +} diff --git a/SimpleTap/4.rule.json b/SimpleTap/4.rule.json new file mode 100644 index 0000000..15d7d89 --- /dev/null +++ b/SimpleTap/4.rule.json @@ -0,0 +1,25 @@ +{ + "name": "BASENAME.4", + "conditions": [ + { + "address": "/sensors/TAP/state/lastupdated", + "operator": "dx" + }, + { + "address": "/sensors/TAP/state/buttonevent", + "operator": "eq", + "value": "18" + } + ], + "actions": [ + { + "address": "/groups/GROUP/action", + "method": "PUT", + "body": { + "on": true, + "bri": 205, + "ct": 182 + } + } + ] +}