LG webOS new UID generated after every WOL command

I have 4 LG TVs with WebOS. The sending of a WOL command to turn the TV on works but then it wont turn off with the Power command and I see that it has generated a new INBOX entry with a new UID. TV ignores the turn off command.

LOG:
2019-10-08 12:20:36.738 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lgwebos:WebOSTV:7722f090-5a1a-4a17-a15e-1330a6f7932f' to inbox.
2019-10-08 12:44:07.538 [INFO ] [ipse.smarthome.model.script.LG.rules] - TV1 Power On
2019-10-08 12:44:08.377 [INFO ] [nhab.binding.wol.internal.WolBinding] - Wake-on-LAN packet sent [broadcastIp=192.168.25.255, macaddress=a823fe9d2146]
2019-10-08 12:45:03.168 [INFO ] [ipse.smarthome.model.script.LG.rules] - TV1 Power Off

ITEMS:
Switch   PBATV1_SWITCH "POWER SWITCH FOR TV1"  (PBAtv)
Switch   PBATV2_SWITCH "POWER SWITCH FOR TV2"  (PBAtv)
Switch   PBATV3_SWITCH "POWER SWITCH FOR TV3"  (PBAtv)
Switch   PBATV4_SWITCH "POWER SWITCH FOR TV4"  (PBAtv)

Switch   PBATV1Power   "TV1 Power"    {channel="lgwebos:WebOSTV:93d6e248-596d-40b2-bf27-2f93e0c70c1b:power"}
Switch   PBATV2Power   "TV2 Power"    {channel="lgwebos:WebOSTV:c9bd12f1-9313-4903-b117-bb58460250cc:power"}
Switch   PBATV3Power   "TV3 Power"    {channel="lgwebos:WebOSTV:3670e8fa-33e6-45cf-b1de-857ec1d3f7bf:power"}
Switch   PBATV4Power   "TV4 Power"    {channel="lgwebos:WebOSTV:6947719a-7e95-4e3d-b463-a9758d69780d:power"}

Switch   PBATV1_WOL         { wol="192.168.25.255#A8:23:FE:9D:21:46" }   
Switch   PBATV2_WOL         { wol="192.168.25.255#A8:23:FE:CC:11:0C" } 
Switch   PBATV3_WOL         { wol="192.168.25.255#A8:23:FE:7D:98:DC" } 
Switch   PBATV4_WOL         { wol="192.168.25.255#A8:23:FE:C8:85:2E" } 

RULES:
rule "Power on LGvTV1 via WOL"
when 
    Item PBATV1_SWITCH received command 
then
    if (receivedCommand == ON) {
        sendCommand( PBATV1_WOL, ON ) 
        logInfo("LG.rules", "TV1 Power On") }  
    else {
        sendCommand( PBATV1Power, OFF )
        logInfo("LG.rules", "TV1 Power Off") }  
end

THINGS:
Thing  lgwebos:WebOSTV:tv1  "PBA TV1" [ deviceId="93d6e248-596d-40b2-bf27-2f93e0c70c1b" ] 
Thing  lgwebos:WebOSTV:tv2  "PBA TV2" [ deviceId="c9bd12f1-9313-4903-b117-bb58460250cc" ]
Thing  lgwebos:WebOSTV:tv3  "PBA TV3" [ deviceId="3670e8fa-33e6-45cf-b1de-857ec1d3f7bf" ]
Thing  lgwebos:WebOSTV:tv4  "PBA TV4" [ deviceId="6947719a-7e95-4e3d-b463-a9758d69780d" ]

openhab.log:
2019-10-08 12:54:10.241 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lgwebos:WebOSTV:71060ba7-2644-4bf1-95c6-b9f7f5f263d5' to inbox.

Running openhab 2.4

Follows on from here

Note that a 2.5 version binding - with a new discovery process - is in development.
Maybe you should try that out.

Yes, the file exist but only has {} in it. Check permissions but it has no restrictions.
Where can I get the new addons 2.5

Install Openhab Milestone Build … than you have the 2.5 Binding … or wait until Dezember … that’s the Timeline for 2.5 release …

You also can build the Binding from Source Code … but that’s no guarantee that the 2.5 Bindung works with openhab 2.4

Installed milestone 2.5 but still have the same issue. every time it does a WOL command to turn on the TVs or a stop/start of the openhab service it does a discovery and brings new uid for the TVs, and then the power off command is ignored. is there a way to stop discovery so a new uid is not assigned.

2019-10-09 14:38:18.451 [ome.event.ItemCommandEvent] - Item 'PBATV4_WOL' received command ON
2019-10-09 14:38:18.452 [ome.event.ItemCommandEvent] - Item 'PBATV2_WOL' received command ON
2019-10-09 14:38:18.452 [ome.event.ItemCommandEvent] - Item 'PBATV3_WOL' received command ON
2019-10-09 14:38:18.452 [ome.event.ItemCommandEvent] - Item 'PBATV1_WOL' received command ON
2019-10-09 14:38:21.800 [vent.ItemStateChangedEvent] - PBATV4_WOL changed from NULL to ON
2019-10-09 14:38:21.800 [vent.ItemStateChangedEvent] - PBATV2_WOL changed from NULL to ON
2019-10-09 14:38:21.800 [vent.ItemStateChangedEvent] - PBATV3_WOL changed from NULL to ON
2019-10-09 14:38:21.800 [vent.ItemStateChangedEvent] - PBATV1_WOL changed from NULL to ON
2019-10-09 14:38:23.484 [home.event.InboxAddedEvent] - Discovery Result with UID 'lgwebos:WebOSTV:58c8dfba-d22c-4c9f-a4aa-283472e5f42a' has been added.
2019-10-09 14:38:25.091 [home.event.InboxAddedEvent] - Discovery Result with UID 'lgwebos:WebOSTV:1e6de62d-bb45-489e-962c-afa63039b0bc' has been added.

There’s more than one of those … M3 perhaps?

As per the linked thread, binding development is active and the latest will not be in M3, you would have to manually add it. I do not know how you get a .jar file,

I’ve no idea if this would help with your problem.

Hi, I downloaded the latest M3 for windows.
I thought the binding would be in the 2.5 addons links that are downloads along with the M3.
Would not know how to get or install the jar.
Does anyone know how discovery works. specially for the WebOS binding.
or how does the \userdata\lgwebos\StoredDevices is supppose store the definitions or what it does.

HELP!!
Reinstalled fresh M3 version. The issue with a new UID discovery after a WOL to turn on the TV persists. Consequently the Power off command is ignored, have to turn the TV off manually.

THING:
Thing  lgwebos:WebOSTV:tv1  "PBA TV1" [ deviceId="627f2990-787a-4e8c-b241-49cad7e3b697" ] 

ITEMS:
Switch   PBATV1_SWITCH "POWER SWITCH FOR TV1"  (PBAtv)

Switch   PBATV1Power   "TV1 Power"   {channel="lgwebos:WebOSTV:627f2990-787a-4e8c-b241-49cad7e3b697:power"}
Switch   PBATV1_WOL         { wol="192.168.25.255#A8:23:FE:9D:21:46" }   

RULE:
rule "Power on LGvTV1 via WOL"
when 
    Item PBATV1_SWITCH received command 
then
    if (receivedCommand == ON) {
        sendCommand( PBATV1_WOL, ON ) 
        logInfo("LG.rules", "TV1 Power On") }  
    else {
        sendCommand( PBATV1Power, OFF )
        logInfo("LG.rules", "TV1 Power Off") }  
end

EVENTS.LOG
2019-10-15 10:55:00.135 [nt.ItemStatePredictedEvent] - PBATV1Power predicted to become NULL
2019-10-15 10:55:00.139 [vent.ItemStateChangedEvent] - PBATV1Power changed from NULL to OFF
2019-10-15 10:55:05.361 [ome.event.ItemCommandEvent] - Item 'PBATV1Power' received command ON
2019-10-15 10:55:05.361 [nt.ItemStatePredictedEvent] - PBATV1Power predicted to become OFF
2019-10-15 10:55:21.886 [ome.event.ItemCommandEvent] - Item 'PBATV1Power' received command OFF
2019-10-15 10:55:21.886 [nt.ItemStatePredictedEvent] - PBATV1Power predicted to become OFF
2019-10-15 10:59:44.737 [ome.event.ItemCommandEvent] - Item 'PBATV1Power' received command ON
2019-10-15 10:59:44.737 [nt.ItemStatePredictedEvent] - PBATV1Power predicted to become OFF
2019-10-15 11:02:30.967 [ome.event.ItemCommandEvent] - Item 'PBATV1_SWITCH' received command ON
2019-10-15 11:02:30.969 [vent.ItemStateChangedEvent] - PBATV1_SWITCH changed from NULL to ON
2019-10-15 11:02:31.258 [ome.event.ItemCommandEvent] - Item 'PBATV1_WOL' received command ON
2019-10-15 11:02:32.107 [vent.ItemStateChangedEvent] - PBATV1_WOL changed from NULL to ON
2019-10-15 11:02:35.984 [home.event.InboxAddedEvent] - Discovery Result with UID 'lgwebos:WebOSTV:ee37b14e-5671-4aa5-afbd-d795647264ab' has been added.
2019-10-15 11:02:50.731 [ome.event.ItemCommandEvent] - Item 'PBATV1_SWITCH' received command OFF
2019-10-15 11:02:50.734 [vent.ItemStateChangedEvent] - PBATV1_SWITCH changed from ON to OFF
2019-10-15 11:02:50.736 [ome.event.ItemCommandEvent] - Item 'PBATV1Power' received command OFF
2019-10-15 11:02:50.737 [nt.ItemStatePredictedEvent] - PBATV1Power predicted to become OFF
2019-10-15 11:07:28.495 [me.event.InboxRemovedEvent] - Discovery Result with UID 'lgwebos:WebOSTV:ee37b14e-5671-4aa5-afbd-d795647264ab' has been removed.

OPENHAB.LOG
2019-10-15 11:02:31.262 [INFO ] [ipse.smarthome.model.script.LG.rules] - TV1 Power On
2019-10-15 11:02:32.107 [INFO ] [nhab.binding.wol.internal.WolBinding] - Wake-on-LAN packet sent [broadcastIp=192.168.25.255, macaddress=a823fe9d2146]
2019-10-15 11:02:35.984 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lgwebos:WebOSTV:ee37b14e-5671-4aa5-afbd-d795647264ab' to inbox.
2019-10-15 11:02:50.732 [INFO ] [ipse.smarthome.model.script.LG.rules] - TV1 Power Off

I think here is your Problem … no Devices stored … when it goes off/on a new Discovery starts… and you became a new ID… and your Rules don’t work.

What Permissons are set? Show us -> ls -lah

You’ve seen this post? You’ve not mentioned pairing.

1 Like

It’s a windows 10 machine. I set user: “everyone, administrator” full control of directory and file.

Can someone send a sample of what should be in the file. maybe I can enter it manually and see if it stops the auto discovery.

Have you read the last Link ? There are Instructions how to add an LG TV … You need no File … you must add correctly the TV … please read the Link :slight_smile:

Sorry, what link?