Ik probeer een "activity" te maken in OpenHAB. Dit werkt maar het is zo traag dat het onbruikbaar is. Als ik een keuze maak tussen "MPD" of "Zotac" zit ik soms 30 seconden te wachten.
Doe ik iets fout of is het gewoon "zo" traag. Lees: is Domoticz een betere oplossing?
Hieronder de configs, het gaat dan voornamelijk om de rule "start activity mpd music"
De "Selection" zet een variabele "SelectActivity" die ik in de rules gebruik. Maar het lijkt wel alsof dit met timers allemaal loopt. Soms gaat het snel, meestal traag.
btw: ik draai het op een Windows laptop.
test.sitemap
test.items
test.rules
Doe ik iets fout of is het gewoon "zo" traag. Lees: is Domoticz een betere oplossing?
Hieronder de configs, het gaat dan voornamelijk om de rule "start activity mpd music"
De "Selection" zet een variabele "SelectActivity" die ik in de rules gebruik. Maar het lijkt wel alsof dit met timers allemaal loopt. Soms gaat het snel, meestal traag.
btw: ik draai het op een Windows laptop.
test.sitemap
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| sitemap test label="testje" { Frame label="DENON AV Reciever" icon="volume" { Switch item=KodiPlayPause Switch item=MPD_EG //Switch item=Wol_Zotac //Switch item=Wol_Denon //Switch item=Wol_PanasonicTV //Switch item=DenonPower Switch item=DenonMute Switch item=CallInProgress Selection item=SelectActivity label="Activity Selection" mappings=[0=MPD, 1=Zotac] } } |
test.items
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
| Switch MPD_EG "Musik Player" (Musik) { mpd="ON:mpd_id:play, OFF:mpd_id:stop" } Switch MPD_LivingRoom_StartStop "Start/Stop" { mpd="ON:mpd_id:play, OFF:mpd_id:stop" } Switch MPD_LivingRoom_NextTrack "Next track" { mpd="ON:mpd_id:next, OFF:mpd_id:prev" } // Switch Wol_Zotac "Zotac wol" (Status, Network) { wol="192.168.1.255#MAC" }" //Switch Wol_Denon "Denon wol" (Status, Network) { wol="192.168.1.255#MAC" }" //Switch Wol_PanasonicTV "PanasonicTV wol" (Status, Network) { wol="192.168.1.255#MAC" }" Switch DenonPower "Power" {denon="avr2000#PW"} Switch DenonMute "Mute" {denon="avr2000#MU"} String DenonCommand "Command" {denon="avr2000#COMMAND"} Switch CallInProgress "CallInProgress" Number SelectActivity "Activity" Switch KodiPlayPause "Play Pause Kodi" { xbmc=">[#KodiLivingRoom|Player.PlayPause]" } |
test.rules
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
| import org.openhab.core.library.types.* //import org.openhab.core.persistence.* import org.openhab.model.script.actions.* rule "incomming phonecall" when Item CallInProgress changed to "ON" then //sendCommand(DenonCommand, "MNMEN ON") logInfo ("Info", "Test ON") sendCommand(DenonCommand, "MUON") end rule "phonecall ended" when Item CallInProgress changed to "OFF" then //sendCommand(DenonCommand, "MNMEN ON") logInfo ("Info", "Test OFF") sendCommand(DenonCommand, "MUOFF") end rule "start activity mpd music" when Item SelectActivity changed to 0 then logInfo("Info", "hebben we nog muziek?") // Assume Raspberry Pi is running (does not support WoL) // Denon: turn on //sendCommand(DenonCommand, "PWON") // Denon: to "GAME" sendCommand(DenonCommand, "SIGAME") // Start MPD sendCommand(MPD_LivingRoom_NextTrack, ON) end rule "start activity movie zotac" when Item SelectActivity changed to 1 then logInfo("Info", "laten we een filmpje kijken?") //sendCommand(DenonCommand, "MUON") sendCommand(DenonCommand, "SIMPLAY") end |