From 5ed01b298a394c9fe807bd85b7ffbb3d296bd13d Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Fri, 17 Nov 2023 20:07:01 +0100 Subject: [PATCH] dodanie nowego kontrollera shelly02 (Shelly Plus1PMMini 6055F999FDAC) --- items/wifi.items | 10 +++++++++- sitemaps/default.sitemap | 5 +++-- sitemaps/tech.sitemap | 9 +++++++++ transform/shelly_lwt.map | 2 ++ 4 files changed, 23 insertions(+), 3 deletions(-) create mode 100644 transform/shelly_lwt.map diff --git a/items/wifi.items b/items/wifi.items index aba1b2d..e23d75e 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -12,7 +12,7 @@ spis treści sonoff01 - wiatrak wc -sonoff02 - lampka stół +sonoff02 - sonoff03 - łazienka wiatrak sonoff04 - podgrzewacz kota sonoff05 - lampki sufitowe @@ -27,6 +27,7 @@ d1mini04 - odświeżacz d1mini05 - wskazówka interneu d1mini06 - schodowy przy salonie shelly01 - oświetlenie balkonu +shelly02 - lampka stół */ /* moc sygnalu */ @@ -173,4 +174,11 @@ Switch sSHELLY01 "Lampki balkonowe" { mqtt=">[motherqtt:/shelly01/gpio/ Number wSHELLY01 "Wifi sh01 balkon [%d dB]" (wifi) { mqtt="<[motherqtt:/shelly01/wifi/:state:default]" } Switch rSHELLY01 "Conn sh01 balkon [%s]" { mqtt="<[motherqtt:/shelly01/lwt:state:MAP(espeasy_lwt.map)]" } +/* lampka stół */ +/* /shelly02/command/switch:0 -m on */ +/* lwt: https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt#step-7-subscribe-for-messages-on-connecting-and-disconnecting-over-mqtt */ + +Switch rSHELLY02 "Conn sh02 stół [%s]" { mqtt="<[motherqtt:/shelly02/online:state:MAP(shelly_lwt.map)]" } +Switch sSHELLY02 "Lampka stołowa" { mqtt=">[motherqtt:/shelly02/command/switch\\:0:command:ON:on],>[motherqtt:/shelly02/command/switch\\:0:command:OFF:off]" } + diff --git a/sitemaps/default.sitemap b/sitemaps/default.sitemap index 227889c..b479aed 100644 --- a/sitemaps/default.sitemap +++ b/sitemaps/default.sitemap @@ -9,7 +9,7 @@ sitemap pbrk label="Domek" Switch item=sSONOFF04MASTER /* cat heater */ Switch item=sSONOFF09a /* kanapa Asia */ Switch item=sSONOFF09b /* kanapa Tomek */ - Switch item=sSONOFF02 /* lampka nad stołem */ + Switch item=sSHELLY02 /* lampka nad stołem */ Switch item=sSONOFF05 /* lampki sufitowe */ Switch item=sSHELLY01 /* balkon */ Switch item=sD1MINI02MOS /* blat w kuchni */ @@ -24,7 +24,6 @@ sitemap pbrk label="Domek" Frame label="Media" { Switch item=samsungtv - Switch item=sOWFS03 /* głośniki */ Switch item=Mpd_quodlibet_StartStop icon="audio" mappings=[OFF="Pause", ON="Play"] /*Switch item=Mpd_quodlibet_StartStop label="Kontrola" icon="play" mappings=[ON="Play"] visibility=[Mpd_quodlibet_StartStop==OFF] @@ -34,6 +33,8 @@ sitemap pbrk label="Domek" Slider item=Mpd_quodlibet_VolumeControl visibility=[Mpd_quodlibet_StartStop==ON] Text item=Mpd_ConcatInfo visibility=[Mpd_quodlibet_StartStop==ON] + + Switch item=sOWFS03 /* głośniki */ } /* diff --git a/sitemaps/tech.sitemap b/sitemaps/tech.sitemap index ef188b1..49f8bd3 100644 --- a/sitemaps/tech.sitemap +++ b/sitemaps/tech.sitemap @@ -18,6 +18,8 @@ sitemap pbrk label="Szczegóły techniczne" Switch item=rSONOFF07 Switch item=rSONOFF08 Switch item=rSONOFF09 + Switch item=rSHELLY01 + Switch item=rSHELLY02 Switch item=rD1MINI01 Switch item=rD1MINI02 Switch item=rD1MINI03 @@ -100,5 +102,12 @@ sitemap pbrk label="Szczegóły techniczne" Switch item=rD1MINI06 } + Frame label="SHELLY01 – lampki balkonowe" { + Switch item=rSHELLY01 + } + + Frame label="SHELLY02 – lampka stołowa" { + Switch item=rSHELLY02 + } } diff --git a/transform/shelly_lwt.map b/transform/shelly_lwt.map new file mode 100644 index 0000000..0ccc7e6 --- /dev/null +++ b/transform/shelly_lwt.map @@ -0,0 +1,2 @@ +true=ON +false=OFF