wc: wiatrak sterowany przez HTTP
Ma wgrany firmware, w ktorym akurat nie dziala MQTT. Dotychczas sterowałem przez curla w cronie, ale przeciez openhab ma bindingi http.
This commit is contained in:
@@ -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> (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" <fan> { mqtt=">[motherqtt:/sonoff07/gpio/12:command:ON:1],>[motherqtt:/sonoff07/gpio/12:command:OFF:0]" }
|
||||
/* do czasu wymiany firmware */
|
||||
/* Switch sSONOFF07 "Wiatrak WC" <fan> { mqtt=">[motherqtt:/sonoff07/gpio/12:command:ON:1],>[motherqtt:/sonoff07/gpio/12:command:OFF:0]" }*/
|
||||
Switch sSONOFF07 "Wiatrak WC" <fan> { 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> (wifi) { mqtt="<[motherqtt:/sonoff07/sysinfo/wifi:state:default]" }
|
||||
Switch rSONOFF07 "Conn s07 wiatrak wc [%s]" { mqtt="<[motherqtt:/sonoff07/lwt:state:MAP(espeasy_lwt.map)]" }
|
||||
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user