Evening everyone,
I am trying to integrate my LG smart tv with openhab (version 2.3.0). From the LG website I got information that TV model has Netcast 3.0 platform (not WebOS) so I installed the correct LG TV binding.
lgtv.cfg was amended as per manual:
# The ip address of the lgtv (required)
#<lgtvId1>.host=
lgtv:lg.host=192.168.1.200
# The TCP port to use (optional, defaults to 8080)
#<lgtvId1>.port=
lgtv:lg.port=8080
# The the pairkey / if it's wrong the device shows the right pairkey
# at every connection attempt
#<lgtvId1>.pairkey=
lgtv:lg.pairkey=
# The TCP port address of the openhab system to receive lgtv status messages
# (only first occurrence is used for all TVs)
#<lgtvId1>.serverport=
lgtv:lg.serverport=8080
# The location to put XML files with the information of availiable
# channels and apps (optional)
#<lgtvId1>.xmldatafiles=./
lgtv:lg.xmldatafiles=./
# The check alive interval (optional, defaults to 60secs)
#<lgtvId1>.checkalive=
lgtv:lg.checkalive=60
Then I used the sitemap and items from manual:
sitemap
}
Frame label="Tv" {
Switch item=LgTvConnStatus
Switch item=LgTvPower mappings=[ON="Power Off"]
Setpoint item=LgTvChannel minValue=0 maxValue=300 step=1.0
Setpoint item=LgTvVolume minValue=0 maxValue=100 step=1.0
Switch item=LgTvMute mappings=[ON="Mute", OFF="Mute"]
Text item=LgTvChannelName
Selection item=LgTvChannel mappings=[1="ORF1",2="ORF2"]
Switch item=LgTvAppExecute label="AppExecute" mappings=[Skype=Skype, Spotify=Spotify]
Switch item=LgTvAppTerminate label="AppTerminate" mappings=[Skype=Skype, Spotify=Spotify]
}
}
items
/* LGTV
Switch LgTvPower "Power Command" (GF_Living) {lgtv="ON:lg:POWER"}
Switch LgTvMute "Mute" (GF_Living) {lgtv="ON:lg:KEY_MUTE, OFF:lg:KEY_MUTE"}
Number LgTvVolume "lgVolume [%.1f]" (GF_Living) {lgtv="INIT:lg:VOLUME_CURRENT, INCREASE:lg:VOLUME_UP, DECREASE:lg:VOLUME_DOWN, *:lg:VOLUME_SET"}
Number LgTvChannel "Channel [%.1f]" (GF_Living) {lgtv="INIT:lg:CHANNEL_CURRENTNUMBER, INCREASE:lg:CHANNEL_UP, DECREASE:lg:CHANNEL_DOWN, *:lg:CHANNEL_SET" }
String LgTvChannelName "Channelname [%s]" (GF_Living) {lgtv="INIT:lg:CHANNEL_CURRENTNAME"}
String LgTvGetChannels "getchannels [%s]" (GF_Living) {lgtv="INIT:lg:GET_CHANNELS, ON:lg:GET_CHANNELS"}
String LgTvGetApps "getapps [%s]" (GF_Living) {lgtv="INIT:lg:GET_APPS, ON:lg:GET_APPS"}
String LgTvAppExecute "excuteapp" (GF_Living) {lgtv="*:lg:APP_EXECUTE"}
String LgTvAppTerminate "terminateapp" (GF_Living) {lgtv="*:lg:APP_TERMINATE"}
Switch LgTvConnStatus "connstatus " (GF_Living) {lgtv="*:lg:CONNECTION_STATUS"}
I haven`t restarted my RPI at this point yet - not sure if this should be performed right now or this step is not required.
On openhab app I can`t see any items listed under TV, there is only empty “TV” frame. Not sure exactly where this problem is lying, checking syntax everything appears to be correct.
Checking openhab log I can see the following errors. How do I get per key ?
Searching for an answer on community, I can`t find anyone who would have success with this binding so if we could find solution this would be great tutorial for anyone who is trying to use it. I hope I can find someone who already experienced similar issues before.
Many thanks