SHELLY02 w lampce stołowej, w zamian za SONOFF02 który zdechł
SHELLY nie ma osobnej kontrolki LED, więc wywalone.
This commit is contained in:
@@ -37,6 +37,7 @@ Switch sSONOFF01 "Wiatrak WC" <fan> { mqtt=">[motherqtt:/sonoff01/gpio/12:comman
|
||||
Number wSONOFF01 "Wifi s01 wiatrak wc [%d dB]" <wifi> (wifi) { mqtt="<[motherqtt:/sonoff01/wifi/:state:default]" }
|
||||
Switch rSONOFF01 "Conn s01 wiatrak wc [%s]" { mqtt="<[motherqtt:/sonoff01/status:state:MAP(espeasy_lwt.map)]" }
|
||||
|
||||
/* zdechł */
|
||||
Switch sSONOFF02 "Lampka nad stołem" <whites> { mqtt=">[motherqtt:/sonoff02/gpio/12:command:ON:1],>[motherqtt:/sonoff02/gpio/12:command:OFF:0]" }
|
||||
Switch sSONOFF02_expected "Lampka nad stołem spodziewana"
|
||||
Number dSONOFF02LED "Lampka stół LED [%s]" { mqtt=">[motherqtt:/sonoff02/pwm/13:command:*:default]" }
|
||||
@@ -179,6 +180,8 @@ Switch rSHELLY01 "Conn sh01 balkon [%s]" { mqtt="<[motherqtt:/shelly01/lwt:state
|
||||
/* lwt: https://shelly-api-docs.shelly.cloud/gen2/ComponentsAndServices/Mqtt#step-7-subscribe-for-messages-on-connecting-and-disconnecting-over-mqtt */
|
||||
|
||||
Switch rSHELLY02 "Conn sh02 stół [%s]" { mqtt="<[motherqtt:/shelly02/online:state:MAP(shelly_lwt.map)]" }
|
||||
Switch sSHELLY02_expected "Lampka nad stołem spodziewana"
|
||||
Switch sSHELLY02 "Lampka stołowa" <whites> { mqtt=">[motherqtt:/shelly02/command/switch\\:0:command:ON:on],>[motherqtt:/shelly02/command/switch\\:0:command:OFF:off]" }
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ when
|
||||
Time cron "0 47 5 ? * MON-FRI *"
|
||||
/* Time cron "0 33 6 ? * MON-FRI *" */
|
||||
then
|
||||
sSONOFF02.sendCommand(ON)
|
||||
sSHELLY02.sendCommand(ON)
|
||||
|
||||
/* balkon */
|
||||
sSHELLY01.sendCommand(ON)
|
||||
@@ -22,7 +22,7 @@ rule "Zgaś stółlampkę rano"
|
||||
when
|
||||
Time cron "0 50 6 * * ?"
|
||||
then
|
||||
sSONOFF02.sendCommand(OFF)
|
||||
sSHELLY02.sendCommand(OFF)
|
||||
|
||||
/* balkon */
|
||||
sSHELLY01.sendCommand(OFF)
|
||||
@@ -61,11 +61,12 @@ then
|
||||
}
|
||||
|
||||
/* more than 90% cloud cover && not before 14:00 hour && TODO: only april-october */
|
||||
if (wClouds.state > 90.0 && hours >= 14 && true) {
|
||||
/* na razie zawsze wlaczaj, bo juz ciemno sie robi, a pogodynka chwilowo nie dziala *.
|
||||
if (true || wClouds.state > 90.0 && hours >= 14 && true) {
|
||||
logInfo("stollampka", "Powyżej 90% chmur, zapalam")
|
||||
|
||||
/* sSONOFF02.sendCommand(ON) */
|
||||
sSONOFF02_expected.postUpdate(ON)
|
||||
sSHELLY02.sendCommand(ON)
|
||||
sSHELLY02_expected.postUpdate(ON)
|
||||
|
||||
sSONOFF09a.sendCommand(ON)
|
||||
sSONOFF09b.sendCommand(ON)
|
||||
@@ -86,23 +87,9 @@ then
|
||||
return;
|
||||
}
|
||||
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
Thread::sleep(500)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
Thread::sleep(500)
|
||||
|
||||
/* sSONOFF02.sendCommand(ON) */
|
||||
sSONOFF02_expected.postUpdate(ON)
|
||||
sSHELLY02.sendCommand(ON) */
|
||||
sSHELLY02_expected.postUpdate(ON)
|
||||
|
||||
/* kanapa */
|
||||
if ( Kodi_State.state == "Play" ) {
|
||||
@@ -116,15 +103,6 @@ then
|
||||
end
|
||||
|
||||
|
||||
|
||||
rule "Przedzgaś stółlampkę wieczorem"
|
||||
when
|
||||
Time cron "0 12 22 * * ?"
|
||||
then
|
||||
dSONOFF02LED.sendCommand(0)
|
||||
end
|
||||
|
||||
|
||||
rule "Zgaś stółlampkę, sufitowe i nablatowe wieczorem"
|
||||
when
|
||||
Time cron "0 15 22 * * ?"
|
||||
@@ -135,9 +113,8 @@ then
|
||||
}
|
||||
|
||||
/* lampka nad stołem */
|
||||
sSONOFF02.sendCommand(OFF)
|
||||
sSONOFF02_expected.postUpdate(OFF)
|
||||
dSONOFF02LED.sendCommand(1023)
|
||||
sSHELLY02.sendCommand(OFF)
|
||||
sSHELLY02_expected.postUpdate(OFF)
|
||||
|
||||
/* sufitowe gasimy tylko jak nikogo nie ma w domu,
|
||||
cottonbalsy tez, bo nie ma kto powiedziec goodnight */
|
||||
|
||||
@@ -12,10 +12,10 @@ end
|
||||
|
||||
rule "Synchronizuj lampka stół po restarcie"
|
||||
when
|
||||
Item rSONOFF02 received update ON
|
||||
Item rSHELLY02 received update ON
|
||||
then
|
||||
logInfo("S02stół", "Reappeared, applying state stół {}", sSONOFF02.state)
|
||||
sSONOFF02.sendCommand(sSONOFF02.state.toString)
|
||||
logInfo("S02stół", "Reappeared, applying state stół {}", sSHELLY02.state)
|
||||
sSHELLY02.sendCommand(sSHELLY02.state.toString)
|
||||
end
|
||||
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@ sitemap pbrk label="Szczegóły techniczne"
|
||||
Group label="Łączność" {
|
||||
Frame label="Połączenie (LWT)" {
|
||||
Switch item=rSONOFF01
|
||||
Switch item=rSONOFF02
|
||||
/* Switch item=rSONOFF02 */
|
||||
Switch item=rSONOFF03
|
||||
Switch item=rSONOFF04
|
||||
Switch item=rSONOFF05
|
||||
@@ -36,7 +36,7 @@ sitemap pbrk label="Szczegóły techniczne"
|
||||
Switch item=Mpd_quodlibet_StartStop_expected
|
||||
Switch item=sOWFS01_expected
|
||||
Switch item=sSONOFF09b_expected
|
||||
/* Switch item=sSONOFF02_expected */
|
||||
Switch item=sSHELLY02_expected
|
||||
}
|
||||
|
||||
Frame label="SONOFF09 – lampki kanapowe" {
|
||||
@@ -44,10 +44,11 @@ sitemap pbrk label="Szczegóły techniczne"
|
||||
Switch item=rSONOFF09
|
||||
}
|
||||
|
||||
Frame label="SONOFF02 – lampka nad stołem" {
|
||||
/* Frame label="SONOFF02 – lampka nad stołem" {
|
||||
Text item=wSONOFF02
|
||||
Switch item=rSONOFF02
|
||||
}
|
||||
*/
|
||||
|
||||
Frame label="SONOFF03 – wiatrak łazienkowy" {
|
||||
Text item=wSONOFF03
|
||||
|
||||
Reference in New Issue
Block a user