From 07cfe658cc982d742114f253b3c35491582d7cb7 Mon Sep 17 00:00:00 2001 From: theBigBlase Date: Wed, 20 Dec 2023 14:12:58 -0500 Subject: [PATCH] openhab: base config done : sitemap + things + item and link mqtt --- .../openhab_conf/items/light_effects.items | 26 +++++++++++++++++ .../openhab_conf/sitemaps/battlefield.sitemap | 7 +++++ .../openhab_conf/things/battlefield.things | 29 +++++++++++++++++++ 3 files changed, 62 insertions(+) create mode 100644 openhab/openhab_conf/items/light_effects.items create mode 100644 openhab/openhab_conf/sitemaps/battlefield.sitemap create mode 100644 openhab/openhab_conf/things/battlefield.things diff --git a/openhab/openhab_conf/items/light_effects.items b/openhab/openhab_conf/items/light_effects.items new file mode 100644 index 0000000..4bf8623 --- /dev/null +++ b/openhab/openhab_conf/items/light_effects.items @@ -0,0 +1,26 @@ +Group Room +Group SmartClothes + +Group Sensors +Group:Number Cam "Last roll" (Sensors) + +Group Actuators +Group Lights (Actuators) + + +Number dmg "dernier degat" (Cam, Sensors){ + channel="Channel='mqtt:topic:de'" +} + + +Switch animation "lampe animation degat" (Lights){ + channel="Channel='mqtt:topic:lumiere'" +} + +Color couleur "couleur lampe" (Lights){ + channel="Channel='mqtt:topic:lumiere'" +} + +Switch reset "effecteur nouveau tour" (Sensors){ + channel="Channel='mqtt:topic:de'" +} diff --git a/openhab/openhab_conf/sitemaps/battlefield.sitemap b/openhab/openhab_conf/sitemaps/battlefield.sitemap new file mode 100644 index 0000000..4cb370c --- /dev/null +++ b/openhab/openhab_conf/sitemaps/battlefield.sitemap @@ -0,0 +1,7 @@ +sitemap battlefield label="My home automation" { + Frame label="Battlefield" { + Text item=dmg label="Last Dmg [%s]" + Group item=Actuators icon="light" + Switch item=reset + } +} diff --git a/openhab/openhab_conf/things/battlefield.things b/openhab/openhab_conf/things/battlefield.things new file mode 100644 index 0000000..aab8bc6 --- /dev/null +++ b/openhab/openhab_conf/things/battlefield.things @@ -0,0 +1,29 @@ +Bridge mqtt:broker:mainBroker [ host="172.69.1.2", secure=false ] + + +Thing mqtt:topic:lumiere "lumiere" (mqtt:broker:mainBroker) { + Channels: + Type switch : light "indicateur degat" [ + stateTopic="lumiere/degat/etat", + commandTopic="lumiere/degat/commande", + on="ON", off="OFF" + ] + Type color : light "effect color" [ + stateTopic="lumiere/degat/color/etat", + commandTopic="lumiere/degat/color/commande", colorMode="RGB" + ] +} + +Thing mqtt:topic:de "lecteur de" (mqtt:broker:mainBroker) { + Channels: + Type number : de "effecteur degat" [ + stateTopic="de/degat/dernierLance" + ] +} + +Thing mqtt:topic:button "recommencer" (mqtt:broker:mainBroker) { + Channels: + Type switch : de "effecteur nouveau tour" [ + stateTopic="de/nouveauTour" + ] +}