diff --git a/items/wifi.items b/items/wifi.items index b0cb646..49872fd 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -13,8 +13,11 @@ spis treści sonoff01 sonoff02 - lampka stół -sonoff03 - łazeinka -sonoff04 - przedpokój przy drzwiach wejściowych +sonoff03 - łazienka wiatrak +sonoff04 - +sonoff05 - lampki balkonowe +sonoff06 - przedpokój touch przy drzwiach +sonoff07 - wc wiatrak d1mini01 - okap d1mini02 - blat ledki d1mini03 - prototyp / pilot na kanapie @@ -39,7 +42,7 @@ Number wSONOFF02 "Wifi s02 stół [%d dB]" (wifi) { mqtt="<[motherqtt:/so Switch rSONOFF02 "Conn s02 [%s]" { mqtt="<[motherqtt:/sonoff02/lwt:state:MAP(espeasy_lwt.map)]" } -Switch sSONOFF03 "Wiatrak" { mqtt=">[motherqtt:/sonoff03/gpio/12:command:ON:1],>[motherqtt:/sonoff03/gpio/12:command:OFF:0]" } +Switch sSONOFF03 "Wiatrak łazienka" { mqtt=">[motherqtt:/sonoff03/gpio/12:command:ON:1],>[motherqtt:/sonoff03/gpio/12:command:OFF:0]" } Number dSONOFF03LED "Wiatrak LED [%s]" { mqtt=">[motherqtt:/sonoff03/pwm/13:command:*:default]" } Number h_lazienka "Wilgotność [%.1f %%]" { mqtt="<[motherqtt:/sonoff03/dht22/humidity:state:default]" } Number t_lazienka "Temperatura [%.1f °C]" (temperatury) { mqtt="<[motherqtt:/sonoff03/dht22/temperature:state:default]" } @@ -58,6 +61,11 @@ Number wSONOFF06 "Wifi s06 przedpokój [%d dB]" (wifi) { mqtt="<[motherqt Switch rSONOFF06 "Conn s06 [%s]" { mqtt="<[motherqtt:/sonoff06/lwt:state:MAP(espeasy_lwt.map)]" } +Switch sSONOFF07 "Wiatrak WC" { mqtt=">[motherqtt:/sonoff07/gpio/12:command:ON:1],>[motherqtt:/sonoff07/gpio/12:command:OFF:0]" } +/*Number dSONOFF07LED "Wiatrak LED [%s]" { mqtt=">[motherqtt:/sonoff07/pwm/13:command:*:default]" } */ +Number wSONOFF07 "Wifi s07 wiatrak wc [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff07/sysinfo/wifi:state:default]" } +Switch rSONOFF07 "Conn s07 [%s]" { mqtt="<[motherqtt:/sonoff07/status:state:MAP(espeasy_lwt.map)]" } + /* d1mini w okapie */ Dimmer dOKAP_speed diff --git a/rules/wc.rules b/rules/wc.rules index 9d4a58c..a928950 100644 --- a/rules/wc.rules +++ b/rules/wc.rules @@ -24,3 +24,28 @@ then end +rule "Wyłączaj wiatrak na noc" +when + Time cron "0 0 22 * * ?" +then +/* logInfo("Vacancy", "state {}", sHolidayVacancy.state) + if (sHolidayVacancy.state == ON) { + return; + } +*/ + sSONOFF07.sendCommand(OFF) +end + +rule "Włączaj wiatrak rano " +when + Time cron "0 30 6 * * ?" +then +/* logInfo("Vacancy", "state {}", sHolidayVacancy.state) + if (sHolidayVacancy.state == ON) { + return; + } +*/ + sSONOFF07.sendCommand(ON) +end + + diff --git a/sitemaps/default.sitemap b/sitemaps/default.sitemap index 3ab6c5c..eb5eb6d 100644 --- a/sitemaps/default.sitemap +++ b/sitemaps/default.sitemap @@ -49,6 +49,7 @@ sitemap pbrk label="Domek" Text item=h_lazienka Switch item=sSONOFF03 Switch item=sD1MINI04_refresh + Switch item=sSONOFF07 } Frame label="Podgląd" { diff --git a/sitemaps/tech.sitemap b/sitemaps/tech.sitemap index 1c62dc6..3a74cf4 100644 --- a/sitemaps/tech.sitemap +++ b/sitemaps/tech.sitemap @@ -11,6 +11,7 @@ sitemap pbrk label="Szczegóły techniczne" Switch item=rSONOFF02 Switch item=rSONOFF03 Switch item=rSONOFF06 + Switch item=rSONOFF07 Switch item=rD1MINI01 Switch item=rD1MINI02 Switch item=rD1MINI03 @@ -81,6 +82,7 @@ sitemap pbrk label="Szczegóły techniczne" Switch item=sWC_occupied Text item=wD1MINI04 Switch item=rD1MINI04 + Switch item=rSONOFF07 } Frame label="D1MINI06 - przedpokój przy salonie" {