From fe84de9c2a9116882d7b9603eb12ce58fd3f02cb Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Wed, 2 Dec 2020 19:56:59 +0100 Subject: [PATCH] =?UTF-8?q?lampki=20sufitowe:=20prze=C5=82=C4=85czone=20na?= =?UTF-8?q?=20sonoffa05?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Wcześniej były pod sterownik okapu podłączone, ale zmieniliśmy okap i już nie ma tego sterownika. --- items/wifi.items | 10 +++++----- rules/salon.lampka-stolowa.rules | 12 ++++++++++-- sitemaps/default.sitemap | 2 +- 3 files changed, 16 insertions(+), 8 deletions(-) diff --git a/items/wifi.items b/items/wifi.items index bdf28b8..1189824 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -15,7 +15,7 @@ sonoff01 sonoff02 - lampka stół sonoff03 - łazienka wiatrak sonoff04 - -sonoff05 - +sonoff05 - lampki sufitowe sonoff06 - przedpokój touch przy drzwiach sonoff07 - wc wiatrak d1mini01 - okap @@ -51,9 +51,9 @@ Number wSONOFF03 "Wifi s03 wiatrak łazienka [%d dB]" (wifi) { mqtt="<[mo Switch rSONOFF03 "Conn s03 wiatrak łazienka [%s]" { mqtt="<[motherqtt:/sonoff03/status:state:MAP(espeasy_lwt.map)]" } -Switch sSONOFF05 "sonoff5" { mqtt=">[motherqtt:/sonoff05/gpio/12:command:ON:1],>[motherqtt:/sonoff05/gpio/12:command:OFF:0]" } -Number wSONOFF05 "Wifi s05 [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff05/sysinfo/wifi:state:default]" } -Switch rSONOFF05 "Conn s05 [%s]" { mqtt="<[motherqtt:/sonoff05/lwt:state:MAP(espeasy_lwt.map)]" } +Switch sSONOFF05 "Lampki sufitowe" { mqtt=">[motherqtt:/sonoff05/gpio/12:command:ON:1],>[motherqtt:/sonoff05/gpio/12:command:OFF:0]" } +Number wSONOFF05 "Wifi sufit s05 [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff05/sysinfo/wifi:state:default]" } +Switch rSONOFF05 "Conn sufit s05 [%s]" { mqtt="<[motherqtt:/sonoff05/lwt:state:MAP(espeasy_lwt.map)]" } /* przedpokój - sonoff przy drzwiach wejściowych */ /* LED podpięta jako status */ @@ -94,7 +94,7 @@ Switch sD1MINI01_bieg3 "Okap bieg 3 [%s]" { mqtt=">[motherqtt:/d1mini01/gp Switch sD1MINI01_swiatlo "Okap światło [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/4:command:ON:1],>[motherqtt:/d1mini01/gpio/4:command:OFF:0]" } Number dD1MINI01_swiatlo "Okap światło jasność [%s]" { mqtt=">[motherqtt:/d1mini01/pwm/4:command:*:default]" } -Switch sD1MINI01_lampki_sufitowe "Lampki sufitowe [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/5:command:ON:0],>[motherqtt:/d1mini01/gpio/5:command:OFF:1]" } /* reversed here */ +/* Switch sD1MINI01_lampki_sufitowe "Lampki sufitowe [%s]" { mqtt=">[motherqtt:/d1mini01/gpio/5:command:ON:0],>[motherqtt:/d1mini01/gpio/5:command:OFF:1]" } */ /* reversed here */ /*Number dD1MINI01_swiatlo "Okap światło jasność [%s]" { mqtt=">[motherqtt:/d1mini01/pwm/5:command:*:default]" } */ /* command motherqtt:/d1mini01/cmd , .sendCommand("pwm,2,128,500") */ diff --git a/rules/salon.lampka-stolowa.rules b/rules/salon.lampka-stolowa.rules index 429b326..42b21e1 100644 --- a/rules/salon.lampka-stolowa.rules +++ b/rules/salon.lampka-stolowa.rules @@ -31,10 +31,11 @@ when then /* HOLIDAY */ - sD1MINI01_lampki_sufitowe.sendCommand(ON) + sSONOFF05.sendCommand(ON) /* balkon */ sSHELLY01.sendCommand(ON) + end /* HOLIDAY */ @@ -108,14 +109,21 @@ rule "Zgaś stółlampkę, sufitowe i nablatowe wieczorem" when Time cron "0 15 22 * * ?" then + /* lampka nad stołem */ sSONOFF02.sendCommand(OFF) sSONOFF02_expected.postUpdate(OFF) dSONOFF02LED.sendCommand(1023) - sD1MINI01_lampki_sufitowe.sendCommand(OFF) + /* sufitowe gasimy tylko jak nikogo nie ma w domu */ + if (sHolidayVacancy.state == ON) { + sSONOFF05.sendCommand(OFF) + } sD1MINI02MOS.sendCommand(OFF) + /* kanapowe */ + sSONOFF01.sendCommand(OFF) + /* balkon */ sSHELLY01.sendCommand(OFF) end diff --git a/sitemaps/default.sitemap b/sitemaps/default.sitemap index 7c19bf6..d7624d9 100644 --- a/sitemaps/default.sitemap +++ b/sitemaps/default.sitemap @@ -17,7 +17,7 @@ sitemap pbrk label="Domek" Switch item=sOWFS01 Switch item=sOWFS02 Switch item=sSONOFF02 - Switch item=sD1MINI01_lampki_sufitowe + Switch item=sSONOFF05 Switch item=sSONOFF01 Switch item=sSONOFF06 Switch item=sSHELLY01