diff --git a/items/wifi.items b/items/wifi.items index 2998b3b..bdf28b8 100644 --- a/items/wifi.items +++ b/items/wifi.items @@ -65,8 +65,9 @@ Switch sSONOFF06KEY "Włącznik hall przy drzwiach wejściowych [%s]" { mqtt="< Number wSONOFF06 "Wifi s06 przedpokój wejście [%d dB]" (wifi) { mqtt="<[motherqtt:/sonoff06/wifi/:state:default]" } Switch rSONOFF06 "Conn s06 przedpokój wejście [%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]" } +/* do czasu wymiany firmware */ +/* Switch sSONOFF07 "Wiatrak WC" { mqtt=">[motherqtt:/sonoff07/gpio/12:command:ON:1],>[motherqtt:/sonoff07/gpio/12:command:OFF:0]" }*/ +Switch sSONOFF07 "Wiatrak WC" { http=">[ON:GET:http://sonoff07.pipebreaker.pl/?cmd=GPIO,12,1] >[OFF:GET:http://sonoff07.pipebreaker.pl/?cmd=GPIO,12,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 wiatrak wc [%s]" { mqtt="<[motherqtt:/sonoff07/lwt:state:MAP(espeasy_lwt.map)]" } diff --git a/rules/wc.rules b/rules/wc.rules index 2c15b4b..ca87356 100644 --- a/rules/wc.rules +++ b/rules/wc.rules @@ -26,25 +26,26 @@ end rule "Wyłączaj wiatrak na noc" when - Time cron "0 0 22 * * ?" + Time cron "0 58 21 * * ?" then -/* logInfo("Vacancy", "state {}", sHolidayVacancy.state) + 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 * * ?" + Time cron "0 30 6 ? * MON-FRI" or + Time cron "0 30 9 ? * SAT-SUN" then -/* logInfo("Vacancy", "state {}", sHolidayVacancy.state) + logInfo("Vacancy", "state {}", sHolidayVacancy.state) if (sHolidayVacancy.state == ON) { return; } -*/ + sSONOFF07.sendCommand(ON) end