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:
2023-11-18 16:24:08 +01:00
parent 5ed01b298a
commit 4af668cb9d
4 changed files with 20 additions and 39 deletions

View File

@@ -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 */

View File

@@ -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