kanapa: zmiana sonoffa basic na dual
Do drugiego gniazdka podłączona lampka po prawej, która odbija się w ekranie. Przestawienie zielonego przycisku prototypu do przełączania tylko prawej lampki, nie obu. Przy okazji też zmiana w konfiguracji ha-bridge, żeby Echo dobrze gasiło.
This commit is contained in:
@@ -18,6 +18,8 @@ sonoff04 -
|
|||||||
sonoff05 - lampki sufitowe
|
sonoff05 - lampki sufitowe
|
||||||
sonoff06 - przedpokój touch przy drzwiach
|
sonoff06 - przedpokój touch przy drzwiach
|
||||||
sonoff07 - wc wiatrak
|
sonoff07 - wc wiatrak
|
||||||
|
sonoff08 - dual sypialnia
|
||||||
|
sonoff09 - dual kanapowe
|
||||||
d1mini01 - okap
|
d1mini01 - okap
|
||||||
d1mini02 - blat ledki
|
d1mini02 - blat ledki
|
||||||
d1mini03 - prototyp / pilot na kanapie
|
d1mini03 - prototyp / pilot na kanapie
|
||||||
@@ -85,6 +87,18 @@ Switch sSONOFF08_ext "Sypialnia przycisk" { mqtt="<[motherqtt:/sonoff08/button/e
|
|||||||
Number wSONOFF08 "Wifi s08 sypialnia [%d dB]" <wifi> (wifi) { mqtt="<[motherqtt:/sonoff08/sysinfo/wifi:state:default]" }
|
Number wSONOFF08 "Wifi s08 sypialnia [%d dB]" <wifi> (wifi) { mqtt="<[motherqtt:/sonoff08/sysinfo/wifi:state:default]" }
|
||||||
Switch rSONOFF08 "Conn s08 sypialnia [%s]" { mqtt="<[motherqtt:/sonoff08/lwt:state:MAP(espeasy_lwt.map)]" }
|
Switch rSONOFF08 "Conn s08 sypialnia [%s]" { mqtt="<[motherqtt:/sonoff08/lwt:state:MAP(espeasy_lwt.map)]" }
|
||||||
|
|
||||||
|
/* MQTT chwilowo ma problemy jakies */
|
||||||
|
/*Switch sSONOFF09a "Kanapa Asia" <whites> { mqtt=">[motherqtt:/sonoff09/gpio/12:command:ON:1],>[motherqtt:/sonoff09/gpio/12:command:OFF:0]" }
|
||||||
|
Switch sSONOFF09b "Kanapa Tomek" <whites> { mqtt=">[motherqtt:/sonoff09/gpio/5:command:ON:1],>[motherqtt:/sonoff09/gpio/5:command:OFF:0]" }
|
||||||
|
*/
|
||||||
|
Switch sSONOFF09a "Kanapa Asia" <whites> { http=">[ON:GET:http://sonoff09.pipebreaker.pl/?cmd=GPIO,12,1] >[OFF:GET:http://sonoff09.pipebreaker.pl/?cmd=GPIO,12,0]" }
|
||||||
|
Switch sSONOFF09b "Kanapa Tomek" <whites> { http=">[ON:GET:http://sonoff09.pipebreaker.pl/?cmd=GPIO,5,1] >[OFF:GET:http://sonoff09.pipebreaker.pl/?cmd=GPIO,5,0]" }
|
||||||
|
Switch sSONOFF09b_expected "Kanapa Tomek spodziewana"
|
||||||
|
Switch sSONOFF09_ext "Kanapa przycisk" { mqtt="<[motherqtt:/sonoff09/button/ext:state:MAP(espeasy_onoff.map)]" }
|
||||||
|
Number wSONOFF09 "Wifi s09 kanapa [%d dB]" <wifi> (wifi) { mqtt="<[motherqtt:/sonoff09/sysinfo/wifi:state:default]" }
|
||||||
|
Switch rSONOFF09 "Conn s09 kanapa [%s]" { mqtt="<[motherqtt:/sonoff09/lwt:state:MAP(espeasy_lwt.map)]" }
|
||||||
|
|
||||||
|
|
||||||
/* d1mini w okapie */
|
/* d1mini w okapie */
|
||||||
Dimmer dOKAP_speed <fan>
|
Dimmer dOKAP_speed <fan>
|
||||||
Number vOKAP_speed <fan> /* wirtualny przelacznik na potrzeby HomeHabit */
|
Number vOKAP_speed <fan> /* wirtualny przelacznik na potrzeby HomeHabit */
|
||||||
|
|||||||
@@ -3,10 +3,10 @@ rule "d1m03 przełączaj zielone"
|
|||||||
when
|
when
|
||||||
Item sD1MINI03_button_green received update
|
Item sD1MINI03_button_green received update
|
||||||
then
|
then
|
||||||
if (sSONOFF01.state == ON) {
|
if (sSONOFF09b.state == ON) {
|
||||||
sSONOFF01.sendCommand(OFF)
|
sSONOFF09b.sendCommand(OFF)
|
||||||
} else {
|
} else {
|
||||||
sSONOFF01.sendCommand(ON)
|
sSONOFF09b.sendCommand(ON)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -36,11 +36,11 @@ end
|
|||||||
|
|
||||||
rule "d1mini03 synchronizuj kolorki"
|
rule "d1mini03 synchronizuj kolorki"
|
||||||
when
|
when
|
||||||
Item sSONOFF01 received update or
|
Item sSONOFF09b received update or
|
||||||
Item Mpd_quodlibet_StartStop received update or
|
Item Mpd_quodlibet_StartStop received update or
|
||||||
Item sSONOFF02 received update
|
Item sSONOFF02 received update
|
||||||
then
|
then
|
||||||
sD1MINI03_light_green.sendCommand(sSONOFF01.state.toString())
|
sD1MINI03_light_green.sendCommand(sSONOFF09b.state.toString())
|
||||||
|
|
||||||
sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())
|
sD1MINI03_light_yellow.sendCommand(Mpd_quodlibet_StartStop.state.toString())
|
||||||
|
|
||||||
|
|||||||
9
rules/salon.kanapowe.rules
Normal file
9
rules/salon.kanapowe.rules
Normal file
@@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
/* Lampki kanapowe po stronie Asi działają jako master */
|
||||||
|
rule "Synchronizuj prawe kanapowe z lewymi"
|
||||||
|
when
|
||||||
|
Item sSONOFF09a received update
|
||||||
|
then
|
||||||
|
sSONOFF09b.send_update(sSONOFF09a.state)
|
||||||
|
end
|
||||||
|
|
||||||
@@ -4,7 +4,10 @@ rule "Gramy!"
|
|||||||
when
|
when
|
||||||
Item Kodi_State changed to Play
|
Item Kodi_State changed to Play
|
||||||
then
|
then
|
||||||
|
/* cottonballs */
|
||||||
sOWFS01.sendCommand(OFF)
|
sOWFS01.sendCommand(OFF)
|
||||||
|
/* prawe kanapowe */
|
||||||
|
sSONOFF09b.sendCommand(OFF)
|
||||||
|
|
||||||
Mpd_quodlibet_StartStop_expected.postUpdate(Mpd_quodlibet_StartStop.state)
|
Mpd_quodlibet_StartStop_expected.postUpdate(Mpd_quodlibet_StartStop.state)
|
||||||
Mpd_quodlibet_StartStop.sendCommand(OFF)
|
Mpd_quodlibet_StartStop.sendCommand(OFF)
|
||||||
@@ -24,6 +27,7 @@ then
|
|||||||
/* ponizsze generuje w linijce z ifem: The name '<XFeatureCallImplCustom> == <XFeatureCallImplCustom>' cannot be resolved to an item or type.
|
/* ponizsze generuje w linijce z ifem: The name '<XFeatureCallImplCustom> == <XFeatureCallImplCustom>' cannot be resolved to an item or type.
|
||||||
var OnOffType preQL = Mpd_quodlibet_StartStop_expected.state */
|
var OnOffType preQL = Mpd_quodlibet_StartStop_expected.state */
|
||||||
var preQL = Mpd_quodlibet_StartStop_expected.state.toString()
|
var preQL = Mpd_quodlibet_StartStop_expected.state.toString()
|
||||||
|
var preCL = sSONOFF09b_expected.state.toString() /* prawe couchlight */
|
||||||
|
|
||||||
logInfo("niegramy", "Restore QL to {}", preQL)
|
logInfo("niegramy", "Restore QL to {}", preQL)
|
||||||
/* Mpd_quodlibet_StartStop.sendCommand(preQL.toString())*/
|
/* Mpd_quodlibet_StartStop.sendCommand(preQL.toString())*/
|
||||||
@@ -44,6 +48,11 @@ then
|
|||||||
sendCommand(sOWFS01, ON)
|
sendCommand(sOWFS01, ON)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logInfo("niegramy", "Restore Right Couchlights to {}", preCL)
|
||||||
|
if (preCL = "ON") {
|
||||||
|
sSONOFF09b.sendCommand(ON)
|
||||||
|
}
|
||||||
|
|
||||||
sBCacheWriteback.sendCommand(OFF)
|
sBCacheWriteback.sendCommand(OFF)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|||||||
@@ -48,10 +48,10 @@ then
|
|||||||
if (wClouds.state > 90.0) {
|
if (wClouds.state > 90.0) {
|
||||||
logInfo("stollampka", "Powyżej 90% chmur, zapalam")
|
logInfo("stollampka", "Powyżej 90% chmur, zapalam")
|
||||||
|
|
||||||
sSONOFF02.sendCommand(ON)
|
/* sSONOFF02.sendCommand(ON) */
|
||||||
sSONOFF02_expected.postUpdate(ON)
|
sSONOFF02_expected.postUpdate(ON)
|
||||||
|
|
||||||
sSONOFF01.sendCommand(ON)
|
sSONOFF09a.sendCommand(ON)
|
||||||
}
|
}
|
||||||
end
|
end
|
||||||
|
|
||||||
@@ -88,10 +88,11 @@ then
|
|||||||
dSONOFF02LED.sendCommand(1023)
|
dSONOFF02LED.sendCommand(1023)
|
||||||
Thread::sleep(500)
|
Thread::sleep(500)
|
||||||
|
|
||||||
sSONOFF02.sendCommand(ON)
|
/* sSONOFF02.sendCommand(ON) */
|
||||||
sSONOFF02_expected.postUpdate(ON)
|
sSONOFF02_expected.postUpdate(ON)
|
||||||
|
|
||||||
sSONOFF01.sendCommand(ON)
|
|
||||||
|
sSONOFF09a.sendCommand(ON)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -10,7 +10,8 @@ sitemap pbrk label="Domek"
|
|||||||
Switch item=sOWFS02
|
Switch item=sOWFS02
|
||||||
Switch item=sSONOFF02
|
Switch item=sSONOFF02
|
||||||
Switch item=sSONOFF05
|
Switch item=sSONOFF05
|
||||||
Switch item=sSONOFF01
|
Switch item=sSONOFF09a
|
||||||
|
Switch item=sSONOFF09b
|
||||||
Switch item=sSONOFF06
|
Switch item=sSONOFF06
|
||||||
Switch item=sSHELLY01
|
Switch item=sSHELLY01
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ sitemap pbrk label="Szczegóły techniczne"
|
|||||||
Switch item=rSONOFF06
|
Switch item=rSONOFF06
|
||||||
Switch item=rSONOFF07
|
Switch item=rSONOFF07
|
||||||
Switch item=rSONOFF08
|
Switch item=rSONOFF08
|
||||||
|
Switch item=rSONOFF09
|
||||||
Switch item=rD1MINI01
|
Switch item=rD1MINI01
|
||||||
Switch item=rD1MINI02
|
Switch item=rD1MINI02
|
||||||
Switch item=rD1MINI03
|
Switch item=rD1MINI03
|
||||||
@@ -31,6 +32,7 @@ sitemap pbrk label="Szczegóły techniczne"
|
|||||||
Frame label="Spodziewane stany (automatyka)" {
|
Frame label="Spodziewane stany (automatyka)" {
|
||||||
Switch item=Mpd_quodlibet_StartStop_expected
|
Switch item=Mpd_quodlibet_StartStop_expected
|
||||||
Switch item=sOWFS01_expected
|
Switch item=sOWFS01_expected
|
||||||
|
Switch item=sSONOFF09b_expected
|
||||||
/* Switch item=sSONOFF02_expected */
|
/* Switch item=sSONOFF02_expected */
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user