Hi All,
I’ve had the official LG web(os) binding working perfectly for a while now, but have just decided to use the toast option, (ie send a message to the TV), in a couple of rules to push a message onto the TV.
However, it isn’t working and I’m not sure why. I know the thing / items / channels are working fine as everything else is ok…
Items:
Switch TV_LG_Power "TV Power" <television> { autoupdate="false", channel="lgwebos:WebOSTV:my_code_here:power" }
Switch TV_LG_Mute "TV Mute" { channel="lgwebos:lgwebos:WebOSTV:my_code_here:mute"}
Dimmer TV_LG_Volume "Volume [%S]" { channel="lgwebos:lgwebos:my_code_here:volume" }
Number TV_LG_VolDummy "VolumeUpDown"
Number TV_LG_ChannelNo "Channel [%d]" { channel="lgwebos:lgwebos:WebOSTV:my_code_here:channel" }
Number TV_LG_ChannelDummy "ChannelUpDown"
String TV_LG_Channel "Channel [%S]" { channel="lgwebos:lgwebos:WebOSTV:my_code_here:channelName"}
String TV_LG_Toast { channel="lgwebos:lgwebos:WebOSTV:my_code_here:toast"}
Switch TV_LG_Stop "Stop" { autoupdate="false", channel="lgwebos:lgwebos:WebOSTV:my_code_here:mediaStop" }
String TV_LG_Application "Application [%s]" { channel="lgwebos:lgwebos:WebOSTV:my_code_here:appLauncher"}
Player TV_LG_Player { channel="lgwebos:lgwebos:WebOSTV:my_code_here:mediaPlayer"}
Switch TV_LG_WOL "WOL" { wol="my broadcast IP#TV Mac" }
I set a dummy item to use on the basic UI as a switch for testing my rule:
Switch vTVMessage "TV Message"
And then here’s the basic rule:
rule "Send Message"
when
Item vTVMessage changed
then
actions.showToast("Hello World")
actions.showToast("http://opehabIP:8080/icon/energy?format=png","Hello World")
end
Thought I’d try just a simple rule to get it working. There are 2 different actions.showToast in the rule as I wanted to see if either / both ways worked and if there was a difference on the TV.
However, with one, both, either of the actions in the rule I still get the same error. Pretty unhelpful as far as I can see…
Rule 'Send Message': An error occurred during the script execution: index=0, size=0
I’ve trawled the forums to see what the error means and if others have had an issue. It does seem that the toast option is a bit hit and miss but I’d love some comments on if there is an error in the code, what the error means and if anyone else has had success with the toast method.
Rasp Pi 3, openhabian 2.4, LG webOS Binding / binding-lgwebos-2.4.0