From ed5f26e09646f2acb79e60fd326d4c30f66d83cd Mon Sep 17 00:00:00 2001 From: Tomasz Torcz Date: Sun, 3 Oct 2021 14:38:16 +0200 Subject: [PATCH] =?UTF-8?q?r=C3=B3=C5=BCne=20zebrane=20fixy,=20g=C5=82?= =?UTF-8?q?=C3=B3wnie=20w=20timerach?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- rules/przedpokój.rules | 13 +++++++++++-- rules/salon.cottonballs.rules | 13 +++++++++++-- rules/salon.kodi.rules | 1 + rules/salon.lampka-stolowa.rules | 8 +++++++- rules/sypialnia.lampka-nocna.rules | 6 ++++-- sitemaps/tech.sitemap | 2 +- 6 files changed, 35 insertions(+), 8 deletions(-) diff --git a/rules/przedpokój.rules b/rules/przedpokój.rules index 2e6a8de..562d1b6 100644 --- a/rules/przedpokój.rules +++ b/rules/przedpokój.rules @@ -42,14 +42,16 @@ end rule "Przedpokój: zapal rano" when - Time cron "0 50 5 ? * MON-FRI *" + Time cron "0 48 5 ? * MON-FRI *" /*or + Time cron "0 44 6 ? * MON-FRI *" */ then sSONOFF06.sendCommand(ON) end rule "Przedpokój: zgaś rano" when - Time cron "0 50 6 ? * MON-FRI *" + /*Time cron "0 50 6 ? * MON-FRI *"*/ + Time cron "0 50 7 ? * MON-FRI *" then sSONOFF06.sendCommand(OFF) end @@ -74,3 +76,10 @@ end */ +/* special smart: 3x szybkie przełączenie zapala wszystko w domu; + if last przelaczenie time < 1 sekunde temu, licznik++ + else licznik = 1 + if licznik = 3, zapal wszystko +*/ + + diff --git a/rules/salon.cottonballs.rules b/rules/salon.cottonballs.rules index 6c0f75d..737af7c 100644 --- a/rules/salon.cottonballs.rules +++ b/rules/salon.cottonballs.rules @@ -12,7 +12,9 @@ when Time cron "0 35 6 * * ?" then sOWFS01.sendCommand(OFF) - sD1MINI02MOS.sendCommand(OFF) + sOWFS01_expected.postUpdate(OFF) + /* commented out during stay-at-home + sD1MINI02MOS.sendCommand(OFF) */ end @@ -26,17 +28,24 @@ then sOWFS01_expected.postUpdate(ON) /* HOLIDAY */ + sD1MINI02MOS.sendCommand(ON) + end +/* niech czeka na "goodnight" */ +/* rule "Zgaś cottonballsy wieczorem" when Time cron "0 20 22 * * ?" then sOWFS01.sendCommand(OFF) sOWFS01_expected.postUpdate(OFF) -end + /* balkon */ + sSHELLY01.sendCommand(OFF) +end +*/ /* diff --git a/rules/salon.kodi.rules b/rules/salon.kodi.rules index 593f45a..59ce528 100644 --- a/rules/salon.kodi.rules +++ b/rules/salon.kodi.rules @@ -7,6 +7,7 @@ then /* cottonballs */ sOWFS01.sendCommand(OFF) /* prawe kanapowe */ + sSONOFF09b_expected.postUpdate(sSONOFF09b.state) sSONOFF09b.sendCommand(OFF) Mpd_quodlibet_StartStop_expected.postUpdate(Mpd_quodlibet_StartStop.state) diff --git a/rules/salon.lampka-stolowa.rules b/rules/salon.lampka-stolowa.rules index 4c60996..cd5473e 100644 --- a/rules/salon.lampka-stolowa.rules +++ b/rules/salon.lampka-stolowa.rules @@ -32,6 +32,8 @@ when then /* HOLIDAY */ + /* drobna przerwa bo cottonballs tez sie zapalaja teraz */ + Thread::sleep(1000) sSONOFF05.sendCommand(ON) /* balkon */ @@ -120,9 +122,13 @@ then sSONOFF02_expected.postUpdate(OFF) dSONOFF02LED.sendCommand(1023) - /* sufitowe gasimy tylko jak nikogo nie ma w domu */ + /* sufitowe gasimy tylko jak nikogo nie ma w domu, + cottonbalsy tez, bo nie ma kto powiedziec goodnight */ if (sHolidayVacancy.state == ON) { + /* kanapa */ sSONOFF05.sendCommand(OFF) + /* cottonballs / krzak */ + sOWFS01.sendCommand(OFF) } Thread::sleep(2000) diff --git a/rules/sypialnia.lampka-nocna.rules b/rules/sypialnia.lampka-nocna.rules index aa07c47..a862a3d 100644 --- a/rules/sypialnia.lampka-nocna.rules +++ b/rules/sypialnia.lampka-nocna.rules @@ -2,7 +2,8 @@ rule "Zapal lampkę i cottonballs rano" when - Time cron "0 42 5 ? * MON-FRI *" + Time cron "0 48 5 ? * MON-FRI *" +/* Time cron "0 39 6 ? * MON-FRI *" */ then sOWFS02.sendCommand(ON) sSONOFF08a.sendCommand(ON) @@ -11,7 +12,8 @@ end rule "Zgaś lampkę i cottonballs rano" when - Time cron "0 30 6 * * ?" +/* Time cron "0 30 6 * * ?" */ + Time cron "0 30 7 * * ?" then sOWFS02.sendCommand(OFF) sSONOFF08a.sendCommand(OFF) diff --git a/sitemaps/tech.sitemap b/sitemaps/tech.sitemap index bda291d..511341b 100644 --- a/sitemaps/tech.sitemap +++ b/sitemaps/tech.sitemap @@ -9,7 +9,7 @@ sitemap pbrk label="Szczegóły techniczne" Group label="Łączność" { Frame label="Połączenie (LWT)" { - Switch item=rSONOFF01 +/* Switch item=rSONOFF01 */ Switch item=rSONOFF02 Switch item=rSONOFF03 Switch item=rSONOFF05