I’m testing the version 2.5.0 Snapshot so I can avail the latest functionalities from the LG webOS bindings and trying to pass the Up, Down, Left, Right, etc. keys, but getting a warning message and the keys don’t work.
2019-11-25 19:51:49.464 [WARN ] [rest.core.internal.item.ItemResource] - Received HTTP POST request at 'items/LGWebOSTVUJ634VArrows' with an invalid status value '0'.
rule "LGControlSelect"
when Item LGWebOSTVUJ634VArrows received command
then
val actions = getActions("lgwebos","lgwebos:WebOSTV:02997059-4172-8985-10a4-f07c879fbf4c")
if(null === actions) {
logInfo("actions", "Actions not found, check thing ID")
return
}
switch receivedCommand{
case 0: actions.sendButton("UP")
case 1: actions.sendButton("DOWN")
case 2: actions.sendButton("LEFT")
case 3: actions.sendButton("RIGHT")
}
end
But the rule is never executed. What am I doing wrong here?
The thingid in Paper ui matches the thingid in my rule.
Here is my item.
Number LGTVKeyNavigationDummy
Here is my rule.
rule "LG TV Key Navigation"
when Item LGTVKeyNavigationDummy received command
then
val actions = getActions("lgwebos","lgwebos:WebOSTV:088e58e6-d74c-4aae-bfaa-1e46281b1d85")
if(null === actions) {
logInfo("actions", "Actions not found, check thing ID")
return
}
switch receivedCommand{
case 0: actions.sendButton("UP")
case 1: actions.sendButton("DOWN")
case 2: actions.sendButton("LEFT")
case 3: actions.sendButton("RIGHT")
}
end
hm, then maybe restart openhab… I have not other idea - this has been working stable for quite some time now. no change on that front in the recent updates.
Ok. Thank you for your help. I rebooted my Raspberry Pi and that didn’t work. Do you think reinstalling OpenHAB all together would help? Otherwise I’ll do a workaround with my Harmony remote.
I don’t think there is a need to re-install OH.
I would suggest to check the log and see if there are any debug messages. The documentation of the binding describes how to enable debug logging via karaf.
Yeah, had it defined as a Switch instead of Number
Only problem I have now is the keys that seem not correct. Down works fine, but Up, Left and Right don’t and seem to be triggering other actions. Need to test this further.
I’ve have a strange situation with this binding.
When I turn the TV off with the remote it take for about 5 minutes before openhab changes the “tv power” item to the state OFF. I read here that this is normal behaviour.
The problem is now that when a “OFF” command is send to the “tv power” item in this 5 minutes timeframe, the TV sometimes turns ON again? Why is this happening when sending a “OFF” command?
I use this rule:
rule "TV room OFF (with Nikobus button)"
when
Item BP24_2D_L received update ON
then
RGBW_TV_RGB.sendCommand(OFF)
if (LG_TV_TVroom_Power.state == ON) {
LG_TVroom_Power.sendCommand(OFF)
}
end
So when I turned my TV OFF with the remote and this rule gets executed sometimes the TV turns back ON?
if I use lgwebos binding on openhab installed on pc everything is ok
if I use lgwebos binding on openhabian installed on raspberry it work only first time (when I power on again the TV this binding do not work)
I see that binding configuration of thing on PC is host and key…
on raspberry only deviceid can be configured
just wanted to share my super easy rule to change tv channel using Google Assistant,
I used to do it with IFTTT, but now that IFTTT cant connect with openHab anymore, here is an even better easy solution.
Have an item as DIMMER named “channel” (or your own language version) with [“lighting”] tag
Dimmer Tv_channel "channel" ["Lighting"]
And the rule:
rule "Change TV channel"
when
Item Tv_channel changed
then
var channelNo = Tv_channel.state.toString
LG_TV0_ChannelNo.sendCommand(channelNo)
now just say “hey google, channel 12” and it’ll instantly change to the desired channel