[SOLVED] LG TV binding Netcast 3.0 issue connecting with TV

Guys, been trying to group items in order to display all data for TV under one frame but struggling. Done it before with my server information but this time is causing me a lot of problems.
How should I adjust sitemap and items to show everything under separate frame?

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:lgtv:POWER"}
Switch LgTvMute                         "Mute"                   (GF_Living)           {lgtv="ON:lgtv:KEY_MUTE, OFF:lgtv:KEY_MUTE"}
Number LgTvVolume                       "lgVolume [%.1f]"        (GF_Living)           {lgtv="INIT:lgtv:VOLUME_CURRENT, INCREASE:lgtv:VOLUME_UP, DECREASE:lgtv:VOLUME_DOWN, *:lgtv:VOLUME_SET"}
Number LgTvChannel                      "Channel [%.1f]"         (GF_Living)            {lgtv="INIT:lgtv:CHANNEL_CURRENTNUMBER, INCREASE:lgtv:CHANNEL_UP, DECREASE:lgtv:CHANNEL_DOWN, *:lgtv:CHANNEL_SET" }
String LgTvChannelName                  "Channelname [%s]"       (GF_Living)            {lgtv="INIT:lgtv:CHANNEL_CURRENTNAME"}
String LgTvGetChannels                  "getchannels [%s]"       (GF_Living)            {lgtv="INIT:lgtv:GET_CHANNELS, ON:lgtv:GET_CHANNELS"}
String LgTvGetApps                      "getapps [%s]"           (GF_Living)           {lgtv="INIT:lgtv:GET_APPS, ON:lgtv:GET_APPS"}
String LgTvAppExecute                   "excuteapp"              (GF_Living)           {lgtv="*:lgtv:APP_EXECUTE"}
String LgTvAppTerminate                 "terminateapp"           (GF_Living)            {lgtv="*:lgtv:APP_TERMINATE"}
Switch LgTvConnStatus                   "connstatus "            (GF_Living)            {lgtv="*:lgtv:CONNECTION_STATUS"}  

Tried creating new group called TV and then changing GF_Living for TV but doesn`t like it.
Sorry to be a pain.

If you are using openHAB as a service and send a sudo reboot command the system will close the services before booting. A least it should.

Could you post the whole sitemap, please?

Sure

sitemap home label="House"
{
	Frame {
		Group item=gFF label="First Floor" icon="firstfloor"
		Group item=gGF label="Ground Floor" icon="groundfloor"
		Group item=Outdoor icon="garden" 
			}
	Frame label="Internal Conditions"	{
	    Text item=Temperature icon="temperature" {
		    Frame label="Temperatures" {
			    Text item=Temperature_GF_Living
				Switch item=Temperature_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
				Chart item=Temperature_GF_Living period=h refresh=6000 visibility=[Temperature_GF_Living_Period==0, Temperature_GF_Living_Period=="Uninitialized"]
				Chart item=Temperature_GF_Living period=D refresh=30000 visibility=[Temperature_GF_Living_Period==1]
				Chart item=Temperature_GF_Living period=W refresh=30000 visibility=[Temperature_GF_Living_Period==2]
								}
				}
		Text item=Humidity icon="humidity" {
		    Frame label="Humidities" {
			    Text item=Humidity_GF_Living
				Switch item=Humidity_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
				Chart item=Humidity_GF_Living period=h refresh=6000 visibility=[Humidity_GF_Living_Period==0, Humidity_GF_Living_Period=="Uninitialized"]
				Chart item=Humidity_GF_Living period=D refresh=30000 visibility=[Humidity_GF_Living_Period==1]
				Chart item=Humidity_GF_Living period=W refresh=30000 visibility=[Humidity_GF_Living_Period==2]
															}
									}
							}
		Frame label="Weather" {
		Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="Uninitialized"="lightgray",Weather_LastUpdate>90="lightgray",>25="orange",>15="green",>5="orange",<=5="blue"] {
			Frame {
				Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
				Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
				Text item=Weather_Humidity
				Text item=Weather_Humidex
                Text item=Weather_Pressure
				Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
			}
			Frame {
				Switch item=Weather_Chart_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
				Chart item=Weather_Chart period=h refresh=6000 visibility=[Weather_Chart_Period==0, Weather_Chart_Period=="Uninitialized"]
				Chart item=Weather_Chart period=D refresh=30000 visibility=[Weather_Chart_Period==1]
				Chart item=Weather_Chart period=W refresh=30000 visibility=[Weather_Chart_Period==2]
							}
			}
		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]
				            }
			}
    	Frame label="Date" {
		Text item=Date
		Text item=Time
			}
	Frame label="System"	{
	    Group item=Server icon="settings" 
	    						    }
	Frame label="Overview" {
		Text label="Group Overview" icon="group" {
			Switch item=Lights mappings=[OFF="All Off"]
			Group item=Heating
            Group item=Windows
			Group item=Doors
			Group item=Temperature
				}
		Text label="Widget Overview" icon="chart" {
	Frame label="Binary Widgets" {
				Switch item=DemoSwitch label="Toggle Switch"
				Switch item=DemoSwitch label="Button Switch" mappings=[ON="On"]
			}
	Frame label="Discrete Widgets" {
				Selection item=Scene_General label="Scene Selection" mappings=[0=off, 1=TV, 2=Dinner, 3=Reading]
				Switch item=Scene_General label="Scene" mappings=[1=TV, 2=Dinner, 3=Reading]
				Setpoint item=Temperature_Setpoint minValue=16 maxValue=28 step=0.5
			}
	Frame label="Percent-based Widgets" {
				Slider item=DimmedLight switchSupport
				Colorpicker item=RGBLight icon="slider"
				Switch item=DemoShutter
				Slider item=DemoBlinds
			}
	Frame label="Map/Location" {
				Mapview item=DemoLocation height=10
			}
		}
		Text label="Multimedia" icon="video" {
	Frame label="Radio Control" {
				Selection item=Radio_Station mappings=[0=off, 1=HR3, 2=SWR3, 3=FFH]
				Slider item=Volume
			}
	Frame label="Multimedia Widgets" {
				Image url="http://localhost:8080/images/splash-ipad-h.png" label="openHAB" {
					Text label="http://www.openHAB.org" icon="icon"
				}
			}
		}
	}
}


I fixed up your indents so it’s readeable:
In the frame “Weather” you were trying to put two text items ans a frame. You can’t do that. It needs to be all frames or all items but not both.
Because your indents were all over the place you tried to put the frame in the wrong place:

sitemap home label="House"
{
    Frame {
        Group item=gFF label="First Floor" icon="firstfloor"
        Group item=gGF label="Ground Floor" icon="groundfloor"
        Group item=Outdoor icon="garden" 
    }
    Frame label="Internal Conditions" {
        Text item=Temperature icon="temperature" {
            Frame label="Temperatures" {
                Text item=Temperature_GF_Living
                Switch item=Temperature_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Temperature_GF_Living period=h refresh=6000 visibility=[Temperature_GF_Living_Period==0, Temperature_GF_Living_Period=="Uninitialized"]
                Chart item=Temperature_GF_Living period=D refresh=30000 visibility=[Temperature_GF_Living_Period==1]
                Chart item=Temperature_GF_Living period=W refresh=30000 visibility=[Temperature_GF_Living_Period==2]
            }
        }
        Text item=Humidity icon="humidity" {
            Frame label="Humidities" {
                Text item=Humidity_GF_Living
                Switch item=Humidity_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Humidity_GF_Living period=h refresh=6000 visibility=[Humidity_GF_Living_Period==0, Humidity_GF_Living_Period=="Uninitialized"]
                Chart item=Humidity_GF_Living period=D refresh=30000 visibility=[Humidity_GF_Living_Period==1]
                Chart item=Humidity_GF_Living period=W refresh=30000 visibility=[Humidity_GF_Living_Period==2]
            }
        }
    }
    Frame label="Weather" {
        Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="Uninitialized"="lightgray",Weather_LastUpdate>90="lightgray",>25="orange",>15="green",>5="orange",<=5="blue"] {
            Frame {
                Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
                Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
                Text item=Weather_Humidity
                Text item=Weather_Humidex
                Text item=Weather_Pressure
                Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
            }
            Frame {
                Switch item=Weather_Chart_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Weather_Chart period=h refresh=6000 visibility=[Weather_Chart_Period==0, Weather_Chart_Period=="Uninitialized"]
                Chart item=Weather_Chart period=D refresh=30000 visibility=[Weather_Chart_Period==1]
                Chart item=Weather_Chart period=W refresh=30000 visibility=[Weather_Chart_Period==2]
            }
        }
    }
    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]
    }
    Frame label="Date" {
        Text item=Date
        Text item=Time
    }
    Frame label="System" {
        Group item=Server icon="settings" 
    }
    Frame label="Overview" {
        Text label="Group Overview" icon="group" {
            Switch item=Lights mappings=[OFF="All Off"]
            Group item=Heating
            Group item=Windows
            Group item=Doors
            Group item=Temperature
        }
        Text label="Widget Overview" icon="chart" {
            Frame label="Binary Widgets" {
                Switch item=DemoSwitch label="Toggle Switch"
                Switch item=DemoSwitch label="Button Switch" mappings=[ON="On"]
            }
            Frame label="Discrete Widgets" {
                Selection item=Scene_General label="Scene Selection" mappings=[0=off, 1=TV, 2=Dinner, 3=Reading]
                Switch item=Scene_General label="Scene" mappings=[1=TV, 2=Dinner, 3=Reading]
                Setpoint item=Temperature_Setpoint minValue=16 maxValue=28 step=0.5
            }
            Frame label="Percent-based Widgets" {
                Slider item=DimmedLight switchSupport
                Colorpicker item=RGBLight icon="slider"
                Switch item=DemoShutter
                Slider item=DemoBlinds
            }
            Frame label="Map/Location" {
                Mapview item=DemoLocation height=10
            }
        }
    }
    Text label="Multimedia" icon="video" {
        Frame label="Radio Control" {
            Selection item=Radio_Station mappings=[0=off, 1=HR3, 2=SWR3, 3=FFH]
            Slider item=Volume
        }
        Frame label="Multimedia Widgets" {
            Image url="http://localhost:8080/images/splash-ipad-h.png" label="openHAB" {
                Text label="http://www.openHAB.org" icon="icon"
            }
        }
    }
}

Many thanks guys, all works now as it should. Great work.

Shame that LgTV shuts down the network port so only power off is availiable. Seen this post this afternoon someone has done it with @rlkoshak help but this would only work for webOS platform not Netcast. It`s worth checking.

1 Like

Evening.

Just follow up with some feedback on this binding after few days of using it. Generally when the TV is on it works. As per docs power on command will never work which I have to accept for now. I can change channels, volume, mute and turn off unit.

When comes to tv status this doesn’t seems to work at all. Strangely I can toggle the switch at any time (turn on or off) and it will not be overwritten. Assuming that when tv is on TV status should change to ON position, when device is powered off it should change to off state.

tv%20status

Having Tv status feedback would be very helpful for me as I would like to start monitoring daily usage of tv.

Can anything be done with this ? I don`t expect there is any syntax error in my configs.

Items:

Switch LgTvConnStatus                   "TV Status "                     {lgtv="*:lgtv:CONNECTION_STATUS"}  

sitemap:

Switch item=LgTvConnStatus

Do you see anything in the logs about this item?

Hi,

I can`t see any errors related to this item. Below is the copy of the log file since this morning.
When I turned on tv this afternoon I was watching how quickly openhab will update data from this device. Sadly there was no update at all for number of minutes. Only when I tried to change channel on tv from openhab , data refreshed straight away (Channel Number,Channel Name & Volume). I believe my refresh rate is currently set to 60 seconds. When changing channels or volume it sends command straight away without any delay.
Can you spot anything suspicious in logs?

2018-12-13 06:07:56.389 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:07:59.527 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:07:59.531 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:18:17.823 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:18:20.966 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:18:20.969 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:18:21.223 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:18:23.793 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:18:24.086 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:18:24.086 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:18:24.088 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:18:24.088 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:19:02.620 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:19:05.767 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:19:05.769 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:19:05.941 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:19:08.887 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:19:08.890 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 06:19:08.895 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 06:19:12.007 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/pairing
2018-12-13 06:19:12.010 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=#error/connect-1 connectionstatus=CS_NOTCONNECTED
2018-12-13 13:06:48.384 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 13:06:48.402 [INFO ] [binding.lgtv.internal.LgtvConnection] - lgtv connectionstatus of ip=192.168.1.19 changed from CS_NOTCONNECTED to CS_PAIRED
2018-12-13 13:06:48.729 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=200 successconnectionstatus=CS_PAIRED
2018-12-13 13:07:34.644 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 10123091 failed: null
2018-12-13 13:07:52.008 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 10123210 failed: null
2018-12-13 13:10:47.682 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 10124565 failed: null
2018-12-13 13:21:21.810 [WARN ] [io.openhabcloud.internal.CloudClient] - Jetty request 10128751 failed: null
2018-12-13 20:08:21.151 [ERROR] [binding.lgtv.internal.LgtvConnection] - IO Exception at Connection to: http://192.168.1.19:8080/udap/api/data?target=volume_info
2018-12-13 20:08:21.155 [INFO ] [binding.lgtv.internal.LgtvConnection] - lgtv connectionstatus of ip=192.168.1.19 changed from CS_PAIRED to CS_NOTCONNECTED
2018-12-13 20:08:21.166 [ERROR] [binding.lgtv.internal.LgtvConnection] - Could not send command to device on 192.168.1.19:8080 : {}
java.lang.NumberFormatException: For input string: "#notfound"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:?]
	at java.lang.Integer.parseInt(Integer.java:569) [?:?]
	at java.lang.Integer.parseInt(Integer.java:615) [?:?]
	at org.openhab.binding.lgtv.lginteraction.LgTvInteractor.handlevolchangeeasy(LgTvInteractor.java:260) [227:org.openhab.binding.lgtv:1.12.0]
	at org.openhab.binding.lgtv.internal.LgtvConnection.send(LgtvConnection.java:292) [227:org.openhab.binding.lgtv:1.12.0]
	at org.openhab.binding.lgtv.internal.LgtvBinding.internalReceiveCommand(LgtvBinding.java:175) [227:org.openhab.binding.lgtv:1.12.0]
	at org.openhab.core.binding.AbstractBinding.receiveCommand(AbstractBinding.java:94) [199:org.openhab.core.compat1x:2.3.0]
	at org.openhab.core.events.AbstractEventSubscriber.handleEvent(AbstractEventSubscriber.java:45) [199:org.openhab.core.compat1x:2.3.0]
	at org.apache.felix.eventadmin.impl.handler.EventHandlerProxy.sendEvent(EventHandlerProxy.java:415) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.HandlerTask.runWithoutBlacklistTiming(HandlerTask.java:82) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.SyncDeliverTasks.execute(SyncDeliverTasks.java:104) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at org.apache.felix.eventadmin.impl.tasks.AsyncDeliverTasks$TaskExecuter.run(AsyncDeliverTasks.java:166) [3:org.apache.karaf.services.eventadmin:4.1.5]
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) [?:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:?]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:?]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:?]
	at java.lang.Thread.run(Thread.java:748) [?:?]
2018-12-13 20:08:26.399 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED
2018-12-13 20:08:26.412 [INFO ] [binding.lgtv.internal.LgtvConnection] - lgtv connectionstatus of ip=192.168.1.19 changed from CS_NOTCONNECTED to CS_PAIRED
2018-12-13 20:08:26.812 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=200 successconnectionstatus=CS_PAIRED
2018-12-13 20:28:22.879 [INFO ] [el.core.internal.ModelRepositoryImpl] - Validation issues found in configuration model 'home.sitemap', using it anyway:
Sitemap should contain either only frames or none at all
2018-12-13 20:28:22.925 [INFO ] [el.core.internal.ModelRepositoryImpl] - Refreshing model 'home.sitemap'

Validation issues found in configuration model 'home.sitemap', using it anyway:
Sitemap should contain either only frames or none at all

I would try to fix the obvious error first, your sitemap. Not sure if that’s related to the others but it’s something that needs to be corrected.

Yes, you are right it will be worth fixing this first even if this is not related to issue.
However I can`t find any issues with my sitemap at the moment, couple days ago Vincent corrected few errors for me which were related to frames.
Posting my current sitemap below , let me know if you spot anything which could be causing this error.

sitemap home label="House"
{
    Frame {
        Group item=gFF label="First Floor" icon="firstfloor"
        Group item=gGF label="Ground Floor" icon="groundfloor"
        Group item=Outdoor icon="garden" 
    }
    Frame label="Internal Conditions" {
        Text item=Temperature icon="temperature" {
            Frame label="Temperatures" {
                Text item=Temperature_GF_Living
                Switch item=Temperature_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Temperature_GF_Living period=h refresh=6000 visibility=[Temperature_GF_Living_Period==0, Temperature_GF_Living_Period=="Uninitialized"]
                Chart item=Temperature_GF_Living period=D refresh=30000 visibility=[Temperature_GF_Living_Period==1]
                Chart item=Temperature_GF_Living period=W refresh=30000 visibility=[Temperature_GF_Living_Period==2]
            }
        }
        Text item=Humidity icon="humidity" {
            Frame label="Humidities" {
                Text item=Humidity_GF_Living
                Switch item=Humidity_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Humidity_GF_Living period=h refresh=6000 visibility=[Humidity_GF_Living_Period==0, Humidity_GF_Living_Period=="Uninitialized"]
                Chart item=Humidity_GF_Living period=D refresh=30000 visibility=[Humidity_GF_Living_Period==1]
                Chart item=Humidity_GF_Living period=W refresh=30000 visibility=[Humidity_GF_Living_Period==2]
            }
        }
    }
    Frame label="Weather" {
        Text item=Weather_Temperature valuecolor=[Weather_LastUpdate=="Uninitialized"="lightgray",Weather_LastUpdate>90="lightgray",>25="orange",>15="green",>5="orange",<=5="blue"] {
            Frame {
                Text item=Weather_Temp_Max valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
                Text item=Weather_Temp_Min valuecolor=[>25="orange",>15="green",>5="orange",<=5="blue"]
                Text item=Weather_Humidity
                Text item=Weather_Humidex
                Text item=Weather_Pressure
                Text item=Weather_LastUpdate visibility=[Weather_LastUpdate>30] valuecolor=[Weather_LastUpdate>120="orange", Weather_LastUpdate>300="red"]
            }
            Frame {
                Switch item=Weather_Chart_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Weather_Chart period=h refresh=6000 visibility=[Weather_Chart_Period==0, Weather_Chart_Period=="Uninitialized"]
                Chart item=Weather_Chart period=D refresh=30000 visibility=[Weather_Chart_Period==1]
                Chart item=Weather_Chart period=W refresh=30000 visibility=[Weather_Chart_Period==2]
            }
        }
    }
    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="Unmute", OFF="Mute"]
        Text item=LgTvChannelName
        Selection item=LgTvChannel mappings=[1="BBC 1",2="BBC 2" ,3="ITV" ,4="Channel 4" ,5="Channel 5" ,6="ITV 2" ,9="BBC 4" ,10="ITV 3" ,14="More 4" ,15="Film4" ,18="MUSIC" ,24="ITV 4"]
        Switch item=LgTvAppExecute label="AppExecute" mappings=[BBCiPlayer=BBCiPlayer, Spotify=Spotify]
        Switch item=LgTvAppTerminate label="AppTerminate" mappings=[BBCiPlayer=BBCiPlayer, Spotify=Spotify]
    }
    Frame label="Date" {
        Text item=Date
        Text item=Time
    }
    Frame label="System" {
        Group item=Server icon="settings" 
	}
    Frame label="Overview" {
        Text label="Group Overview" icon="group" {
            Switch item=Lights mappings=[OFF="All Off"]
            Group item=Heating
            Group item=Windows
            Group item=Doors
            Group item=Temperature
        }
        Text label="Widget Overview" icon="chart" {
            Frame label="Binary Widgets" {
                Switch item=DemoSwitch label="Toggle Switch"
                Switch item=DemoSwitch label="Button Switch" mappings=[ON="On"]
            }
            Frame label="Discrete Widgets" {
                Selection item=Scene_General label="Scene Selection" mappings=[0=off, 1=TV, 2=Dinner, 3=Reading]
                Switch item=Scene_General label="Scene" mappings=[1=TV, 2=Dinner, 3=Reading]
                Setpoint item=Temperature_Setpoint minValue=16 maxValue=28 step=0.5
            }
            Frame label="Percent-based Widgets" {
                Slider item=DimmedLight switchSupport
                Colorpicker item=RGBLight icon="slider"
                Switch item=DemoShutter
                Slider item=DemoBlinds
            }
            Frame label="Map/Location" {
                Mapview item=DemoLocation height=10
            }
        }
    }
    Text label="Multimedia" icon="video" {
        Frame label="Radio Control" {
            Selection item=Radio_Station mappings=[0=off, 1=HR3, 2=SWR3, 3=FFH]
            Slider item=Volume
        }
        Frame label="Multimedia Widgets" {
            Image url="http://localhost:8080/images/splash-ipad-h.png" label="openHAB" {
                Text label="http://www.openHAB.org" icon="icon"
            }
        }
    }
}

It needs to be all frames or all items not both. Below you have a Frame with both a Text item and another Frame all within the first Frame. Try commenting out those issues, using //, and see if that fixes the error. This is just the first example there are a few more in the sitemap that are similar.

Frame label="Internal Conditions" {
        Text item=Temperature icon="temperature" {
            Frame label="Temperatures" {
                Text item=Temperature_GF_Living
                Switch item=Temperature_GF_Living_Period label="Chart Period" mappings=[0="Hour", 1="Day", 2="Week"]
                Chart item=Temperature_GF_Living period=h refresh=6000 visibility=[Temperature_GF_Living_Period==0, Temperature_GF_Living_Period=="Uninitialized"]
                Chart item=Temperature_GF_Living period=D refresh=30000 visibility=[Temperature_GF_Living_Period==1]
                Chart item=Temperature_GF_Living period=W refresh=30000 visibility=[Temperature_GF_Living_Period==2]
            }
        }

Thanks @H102 . I tried commenting out (//) some of the lines and then also entire frame temperature under internal conditions but every time I do that I get error and my sitemap will not load at all.
This is what I was trying to achieve with frame label “Internal Conditions”. On first page just overview with display of average temperature and average humidity inside house.

Internal

Then going inside each section (temperature or humidity) listing current temperature/humidity with chart for every room.

Temp

Is there any better way to achieve the same result ?

Hi,
Have you managed to get TV Status to work?
i have this binding for a long time but this item never worked and now i need rules depending on it.
i have some logs regarding connection

2019-04-10 21:28:28.738 [INFO ] [binding.lgtv.internal.LgtvConnection] - lgtv connectionstatus of ip=192.168.0.48 changed from CS_NOTCONNECTED to CS_PAIRED
2019-04-10 21:28:28.757 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=200 successconnectionstatus=CS_PAIRED
2019-04-10 21:53:37.428 [ERROR] [org.apache.felix.configadmin ] - [org.osgi.service.event.EventHandler, org.osgi.service.cm.ManagedService, id=492, bundle=251/mvn:org.openhab.binding/org.openhab.binding.lgtv/1.13.0]: Unexpected problem updating configuration org.openhab.lgtv
at org.openhab.binding.lgtv.internal.LgtvBinding.updated(LgtvBinding.java:307) ~[?:?]

Hi @Marian_Grigore
This TV status provided by this binding doesn’t seems to work. So I had work around that. What have I done is I`m using Network binding to detect TV status and this is mapped in my sitemap. Works very well.

Hi i followed your and now i have this error

2019-04-14 00:28:33.015 [INFO ] [lgtv.lginteraction.LgTvMessageReader] - Started LgTv Servlet at /udap/api/event

2019-04-14 00:28:33.019 [ERROR] [binding.lgtv.internal.LgtvConnection] - sendtotv but connection status is CS_NOTCONNECTED

2019-04-14 00:28:33.112 [ERROR] [ab.binding.lgtv.internal.LgtvBinding] - cannot find device lgtv

2019-04-14 00:28:33.116 [ERROR] [ab.binding.lgtv.internal.LgtvBinding] - cannot find device lgtv

2019-04-14 00:28:33.126 [ERROR] [ab.binding.lgtv.internal.LgtvBinding] - cannot find device lgtv

2019-04-14 00:28:33.130 [ERROR] [ab.binding.lgtv.internal.LgtvBinding] - cannot find device lgtv

2019-04-14 00:28:33.135 [ERROR] [ab.binding.lgtv.internal.LgtvBinding] - cannot find device lgtv

2019-04-14 00:28:33.217 [INFO ] [binding.lgtv.internal.LgtvConnection] - lgtv connectionstatus of ip=192.168.0.106 changed from CS_NOTCONNECTED to CS_PAIRED

2019-04-14 00:28:33.220 [INFO ] [binding.lgtv.internal.LgtvConnection] - sendpairkey with result=200 successconnectionstatus=CS_PAIRED

How can i resolve?

Hi.
Post your configs and together we can figure it out.
Cheers

Now it works.
I solved rebooting the system.
But is it possible to turn on the TV?
Because i can command the Tv but when i turn off the tv i cannot to turn on

I can’t turn on my model as well. If your TV supports WOL (Wake On LAN) then there is possibility to do it.

Now i have a problem to update in real time CHANNEL_CURRENTPROG.
i defined it so

Switch LgTvPower                        "Power Command"                 (GF_Living)     {lgtv="ON:wohnzimmer:POWER"}
Switch LgTvMute                         "Mute"                          (GF_Living)     {lgtv="ON:wohnzimmer:KEY_MUTE, OFF:wohnzimmer:KEY_MUTE"}
Number LgTvVolume                       "lgVolume [%.1f]"               (GF_Living)     {lgtv="INIT:wohnzimmer:VOLUME_CURRENT, INCREASE:wohnzimmer:VOLUME_UP, DECREASE:wohnzimmer:VOLUME_DOWN, *:wohnzimmer:VOLUME_SET"}
Number LgTvChannel                      "Channel [%.1f]"                (GF_Living)     {lgtv="INIT:wohnzimmer:CHANNEL_CURRENTNUMBER, INCREASE:wohnzimmer:CHANNEL_UP, DECREASE:wohnzimmer:CHANNEL_DOWN, *:wohnzimmer:CHANNEL_SET" }
String LgTvChannelName                  "Channelname [%s]"              (GF_Living)     {lgtv="INIT:wohnzimmer:CHANNEL_CURRENTNAME"}
String LgTvGetChannels                  "getchannels [%s]"              (GF_Living)     {lgtv="INIT:wohnzimmer:GET_CHANNELS, ON:wohnzimmer:GET_CHANNELS"}
String LgTvGetApps                      "getapps [%s]"                  (GF_Living)     {lgtv="INIT:wohnzimmer:GET_APPS, ON:wohnzimmer:GET_APPS"}
String LgTvProg                         "prog [%s]"                     (GF_Living)     {lgtv="INIT:wohnzimmer:CHANNEL_CURRENTPROG"}
String LgTvAppExecute                   "excuteapp"                     (GF_Living)     {lgtv="*:wohnzimmer:APP_EXECUTE"}
String LgTvAppTerminate                 "terminateapp"                  (GF_Living)     {lgtv="*:wohnzimmer:APP_TERMINATE"}
Switch LgTvConnStatus                   "connstatus "                   (GF_Living)     {lgtv="*:wohnzimmer:CONNECTION_STATUS"}
Switch LgTvRecord                       "Record"                        (GF_Living)     {lgtv="ON:wohnzimmer:KEY_RECORD"}
Switch LgTvUp                           "Up"                            (GF_Living)     {lgtv="ON:wohnzimmer:KEY_UP"}
Switch LgTvDown                         "Down"                          (GF_Living)     {lgtv="ON:wohnzimmer:KEY_DOWN"}
Switch LgTvLeft                         "Left"                          (GF_Living)     {lgtv="ON:wohnzimmer:KEY_LEFT"}
Switch LgTvRight                        "Right"                         (GF_Living)     {lgtv="ON:wohnzimmer:KEY_RIGHT"}
Switch LgTvOK                           "Ok"                            (GF_Living)     {lgtv="ON:wohnzimmer:KEY_OK"}
Switch LgTvHome                         "Home"                          (GF_Living)     {lgtv="ON:wohnzimmer:KEY_HOME"}

When i change the channel the item prog don’t change automatically.
how can do it?