wc: sterowanie wiatrakiem (wyłączanie na noc)

This commit is contained in:
root
2018-12-09 18:52:55 +01:00
parent 56b311c559
commit 46ede33359
4 changed files with 39 additions and 3 deletions

View File

@@ -13,8 +13,11 @@
spis treści spis treści
sonoff01 sonoff01
sonoff02 - lampka stół sonoff02 - lampka stół
sonoff03 - łazeinka sonoff03 - łazienka wiatrak
sonoff04 - przedpokój przy drzwiach wejściowych sonoff04 -
sonoff05 - lampki balkonowe
sonoff06 - przedpokój touch przy drzwiach
sonoff07 - wc wiatrak
d1mini01 - okap d1mini01 - okap
d1mini02 - blat ledki d1mini02 - blat ledki
d1mini03 - prototyp / pilot na kanapie d1mini03 - prototyp / pilot na kanapie
@@ -39,7 +42,7 @@ Number wSONOFF02 "Wifi s02 stół [%d dB]" <wifi> (wifi) { mqtt="<[motherqtt:/so
Switch rSONOFF02 "Conn s02 [%s]" { mqtt="<[motherqtt:/sonoff02/lwt:state:MAP(espeasy_lwt.map)]" } Switch rSONOFF02 "Conn s02 [%s]" { mqtt="<[motherqtt:/sonoff02/lwt:state:MAP(espeasy_lwt.map)]" }
Switch sSONOFF03 "Wiatrak" <fan> { mqtt=">[motherqtt:/sonoff03/gpio/12:command:ON:1],>[motherqtt:/sonoff03/gpio/12:command:OFF:0]" } Switch sSONOFF03 "Wiatrak łazienka" <fan> { 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 dSONOFF03LED "Wiatrak LED [%s]" { mqtt=">[motherqtt:/sonoff03/pwm/13:command:*:default]" }
Number h_lazienka "Wilgotność [%.1f %%]" <cistern> { mqtt="<[motherqtt:/sonoff03/dht22/humidity:state:default]" } Number h_lazienka "Wilgotność [%.1f %%]" <cistern> { mqtt="<[motherqtt:/sonoff03/dht22/humidity:state:default]" }
Number t_lazienka "Temperatura [%.1f °C]" <temperature> (temperatury) { mqtt="<[motherqtt:/sonoff03/dht22/temperature:state:default]" } Number t_lazienka "Temperatura [%.1f °C]" <temperature> (temperatury) { mqtt="<[motherqtt:/sonoff03/dht22/temperature:state:default]" }
@@ -58,6 +61,11 @@ Number wSONOFF06 "Wifi s06 przedpokój [%d dB]" <wifi> (wifi) { mqtt="<[motherqt
Switch rSONOFF06 "Conn s06 [%s]" { mqtt="<[motherqtt:/sonoff06/lwt:state:MAP(espeasy_lwt.map)]" } Switch rSONOFF06 "Conn s06 [%s]" { mqtt="<[motherqtt:/sonoff06/lwt:state:MAP(espeasy_lwt.map)]" }
Switch sSONOFF07 "Wiatrak WC" <fan> { 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> (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 */ /* d1mini w okapie */
Dimmer dOKAP_speed <fan> Dimmer dOKAP_speed <fan>

View File

@@ -24,3 +24,28 @@ then
end 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

View File

@@ -49,6 +49,7 @@ sitemap pbrk label="Domek"
Text item=h_lazienka Text item=h_lazienka
Switch item=sSONOFF03 Switch item=sSONOFF03
Switch item=sD1MINI04_refresh Switch item=sD1MINI04_refresh
Switch item=sSONOFF07
} }
Frame label="Podgląd" { Frame label="Podgląd" {

View File

@@ -11,6 +11,7 @@ sitemap pbrk label="Szczegóły techniczne"
Switch item=rSONOFF02 Switch item=rSONOFF02
Switch item=rSONOFF03 Switch item=rSONOFF03
Switch item=rSONOFF06 Switch item=rSONOFF06
Switch item=rSONOFF07
Switch item=rD1MINI01 Switch item=rD1MINI01
Switch item=rD1MINI02 Switch item=rD1MINI02
Switch item=rD1MINI03 Switch item=rD1MINI03
@@ -81,6 +82,7 @@ sitemap pbrk label="Szczegóły techniczne"
Switch item=sWC_occupied Switch item=sWC_occupied
Text item=wD1MINI04 Text item=wD1MINI04
Switch item=rD1MINI04 Switch item=rD1MINI04
Switch item=rSONOFF07
} }
Frame label="D1MINI06 - przedpokój przy salonie" { Frame label="D1MINI06 - przedpokój przy salonie" {