From f361ffc56555ef746e6f4430f6cb604b79701cc1 Mon Sep 17 00:00:00 2001 From: slopjong Date: Thu, 11 Apr 2019 20:30:55 +0200 Subject: [PATCH] Add the first lamps --- items/level2.items | 17 ++++++++++++++++ things/level2.things | 46 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 items/level2.items create mode 100644 things/level2.things diff --git a/items/level2.items b/items/level2.items new file mode 100644 index 0000000..007a185 --- /dev/null +++ b/items/level2.items @@ -0,0 +1,17 @@ +Group level2 "Level2" + +Group ground_floor "Ground Floor" (level2) +Group main_floor "Second Floor" (level2) + +Group engineering "Engineering" (main_floor) +Group lab "Lab" (main_floor) +Group chill_zone "Chill Zone" (main_floor) +Group entrance "Entrance" (main_floor) + +//------------------------------------------------------------------------------- + +Switch entrance_ceiling_lamps "Ceiling Lamps" (entrance) { channel="mqtt:topic:entrance_ceiling_lamps:power" } +Switch chill_zone_lamps "Lamps" (chill_zone) { channel="mqtt:topic:chill_zone_lamps:power" } +Switch engineering_table_lamps "Table Lamps" (engineering) { channel="mqtt:topic:engineering_table_lamps:power" } +Switch engineering_ceiling_lamps "Ceiling Lamps" (engineering) { channel="mqtt:topic:engineering_ceiling_lamps:power" } +Switch engineering_status_lamp "Status Lamp" (engineering) { channel="mqtt:topic:engineering_status_lamp:power" } \ No newline at end of file diff --git a/things/level2.things b/things/level2.things new file mode 100644 index 0000000..83f29e5 --- /dev/null +++ b/things/level2.things @@ -0,0 +1,46 @@ + +Bridge mqtt:broker:mosquitto "Mosquitto" [ + host="localhost", + port=1883, + secure=false, + username="", + password="", + clientID="openHAB2" +]{ + + Thing topic entrance_ceiling_lamps "Entrance Ceiling Lamps" @ "Entrance" { + Channels: + Type switch : power "Power" [ + commandTopic="cmnd/entrance/ceiling_lamp/Power" + ] + } + + Thing topic chill_zone_lamps "Lamps" @ "Chill zone" { + Channels: + Type switch : power "Power" [ + commandTopic="cmnd/chill_zone/sonoffs/Power" + ] + } + + Thing topic engineering_table_lamps "Engineering Table Lamps" @ "Engineering" { + Channels: + Type switch : power "Power" [ + commandTopic="cmnd/engineering/table/sonoffs/Power" + ] + } + + Thing topic engineering_ceiling_lamps "Engineering Ceiling Lamps" @ "Engineering" { + Channels: + Type switch : power "Power" [ + commandTopic="cmnd/engineering/ceiling/lamp/Power" + ] + } + + Thing topic engineering_status_lamp "Engineering Status Lamp" @ "Engineering" { + Channels: + Type switch : power "Power" [ + commandTopic="cmnd/engineering/status_lamp/Power" + ] + } + +}