Closed olemr closed 3 years ago
OK, once more:
TV LG B7 not discovered
[lgwebos]
This is the only issue with my system. Forum not able to help further.
I was expecting TV to automatically appear in the PaperUI inbox, and especially after initiating a manual search.
Discovery should work.
No TV discovered
lgwebos log level set to TRACE. No log when attempting manual discovery. Uninstall/Re-install produces this trace:
Uninstall:
2018-12-21 23:51:06.822 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=428, service.bundleid=249, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=261} - org.openhab.binding.lgwebos
2018-12-21 23:51:06.838 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=429, service.bundleid=249, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=262} - org.openhab.binding.lgwebos
2018-12-21 23:51:07.136 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STOPPING - org.openhab.binding.lgwebos
2018-12-21 23:51:07.139 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.osgi.service.cm.ManagedService}={service.id=427, service.bundleid=249, service.scope=singleton} - org.openhab.binding.lgwebos
2018-12-21 23:51:07.186 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STOPPED - org.openhab.binding.lgwebos
2018-12-21 23:51:07.244 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent UNRESOLVED - org.openhab.binding.lgwebos
2018-12-21 23:51:07.600 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent UNINSTALLED - org.openhab.binding.lgwebos
2018-12-21 23:51:09.233 [INFO ] [core.karaf.internal.FeatureInstaller] - Uninstalled 'openhab-binding-lgwebos'
Re-install:
2018-12-21 23:55:46.185 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent INSTALLED - org.openhab.binding.lgwebos
2018-12-21 23:55:47.159 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent RESOLVED - org.openhab.binding.lgwebos
2018-12-21 23:55:47.296 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STARTING - org.openhab.binding.lgwebos
2018-12-21 23:55:47.330 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.id=436, service.bundleid=251, service.scope=singleton} - org.openhab.binding.lgwebos
2018-12-21 23:55:47.398 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=437, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=263} - org.openhab.binding.lgwebos
2018-12-21 23:55:47.619 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - Config Parameters: {service.pid=binding.lgwebos, localIP=192.168.1.6, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=263}
2018-12-21 23:55:47.623 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - localIP property was explicitly set to: 192.168.1.6
2018-12-21 23:55:47.657 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=438, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=264} - org.openhab.binding.lgwebos
2018-12-21 23:55:47.680 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STARTED - org.openhab.binding.lgwebos
TV:
$ ping 192.168.1.243
PING 192.168.1.243 (192.168.1.243) 56(84) bytes of data.
64 bytes from 192.168.1.243: icmp_seq=1 ttl=64 time=0.253 ms
64 bytes from 192.168.1.243: icmp_seq=2 ttl=64 time=0.231 ms
64 bytes from 192.168.1.243: icmp_seq=3 ttl=64 time=0.239 ms
1. 2.
After installing the lgwebos binding my TV is not discovered.
Why does the binding not discover my TV?
Version used: (e.g., openhab and addon versions) OH2 Snapshot 2.5.0 #1468 openhab> bundle:list | grep -i lg 249 │ Active │ 80 │ 2.5.0.201812210554 │ LG webOS Binding TV is pingable. Wired connection. Mobile TV on is ON. LG Connect Apps is ON. TV is ON. Model OLED55B7V-Z webOS TV version 3.8.0-61105 (dreadlocks2-dunggir)
Environment name and version (e.g. Chrome 39, node.js 5.4, Java 8, ...): $ java -version java version "1.8.0_191" Java(TM) SE Runtime Environment (build 1.8.0_191-b12) Java HotSpot(TM) 64-Bit Server VM (build 25.191-b12, mixed mode)
Operating System and version (desktop or mobile, Windows 10, Raspbian Jessie, ...): intel x64 prlatform running Ubuntu Server 16.04.0 LTS (apt-get update/upgrade yesterday)
l
openhab> config:list "(service.pid=binding.lgwebos)"
----------------------------------------------------------------
Pid: binding.lgwebos
BundleLocation: null
Properties:
localIP = 192.168.1.6
service.pid = binding.lgwebos
openhab>
$ gssdp-discover -i enp2s0f5 --timeout=3 | grep -C3 .243
Location: http://192.168.1.1:1990/WFADevice.xml
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626::upnp:rootdevice
Location: http://192.168.1.243:1328/
resource available
USN: uuid:94a5ffa1-8bb8-439c-ad6d-ddc3103f01a2::upnp:rootdevice
Location: http://192.168.1.243:1412/
resource available
USN: uuid:94a5ffa1-8bb8-439c-ad6d-ddc3103f01a2
Location: http://192.168.1.243:1412/
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626
Location: http://192.168.1.243:1328/
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626::urn:schemas-upnp-org:device:MediaRenderer:1
Location: http://192.168.1.243:1328/
resource available
USN: uuid:94a5ffa1-8bb8-439c-ad6d-ddc3103f01a2::urn:dial-multiscreen-org:service:dial:1
Location: http://192.168.1.243:1412/
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626::urn:schemas-upnp-org:service:AVTransport:1
Location: http://192.168.1.243:1328/
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626::urn:schemas-upnp-org:service:ConnectionManager:1
Location: http://192.168.1.243:1328/
resource available
USN: uuid:54d352f2-b97f-19e6-61aa-7219d7001626::urn:schemas-upnp-org:service:RenderingControl:1
Location: http://192.168.1.243:1328/
resource available
USN: uuid:d4753582-8f7f-a70a-38cc-47df24556b3f::upnp:rootdevice
Location: http://192.168.1.243:1201/
resource available
USN: uuid:d4753582-8f7f-a70a-38cc-47df24556b3f
Location: http://192.168.1.243:1201/
resource available
USN: uuid:d4753582-8f7f-a70a-38cc-47df24556b3f::urn:schemas-upnp-org:device:Basic:1
Location: http://192.168.1.243:1201/
resource available
USN: uuid:d4753582-8f7f-a70a-38cc-47df24556b3f::urn:lge-com:service:webos-second-screen:1
Location: http://192.168.1.243:1201/
resource available
USN: uuid:3ddcd1d3-2380-45f5-b069-2c4d54b06bc2::urn:schemas-upnp-org:device:WANConnectionDevice:1
Thanks for the information @olemr ! Maybe @sprehn knows why the binding doesn't work with your LG B7 TV?
Hi @olemr
did you follow the instructions to enable
TV Settings The TV must be connected to the same network as openHAB. Under network settings allow "LG CONNECT APPS" to connect.
Note: Under general settings allow mobile applications to turn on the TV, if this option is available. In combination with the wake on LAN binding this will allow you to start the TV via openHAB.
I did.
TV is pingable. Wired connection. Mobile TV on is ON. LG Connect Apps is ON.
OH2 PC & TV are on ports on the same eth switch on the back of the router.
Also: just tried the LG TV Plus Android app and it is working fine.
Some additional info. When I bought this TV for my mother almost a year ago, the binding was working. Sometime during spring/summer -18 it was always marked as Offline even though the TV was on.
Yesterday I updated OH2 to the latest snapshot, and noticed that it was still offline. Then I tried uninstalling and re-installing the binding twice. The last time I lifted the attached logs.
OK. Let's try to rule out another potential source of error: Are you running openhab in a docker container? you would need to run it with option --net=host
Are you running openhab in a docker container?
No docker, and the binding used to work. Could it be some 'leftovers' from the uninstall that causes this?
Or, not entirely sure. Have to read up on docker. Don't really know what it is. Noticed yesterday that Java was updated during the apt-get upgrade, but did not notice the word docker anywhere...
How do I know if openhab came in a docker container or not?
if you don't know, then you are not running it in docker, I guess. You would start it via
docker run ...
$ docker
The program 'docker' is currently not installed. You can install it by typing:
sudo apt install docker.io
Guess I'm not ...
Could you enable debug logging for the binding and provide output:
ssh -p 8101 openhab@localhost // password is habopen
log:set DEBUG org.openhab.binding.lgwebos
But I already provided a TRACE debug under Current behaviour Also a gssdp-discover scan.
No further log entries after this one?
2018-12-21 23:55:47.680 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STARTED - org.openhab.binding.lgwebos
Please also set this one to debug:
log:set DEBUG com.connectsdk
That is indeed the last log entry from lgwebos.
In karaf, no evidence of any connectsdk
openhab> list -s |grep -i conn
212 │ Active │ 80 │ 1.0.6 │ org.eclipse.californium.element-connector
openhab>
that is the library that handles the communication with webos devices. it is included in the binding. it may also generate log messages.
Well, then it looks like it has not been installed. Any way to re-install just the connectsdk?
There's nothing to reinstall. It's a library (JAR) that's embedded into the lgwebos bundle you already have installed:
249 │ Active │ 80 │ 2.5.0.201812210554 │ LG webOS Binding
It won't show up in the bundle list. Did you try raising the log level with log:set DEBUG com.connectsdk
to see if it comes up with a clue that helps solving this mystery?
openhab> log:set DEBUG com.connectsdk
openhab>
openhab> list -s | grep webos
251 │ Active │ 80 │ 2.5.0.201812210554 │ org.openhab.binding.lgwebos
openhab> bundle:restart 251
2018-12-23 03:09:54.163 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=447, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=274} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.166 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=446, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=273} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.172 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STOPPING - org.openhab.binding.lgwebos
2018-12-23 03:09:54.176 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent UNREGISTERING - {org.osgi.service.cm.ManagedService}={service.id=445, service.bundleid=251, service.scope=singleton} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.178 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STOPPED - org.openhab.binding.lgwebos
2018-12-23 03:09:54.181 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STARTING - org.openhab.binding.lgwebos
2018-12-23 03:09:54.200 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.osgi.service.cm.ManagedService}={service.id=448, service.bundleid=251, service.scope=singleton} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.218 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - Config Parameters: {service.pid=binding.lgwebos, localIP=192.168.1.6, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=275}
2018-12-23 03:09:54.220 [DEBUG] [.internal.discovery.LGWebOSDiscovery] - localIP property was explicitly set to: 192.168.1.6
2018-12-23 03:09:54.224 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.config.discovery.DiscoveryService, org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery}={service.id=449, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.discovery.LGWebOSDiscovery, component.id=275} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.249 [DEBUG] [org.openhab.binding.lgwebos ] - ServiceEvent REGISTERED - {org.eclipse.smarthome.core.thing.binding.ThingHandlerFactory}={service.id=450, service.bundleid=251, service.scope=bundle, localIP=192.168.1.6, service.pid=binding.lgwebos, component.name=org.openhab.binding.lgwebos.internal.LGWebOSHandlerFactory, component.id=276} - org.openhab.binding.lgwebos
2018-12-23 03:09:54.252 [DEBUG] [org.openhab.binding.lgwebos ] - BundleEvent STARTED - org.openhab.binding.lgwebos
I just fired up an older OH2 on my Windows laptop.
There the TV was discovered as soon as the binding was installed (from PaperUI).
This was 2.3.0-SNAPSHOT Build #1281
openhab> list -s | grep -i lgwebos
220 | Active | 80 | 2.3.0.201805271653 | org.openhab.binding.lgwebos
Hi, it must have sth to do with receiving the TV's response to the ssdp search requests. I suspect the requests go out fine, cause to my knowledge the TV only response with urn:lge-com:service:webos-second-screen:1 when a specific search request goes out on the network. And this is present in your ssdp discovery results. But for some reason the response is not noticed by the binding. Did you try using network auto discovery (setting no local IP address at all) or setting openHAB's primary IP address, which may be configured under paper ui network settings?
It would also be interesting to know if it works with 2.5.0-SNAPSHOT on the Windows machine. It helps with eleminating OS/network config variables.
Did you try using network auto discovery (setting no local IP address at all) or setting openHAB's primary IP address, which may be configured under paper ui network settings?
Yes, tried all permutations of the two settings.
Just trying latest 2.5.0 Snapshot on Win now. (downloading ...)
Windows snapshot 2.5.0-SNAPSHOT Build #1472 has the same bug. When I left the old Win install, the TV was in the Inbox. I never added it as a thing. After unzipping the new snapshot over the old, it disappeared from the inbox, noting is hidden. Manual scan turns up nothing.
Maybe it's due to the lines that got commented with #4292:
It would also be better if the README got updated so it uses localIP
instead of LocalIP
@sprehn .
@olemr is using it the correct way though.
Maybe you can test this org.openhab.binding.lgwebos-2.5.0-SNAPSHOT.jar where the commented lines are uncommented (https://github.com/wborn/openhab2-addons/commit/51eb4b42bd1b01e6b7b1b7c37218b6cfc2e0b98c)?
openhab> list | grep LG
209 │ Active │ 80 │ 2.5.0.201812222247 │ LG webOS Binding
openhab> update 209 https://github.com/wborn/openhab2-addons/releases/download/lgwebos-bugfix-release/org.openhab.binding.lgwebos-2.5.0-SNAPSHOT.jar
openhab> list | grep LG
209 │ Active │ 80 │ 2.5.0.201812231629 │ LG webOS Binding
I don't use this binding myself. :wink:
Will do, when xmas preparations permit 😊
Trying to reproduce this: Just upgraded my personal installation to 2.4 stable and it still all works fine. (on linux), also with explicit IP set.
Maybe it's due to the lines that got commented with #4292:
openhab2-addons/addons/binding/org.openhab.binding.lgwebos/src/main/java/org/openhab/binding/lgwebos/internal/discovery/LGWebOSDiscovery.java Lines 118 to 123 in 1aa10d8 @Override public void onDeviceUpdated(DiscoveryManager manager, ConnectableDevice device) { logger.debug("Device updated: {}", device); // thingRemoved(createThingUID(device)); // thingDiscovered(createDiscoveryResult(device)); }
Don't think it is related. These two lines were just removing and adding the discovery result with identical thing id and therefore obsolete. We should see a lot of debug statements from connect sdk even before capabilities are updated, like so...
2018-12-23 20:55:27.096 [DEBUG] [com.connectsdk.core.Log ] - Connect SDK - Service added: Fernseher (webOS TV)
2018-12-23 20:55:27.098 [DEBUG] [com.connectsdk.core.Log ] - Connect SDK - Adding service webOS TV to device with address 192.168.2.119 and id 3aab9eea-953b-4272-bdbd-f0cd0ecf4a46
2018-12-23 20:55:27.113 [INFO ] [g.discovery.internal.PersistentInbox] - Added new thing 'lgwebos:WebOSTV:3aab9eea-953b-4272-bdbd-f0cd0ecf4a46' to inbox.
It would also be better if the README got updated so it uses
localIP
instead ofLocalIP
@sprehn
It is a capital "L" in the PaperUI config page. ... I mean, I am open. users of PaperUI would still get it, but those who manually configure via files, may need it as "localIP"
Also tried with 2.5-snapshot and it worked as expected.
Hm, I was a bit too quick when trying out @wborn 's karaf commands. My lgwebos bundle was 252, but I issued the update command on bundle 209, hence wrongly updating Apache HttpClient OSGi bundle and ended up with 2 lgwebos bundles. Deleted them and re-installed, but now, when I try to start it I get:
openhab> bundle:start 253
Error executing command: Error executing command on bundles:
Error starting bundle 253: Could not resolve module: org.openhab.binding.lgwebos [253]
Unresolved requirement: Import-Package: org.apache.http.client.methods
Could you help me with the syntax for restoring org.apache.http.client.methods please?
I got it back after an apt-get upgrade. @wborn, I tried your binding, but no joy. Still nothing. @sprehn, this is trange ...
@olemr : this discussion is very old now. Is your problem solved with OH 2.5.3 ? If not, I can help you finding the reason.
@lolodomo : I havn't been able to test. This particular installation is at my mother's 140km away, and it's still on 2.5.0M3 Since I cannot go there these days, I dare not touch anything remotely in case something goes wrong.
I just use use the Harmony HUB to control her TV, and it works fine.
I have a problem I hope is somewhat related. Please excuse me if i'm wrong.
My problem is not that the binding can't find my TV, it finds it just fine, but some time, maybe when going from 2.4 to 2.5 it stopped auto discovering it after it has been shutoff. I can restart the binding using: bundle:restart "openHAB Add-ons :: Bundles :: LG webOS Binding" and the binding finds the TV again.
Not really sure how to debug this.
The TV is a OLED66B6V and I'm running openHAB 2.5.3 Release Build on Openhabian on a RPi3
"it has been shutoff": the TV or the binding ?
Okay maybe not total clear there... When I turn the TV off and on again, the binding no longer see it. But if I restart the binding it finds the TV again.
closed due to inactivity
Details here