I feel this might be a very basic issue, but I’ve been trying to get it to work a quite some time now with absolutely no success.
I have multiple Heos speakers and I want to control the grouping of them based on the input of the main speaker. I have created the group and can group/ungroup on a switch within OH.
Here’s the rule I trying to get to work, it’s really not anything fancy by the looks of it.
rule "Heos grouping"
when
Channel heos:player:86155633:-2045547701:Inputs triggered
then
if receivedEvent == "optical_in_1" {
HEOS_GroupAll.sendCommand(OFF)
}
end
As per the documentation for the HEOS binding the input returns a string, and I have confirmed the value is in fact ‘optical_in_1’ (Though it dosn’t work regardless ofthe value here).
HEOS_GroupAll is the switch I’m using to manually group/ungroup the speakers.
but if you’re running openHABian, just use option 21 in sudo openhabian-config to activate the “Log Viewer”, which will then provide you with the last entries of your logfiles in your browser http://YOUROPENHAB:9001
Thanks - it turns out Log Viewer was enabled so that works out nicely for me
I also found out that the rule didn’t even load due to missing quotes aroud the channel, after fixing that the entire rule seems not to evaluate anyway as there’s nothing logged by the LogInfo line. And then I ran out of time, so I’ll be testing some more later today
Alright I might very well be completely stupid, but I cannot for the life of me figure this out
Even this extremely simple rule does not provide a log (when viewed @9001):
rule "Heos grouping"
when
Channel "network:pingdevice:192_168_87_188:online" triggered
then
logInfo("Heos Logging", receivedEvent)
end
The rule file is loading as expected. the channel is basically pinging the IP of my TV to check if it’s online. And whenever it is triggered I would expect a log - but that does not happen.
AFAIR “triggered” only applies to specific channels of only a handful bindings (e.g. astro), and network doesn’t have that option.
try linking an item to the channel
Item "HEON_DEVICE" received command
or
Item "HEON_DEVICE" changed
but: what is your goal, which you’d like to achieve with that?
What I’m aiming at here is that when my Heos Ceol (Speaker) is using source “optical_in_1” then it should ungroup the Heos group making the Heos Ceol be the only speaker active. When using any other source it should regroup. (See this thread for more info: Heos - group and ungroup rule)
Since listening to the heos player channel didn’t work* I wanted it to ungroup whenever my TV is turned on. This is the second best solution, but I would strongly prefer the checking the input source of the Heos Ceol if possible.
As far as I remember, I have tried the options suggested, but when I get back home I’ll give it another go
*though I now know that the rule didn’t fire at all, so it might actually work once i figure out how to get the rule to fire