Thanks for the report - no it’s not right, it’s a bug. It’s caused by the device ID being null (not blank, ie “”) - missed adding the null check (that I specifically wrote).
Download the fixed version I just uploaded, see if that works. I don’t know how many TV’s you have added to Smarthings, but the binding should find the right TV automatically, and fill in the device ID. I’m not sure how well this works, as I only have one TV in Smartthings (and finding one is easy).
Give the fixed binding a try, and let me know what happens.
Just tested the “new binding” and now PAT was viewable. After inputing the PAT I can now see updates to HDMI changes which I could not before!
Tomorrow, I’ll try the rest, but this looks promising. @Nicholas_Waterton please look in your inbox from me.
@Nicholas_Waterton tried the new version and now I don’t receive the error but still I cannot find the ID:
2021-12-11 08:44:55.182 [DEBUG] [ternal.service.SmartThingsApiService] - 192.168.200.71: Creating a Samsung TV Smartthings Api service
2021-12-11 08:44:55.184 [DEBUG] [tv.internal.handler.SamsungTvHandler] - 192.168.200.71: Started service for: UE32T5370AUXZT, SmartthingsApi ()
2021-12-11 08:44:55.186 [DEBUG] [tv.internal.handler.SamsungTvHandler] - 192.168.200.71: TV is online
Can you post your whole log? These three lines don’t tell me much. Set to TRACE if you can, that way I can see the requests being sent etc.
What is your polling set to? it takes a couple of polling cycles to get the device ID’s.
If the binding finds the device ID, it will fill it in automatically. If not, it will list the device ID’s it finds, but it only does this once, about 2 polling cycles after the service starts up, It then stops the service (as it needs the Device ID to continue).
I did find a potential bug in the situation where you have two TV’s in Smartthings, which I have fixed and re-uploaded. Try that and let me know (with a full log).
I have UE65KS8002 and most thinks not working. It’s not supporting series - so understood. I have not tried @Nicholas_Waterton version, but found how I can use 3.1 original version:
Manually created thing on 8001 port and protocol=“WebSocket”
SSH/Telnet to the box where OH installed
run command: “curl -X POST http://<MY_TV_IP_ADDRESS>:8001/ws/apps/Netflix” and TV will ask to allow this device connect. Using /api/… requests do not bring that dialog and can’t whitelist OH instance.
Power ON/OFF working by default, but all other items from plugin - not (excluding key_kodes).
Then I tested commands with keycodes. Volume_UP /Down and so on works. And most commands that is required working too. I don’t try to test every command, I just checked minimum list for my self.
Then in the sitemap (using mapping TVRemoteControl item ) added crucial items.
Ugly, but can be used sometimes when remote is somewhere not found…
I’ve been running the new binding for about a month now… Most things are working well, however, I have noticed that the binding seems to loose the running application at times… I can get it to work again simply by going to the thing in MainUI and clicking save. This results in the following log message
Can you grab me a log of when it looses the current app. The binding retrieves this by polling every 10 seconds.
Clicking on save just restarts the binding connections.
I need to see why it stops updating - ie does the tv stop responding, or is there a hidden NPE somewhere. Maybe it’s something to do with turning the tv off.
How long does it take to stop responding? Is it a few hours, a day, a week?
I’ve had the binding running with no problems for several days, but it may depend on your specific set up or tv model.
Try to get me a log from just before it stops updating to just after, TRACE level if you can.
Thanks for this! Was just about to update to the new version but somehow, installing it via the marketplace nor manual with the jar file works.
Is is required to uninstall the old binding or can they live besides each other (until testing is confirmed for new one)?
Thanks, switched over to the enhanced binding and all works as is. Sadly the, hoped for, on/off (power) switch is still not working (as with the old binding).
But that might be an issue with my TV model I guess (UA40JU6000).
If it’s one of the encrypted TV’s (J and K models from around 2015), the remote control interface is encrypted, so the binding can’t send power off commands (and I don’t think they support WOL either).
The encyption protocol is known, it’s just a whole lot of effort to try to implement (along with the extra pin entry system), and I have no way of testing it, as I don’t have one of these TV’s.
Also TV’s are cheaper these days, so the number of 2015 TV’s still out in the wild are dropping rapidly. Of course I just retired my 2012 TV, and my wife thought it was still “fine”. The new TV has impressed her though, if only because it’s 1” thick, mounts flush to the wall, and displays art when it’s “off”.
i have a rule that when my PS5 turn on the tv turns on and then tv changes input problem is that the input keep getting a loop and going from hdmi 1 to hdmi 2 and cant seem to stop as only want it on hdmi 1 which is where my PS5 is