Zastosowanie: włączenie szybszego, ale mniej bezpiecznego trybu
w czasie oglądania czegoś w Kodi.
Wymaga unitu systemd toggle-bcache@.service:
---
[Unit]
Description=toggle bcache mode for all devices
[Service]
Type=oneshot
WorkingDirectory=/sys
ExecStart=/usr/bin/fd --full-path bcache/cache_mode --exec sh -c "echo %i > {}; "
ProtectSystem=strict
ProtectHome=yes
PrivateTmp=yes
ProtectControlGroups=yes
---
Oraz regułki polkit openhab.rules:
---
polkit.addRule(function(action, subject) {
if (action.id == "org.freedesktop.systemd1.manage-units") {
var unit = action.lookup("unit");
if (unit == "toggle-bcache@writethrough.service" ||
unit == "toggle-bcache@writeback.service") {
var verb = action.lookup("verb");
if (verb == "start" && subject.user == "openhabik") {
return polkit.Result.YES;
}
}
}
});
---
100 lines
2.2 KiB
Plaintext
100 lines
2.2 KiB
Plaintext
sitemap pbrk label="Szczegóły techniczne"
|
||
{
|
||
Frame {
|
||
Text item=dtSunset_Time
|
||
Text item=wClouds
|
||
Switch item=sHolidayVacancy
|
||
Switch item=sBCacheWriteback
|
||
}
|
||
|
||
Group label="Łączność" {
|
||
Frame label="Połączenie (LWT)" {
|
||
Switch item=rSONOFF01
|
||
Switch item=rSONOFF02
|
||
Switch item=rSONOFF03
|
||
Switch item=rSONOFF05
|
||
Switch item=rSONOFF06
|
||
Switch item=rSONOFF07
|
||
Switch item=rSONOFF08
|
||
Switch item=rD1MINI01
|
||
Switch item=rD1MINI02
|
||
Switch item=rD1MINI03
|
||
Switch item=rD1MINI04
|
||
Switch item=rD1MINI06
|
||
}
|
||
|
||
Frame label="Łaj faj" {
|
||
Chart item=wifi period=D refresh=300
|
||
}
|
||
}
|
||
|
||
Frame label="Spodziewane stany (automatyka)" {
|
||
Switch item=Mpd_quodlibet_StartStop_expected
|
||
Switch item=sOWFS01_expected
|
||
/* Switch item=sSONOFF02_expected */
|
||
}
|
||
|
||
Frame label="SONOFF01 – lampki kanapowe" {
|
||
Text item=wSONOFF01
|
||
Switch item=rSONOFF01
|
||
}
|
||
|
||
Frame label="SONOFF02 – lampka nad stołem" {
|
||
Text item=wSONOFF02
|
||
Switch item=rSONOFF02
|
||
}
|
||
|
||
Frame label="SONOFF03 – wiatrak łazienkowy" {
|
||
Text item=wSONOFF03
|
||
Switch item=rSONOFF03
|
||
}
|
||
Frame label="SONOFF06 – przedpokój przy drzwiach wejściowych" {
|
||
Switch item=sSONOFF06
|
||
Switch item=sSONOFF06KEY
|
||
Switch item=sSONOFF06LED
|
||
Switch item=sSONOFF06LEDtouch
|
||
Text item=wSONOFF06
|
||
Switch item=rSONOFF06
|
||
}
|
||
Frame label="D1MINI01 – okap" {
|
||
Text item=wD1MINI01
|
||
Switch item=rD1MINI01
|
||
Switch item=sD1MINI01_bieg1
|
||
Switch item=sD1MINI01_bieg2
|
||
Switch item=sD1MINI01_bieg3
|
||
}
|
||
|
||
Frame label="D1MINI02 - LED nad blatem w kuchni" {
|
||
Text item=wD1MINI02
|
||
Switch item=rD1MINI02
|
||
Switch item=sD1MINI02MOS
|
||
Switch item=sD1MINI02LEDS
|
||
}
|
||
|
||
Frame label="D1MINI03 - prototyp" {
|
||
Switch item=sD1MINI03_button_green
|
||
Switch item=sD1MINI03_light_green
|
||
Switch item=sD1MINI03_button_yellow
|
||
Switch item=sD1MINI03_light_yellow
|
||
Switch item=sD1MINI03_button_red
|
||
Switch item=sD1MINI03_light_red
|
||
Text item=wD1MINI03
|
||
Switch item=rD1MINI03
|
||
}
|
||
|
||
Frame label="D1MINI04 - odświeżacz w WC" {
|
||
Switch item=sWC_occupied
|
||
Text item=wD1MINI04
|
||
Switch item=rD1MINI04
|
||
Switch item=rSONOFF07
|
||
}
|
||
|
||
Frame label="D1MINI06 - przedpokój przy salonie" {
|
||
Switch item=sD1MINI06KEY
|
||
Text item=wD1MINI06
|
||
Switch item=rD1MINI06
|
||
}
|
||
|
||
|
||
}
|