- Platform information:Raspbian GNU/Linux 10 (buster)
- Hardware: Raspberry Pi 3 Model B Rev 1.2
- OS: Raspbian GNU/Linux 10 (buster)
- openHAB version:openHAB 2.5.3-1 (Release Build)
- Issue of the topic: I hav link my LG samrt TV using LG webOS Binding successfylly.
9 channels are linked and i can control my TV using Classic UI & HAB pane.
i want to control my tv using alexa & Basic UI using whic i control all smart switches of my house.
i have created .items files and using .sitemap file i expose items on android app and BASIC UI.
i dont know how do in link items with LGTV binding items and expose them to Alexa and display on BASIC ui.
snap of LG Webos buinding items in paper ui as below.
however i created items for power , Mute & Volume for tv as below.
.Items file is as below.
Switch TV_Power1 âTV_POWERâ (GF_LivingRoom_TV) ga=âSwitchâ,alexa=âPowerController.powerStateâ}
Dimmer TV_volume1 âTV_Volumeâ (GF_LivingRoom_TV) {ga=âLightâ ,alexa=âSpeaker.volumeâ}
.rules file is as below.
rule âTV_POWERâ
when Item TV_Power1 changed
then
if(TV_Power1.state == ON){
lgwebos_WebOSTV_d0e611a2_d6a1_feeb_ffe2_e9b507edfcf7_power.postUpdate(ON)
}
if(TV_Power1.state == OFF){
lgwebos_WebOSTV_d0e611a2_d6a1_feeb_ffe2_e9b507edfcf7_power.postUpdate(OFF)
}
end
by doing this i get updates on openhab log viewer , classic ui & BASIC UI during applying any command but tv didnt follow any commands.
logviewar message is as below.
2020-04-15 14:53:10.741 [ome.event.ItemCommandEvent] - Item âTV_volume1â received command 54
2020-04-15 14:53:10.769 [vent.ItemStateChangedEvent] - TV_volume1 changed from 99 to 54
2020-04-15 14:53:23.144 [ome.event.ItemCommandEvent] - Item 'TV_mute1' received command ON
2020-04-15 14:53:23.160 [vent.ItemStateChangedEvent] - TV_mute1 changed from OFF to ON
2020-04-15 14:53:23.195 [vent.ItemStateChangedEvent] - lgwebos_WebOSTV_d0e611a2_d6a1_feeb_ffe2_e9b507edfcf7_mute changed from OFF to ON
2020-04-15 14:53:28.132 [ome.event.ItemCommandEvent] - Item 'TV_mute1' received command OFF
2020-04-15 14:53:28.168 [vent.ItemStateChangedEvent] - TV_mute1 changed from ON to OFF
2020-04-15 14:53:28.187 [vent.ItemStateChangedEvent] - lgwebos_WebOSTV_d0e611a2_d6a1_feeb_ffe2_e9b507edfcf7_mute changed from ON to OFF
2020-04-15 14:53:55.889 [ome.event.ItemCommandEvent] - Item 'TV_volume1' received command 20
2020-04-15 14:53:55.911 [vent.ItemStateChangedEvent] - TV_volume1 changed from 54 to 20
2020-04-15 14:54:24.426 [ome.event.ItemCommandEvent] - Item 'TV_Power1' received command OFF
Kindly suggest how do i use items(linked by paper UI) in text editor and expose them to Alexa & Google.