Samsung TV Binding (Beta)

@Pedro_Liberal

You shouldn’t have to click the “+” on the inbox. If the TV is on, it should be automatically detected and appear in the inbox.

If it doesn’t there is something fundamentally wrong - ie UPNP is not working (your network is filtering multicast packets out) or you haven’t installed the upnp.transport.io package or something similar.

What version of openHAB are you running? what platform? can you post the list:bundles output of the karaf console?

This is the problem. This should be polling the Smartthings api for your device settings, but instead it’s throwing an exception.

Where the log shows:

Started service for: UE75MU6179, SmartthingsApi ()

Is where the device id should be retrieved (and listed in the log). It’s not doing that, so I’ll dig into the code and see where it’s going wrong. Should have something tomorrow.

Thanks for the feedback, it’s probably a bug (I have a testing sample of one, so it’s hard to predict what can go wrong).

UPDATE:

Just had a look at the code, it might be a null issue. Can you try putting a space in for the DeviceID and saving it (I check to see if it’s blank, which might not include empty). See if you get a different result.

@DocMC ,

Ok, found it. It was a null check error on the deviceID. New .jar is uploaded (V1.10).

This should find the SmartThings Device ID automatically now.

1 Like

Great, thank you so much!
-Will the new version of the binding be automatically updated? Or do I have to do this manually (how?)?
-In case I can help you for further developments by providing log data et al., kindly let me know. I‘d be glad to support at least as beta tester :slight_smile:
Best regards,
MC

Hi Nicholas,

Thank you for the update, I just tested it out, now it seems that I have received the Smartthings device ID :slight_smile: . My procedure:

  1. First I uninstalled the previous binding and deleted the Samsung TV item.
  2. Then I reinstalled the binding by selecting it in the OH GUI marketplace
  3. Afterwards, I created the Samsung TV item which was detected by the binding after switch on.
    4.Testing it, I can confirm basic functionality.
  4. Finally, I entered the Smartthings PAT, leaving the Smartthings UID empty
  5. Restarting the TV by OH, I had to accept on the TV the control by an external device, which I did.
  6. Now the log file showed me an INFO with the corresponding number (sorry, I forgot to copy the log INFO immediately for posting it here :frowning: )
  7. After copying the number into thing definition, it seems the TV is sending me now much more info on startup (Apps, …) :slight_smile:

Just the problem: When I define Channel as Slider in the sitemap in order to use this as control, it seems that it gets coupled with volume when I’m using the openHAB app on smartphone. When I change the one item, also the other one is changed (channel → volume and also volume → channel).

Here is my code for Item definition:

Items

Dimmer   TVSamsung6Series75Volume                "Lautstärke"                  {channel="samsungtv:tv:2430eefa-240d-4f4b-a8fb-ada887551061:volume"}
Number   TVSamsung6Series75Channel               "Kanalnummer"                 {channel="samsungtv:tv:2430eefa-240d-4f4b-a8fb-ada887551061:channel"}

Here is my code for a Sitemap with Defauls, where I can control Volume. Channel stays constant.

            Default item=TVSamsung6Series75Volume label="TVSamsung6Series75Volume"
            Default item=TVSamsung6Series75Channel label="Channel"

It’s now getting funny when I represent the Channel as Slider. This allows me then to control the channel… but Volume is also changed automatically and scaled quite equally +/-1. Also vice versa: If I change Volumen, then also Channel is changed.

            Default item=TVSamsung6Series75Volume label="TVSamsung6Series75Volume"
            Slider item=TVSamsung6Series75Channel label="Channel"

Some extract of the log file:

2022-02-24 21:48:58.012 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Sending https://api.smartthings.com:443/v1/devices/5c364349-b811-4254-bfcf-917a6970cf93/components/main/status
2022-02-24 21:48:58.096 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value '27' for channel hasn't changed, ignoring update
2022-02-24 21:48:58.097 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Received channel: sourceName, command: REFRESH
2022-02-24 21:48:58.098 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value 'digitalTv' for sourceName hasn't changed, ignoring update
2022-02-24 21:48:58.099 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value '0' for sourceId hasn't changed, ignoring update
2022-02-24 21:48:59.129 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Received channel: channel, command: REFRESH
2022-02-24 21:48:59.130 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Sending https://api.smartthings.com:443/v1/devices/5c364349-b811-4254-bfcf-917a6970cf93/components/main/status
2022-02-24 21:48:59.215 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value '27' for channel hasn't changed, ignoring update
2022-02-24 21:48:59.216 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Received channel: sourceName, command: REFRESH
2022-02-24 21:48:59.217 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value 'digitalTv' for sourceName hasn't changed, ignoring update
2022-02-24 21:48:59.218 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Value '0' for sourceId hasn't changed, ignoring update
2022-02-24 21:49:00.248 [TRACE] [ternal.service.SmartThingsApiService] - 192.168.2.31: Received channel: channel, command: REFRESH

Using the WebUI, I can move them independently… Maybe a bug in the app?

Best regards,
MC

@DocMC

Are you using the ios app? There is a bug in the ios app that causes this annoying slider behavior. If you have “real-time sliders” turned on it’s much worse. Try turning it off (if it’s on) - the bug is still there, but not as bad.

I’m glad the SmartThings API is fixed.

FYI, you don’t really need to do all your steps, just reinstalling the binding from the marketplace would update everything. Also, the token the TV sends when you accept the connection should automatically update the binding configuration (unless I’ve messed something else up). The only thing you actually need to manually enter is the SmartThings PAT.

I’m not sure what the best control is for channel. A slider seems hard to use for picking a channel. You could use a Setpoint, Switch, or a Selection control like this:

Setpoint item=TVSamsung6Series75Channel label="Channel [%s]" minValue=1 maxValue=100 step=1
Switch item=TVSamsung6Series75Channel label="Channel [%s]" mappings=[3="Ch 3", 6="Ch 6", 23="Ch 23", 123="Ch 123"]
Selection item=TVSamsung6Series75Channel label="Channel [%s]" mappings=[3="Ch 3", 6="Ch 6", 23="Ch 23", 123="Ch 123"]

With the Switch and Selector, you can give your channels names (in the mappings), but with limited screen space, you would only be able to include your favorite channels. The Setpoint would also only allow you to click up and down channels. Unfortunately OpenHAB doesn’t have a “numerical entry” control (like a keypad) - there is a keypad widget in the marketplace, but I’ve never tried it see Keypad.

Let me know if you are still having problems with channel/volume if you use a different control for channel. I haven’t tried channel with a slider.

Thanks for the help in debugging the binding!

Ubuntu server 20.04, openHAB 3.2.0.M3 milestone.
Strange I don’t get anything with list:bundles in karaf.
Any alternative?

Well it’s bundle:list of course.

:oops:


START LEVEL 100 , List Threshold: 50
 ID │ State     │ Lvl │ Version               │ Name
────┼───────────┼─────┼───────────────────────┼───────────────────────────────────────────────────────────────────────────────??????????????????
 32 │ Active    │  80 │ 2.12.3                │ Jackson-annotations
 33 │ Active    │  80 │ 2.12.3                │ Jackson-core
 34 │ Active    │  80 │ 2.12.3                │ jackson-databind
 35 │ Active    │  80 │ 2.12.3                │ Jackson-dataformat-YAML
 36 │ Active    │  80 │ 2.12.3                │ Jackson datatype: JSR310
 37 │ Active    │  80 │ 6.2.4                 │ Woodstox
 38 │ Active    │  80 │ 2.8.6                 │ Gson
 39 │ Active    │  80 │ 27.1.0.jre            │ Guava: Google Core Libraries for Java
 40 │ Active    │  80 │ 30.1.0.jre            │ Guava: Google Core Libraries for Java
 41 │ Active    │  80 │ 1.0.1                 │ Guava InternalFutureFailureAccess and InternalFutures
 42 │ Active    │  80 │ 3.0.0.v201312141243   │ Google Guice (No AOP)
 44 │ Active    │  80 │ 4.8.35.v20190528-1517 │ ClassGraph
 45 │ Active    │  80 │ 2.1.9                 │ swagger-annotations
 46 │ Active    │  80 │ 2.1.9                 │ swagger-core
 47 │ Active    │  80 │ 2.1.9                 │ swagger-integration
 48 │ Active    │  80 │ 2.1.9                 │ swagger-jaxrs2
 49 │ Active    │  80 │ 2.1.9                 │ swagger-models
 50 │ Active    │  80 ??? 2.0.0                 │ Jakarta Annotations API
 51 │ Active    │  80 │ 2.0.0                 │ Jakarta Dependency Injection
 52 │ Active    │  80 │ 2.0.2                 ??? Jakarta Bean Validation API
 54 │ Active    │  80 │ 2.3.3                 │ Jakarta XML Web Services API
 57 │ Active    │  80 │ 3.5.7                 │ JmDNS
 58 │ Active    │  80 │ 2.1.2                 │ Units of Measurement API
 60 │ Active    │  80 │ 0.5.10                │ Jollyday
 61 │ Active    │  80 │ 3.2.0.v201101311130   │ ANTLR Runtime
 62 │ Active    │  80 │ 1.2.2                 │ org.apache.aries.component-dsl.component-dsl
 63 │ Active    │  80 │ 1.0.1                 │ Apache Aries JAX-RS Specification API
 64 │ Active    │  80 │ 2.0.0                 │ Apache Aries JAX-RS Whiteboard
 66 │ Active    │  80 │ 3.12.0                │ Apache Commons Lang
 67 │ Active    │  80 │ 3.4.3                 │ Apache CXF Core
 68 │ Active    │  80 │ 3.4.3                 │ Apache CXF Runtime JAX-RS Frontend
 69 │ Active    │  80 │ 3.4.3                 │ Apache CXF JAX-RS Client
 70 │ Active    │  80 │ 3.4.3                 │ Apache CXF JAX-RS Server-Side Events Support
 71 │ Active    │  80 │ 3.4.3                 │ Apache CXF Runtime Security functionality
 72 │ Active    │  80 │ 3.4.3                 │ Apache CXF Runtime HTTP Transport
 81 │ Active    │  80 │ 4.3.3                 │ Apache Karaf :: OSGi Services :: Event
 92 │ Active    │  80 │ 1.0.0.2               │ Apache ServiceMix :: Bundles :: javax.inject
100 │ Active    │  80 │ 2.2.5                 │ XmlSchema Core
101 │ Active    │  80 │ 4.20.0                │ Apache XBean :: OSGI Bundle Utilities
102 │ Active    │  80 │ 4.20.0                │ Apache XBean :: Classpath Resource Finder
103 │ Active    │  80 │ 0.7.7                 │ jose4j
104 │ Active    │  80 │ 2.17.0.v20190920-0401 │ EMF Common
105 │ Active    │  80 │ 2.20.0.v20190920-0401 │ EMF Ecore
106 │ Active    │  80 │ 2.14.0.v20190528-0725 │ EMF Change Model
107 │ Active    │  80 │ 2.16.0.v20190528-0725 │ EMF XML/XMI Persistence
108 │ Active    │  80 │ 3.13.0.v20200828-1034 │ Common Eclipse Runtime
137 │ Active    │  80 │ 0.10.0.v20201105-1103 │ org.eclipse.lsp4j
138 │ Active    │  80 │ 0.10.0.v20201105-1103 │ org.eclipse.lsp4j.jsonrpc
139 │ Active    │  80 │ 2.25.0.v20210301-0821 │ Xtend Runtime Library
140 │ Active    │  80 │ 2.25.0.v20210301-0821 │ Xtend Macro Interfaces
141 │ Active    │  80 │ 2.25.0.v20210301-0843 │ Xtext
142 │ Active    │  80 │ 2.25.0.v20210301-0909 ??? Xtext Common Types
143 │ Active    │  80 │ 2.25.0.v20210301-0843 │ Xtext IDE Core
144 │ Active    │  80 │ 2.25.0.v20210301-0843 │ Xtext Utility
145 │ Active    │  80 │ 2.25.0.v20210301-0909 │ Xbase Model
146 │ Active    │  80 │ 2.25.0.v20210301-0909 │ Xbase Generic IDE Services
147 │ Active    │  80 │ 2.25.0.v20210301-0821 │ Xbase Runtime Library
151 │ Active    │  80 │ 9.1.0                 │ org.objectweb.asm.commons
152 │ Active    │  80 │ 9.1.0                 │ org.objectweb.asm.tree
153 │ Active    │  80 │ 9.1.0                 │ org.objectweb.asm.tree.analysis
154 │ Active    │  80 │ 9.1.0                 │ org.objectweb.asm.util
155 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Core
156 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Community Marketplace Add-on Service
157 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Community Marketplace Add-on Service :: Karaf
158 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Audio
159 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: JAAS Authentication
160 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: OAuth2Client
161 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Automation
162 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Automation Media Modules
163 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Automation Script Modules
164 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Automation Script RuleSupport
165 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Automation REST API
166 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Binding XML
167 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration Core
168 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration Discovery
169 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration mDNS Discovery
170 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration Dispatcher
171 │ Active    │  75 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration XML
172 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Ephemeris
173 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: ID
174 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Console
175 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Console for OSGi runtime Karaf
176 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: HTTP Interface
177 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: HTTP Interface Authentication
179 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Monitor
180 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Network I/O
181 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: REST Interface
182 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Audio REST Interface
183 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Authentication Support for the REST Interface
184 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: REST Interface :: Core
185 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: REST mDNS Announcer
186 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Sitemap REST Interface
187 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: SSE Interface
188 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: REST Interface :: Swagger 1
189 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: UI REST Interface
190 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Voice REST Interface
191 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: mDNS Service
192 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Karaf Integration
193 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Core
194 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Items
195 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Item IDE
196 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Items Runtime
197 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Language Server
198 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Persistence
199 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Persistence IDE
200 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Persistence Runtime
201 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Rules
202 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Rule IDE
203 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Rules Runtime
204 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Script
205 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Script IDE
206 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Script Runtime
207 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Sitemap
208 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Sitemap IDE
209 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Sitemap Runtime
210 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Thing
211 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Thing IDE
212 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Model Thing Runtime
213 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Persistence
214 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Semantics
215 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: JSON Storage
216 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Thing
217 │ Active    │  75 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Thing XML
218 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Transformation Service
219 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: UI
220 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: UI Icon Support
221 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Voice
222 │ Active    │  80 │ 3.2.0.M3              │ openHAB UI :: Bundles :: Main UI
229 │ Active    │  80 │ 1.0.0.201802012106    │ org.osgi:org.osgi.service.jaxrs
230 │ Active    │  80 │ 1.5.0                 │ ThreeTen-Extra
231 │ Active    │  80 │ 1.27.0                │ SnakeYAML
232 │ Active    │  80 │ 2.0.1                 │ SI Units
233 │ Active    │  80 │ 2.0.1                 │ SI Quantities
234 │ Active    │  80 │ 4.2.1                 │ Stax2 API
235 │ Active    │  80 │ 2.1.2                 │ Units of Measurement Reference Implementation
236 │ Active    │  80 │ 2.1.0                 │ Units of Measurement Common Library for Java
237 │ Active    │  80 │ 1.4.18                │ XStream Core
239 │ Active    │  80 │ 2.27                  │ Dagger
240 │ Active    │  80 │ 1.2.2                 │ hivemq-mqtt-client
241 │ Active    │  80 │ 5.9.0                 │ jna
242 │ Active    │  80 │ 5.9.0                 │ jna-platform
243 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee
244 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.console
245 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.console.ember
246 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.console.telegesis
247 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.dongle.cc2531
248 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.dongle.ember
249 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.dongle.telegesis
250 │ Active    │  80 │ 1.4.0                 │ com.zsmartsystems.zigbee.dongle.xbee
251 │ Active    │  80 │ 4.1.68.Final          │ Netty/Buffer
252 │ Active    │  80 │ 4.1.68.Final          │ Netty/Codec
253 │ Active    │  80 │ 4.1.68.Final          │ Netty/Codec/HTTP
254 │ Active    │  80 │ 4.1.68.Final          │ Netty/Codec/Socks
255 │ Active    │  80 │ 4.1.68.Final          │ Netty/Common
256 │ Active    │  80 │ 4.1.68.Final          │ Netty/Handler
257 │ Active    │  80 │ 4.1.68.Final          │ Netty/Handler/Proxy
258 │ Active    │  80 │ 4.1.68.Final          │ Netty/Resolver
259 │ Active    │  80 │ 4.1.68.Final          │ Netty/Transport
260 │ Active    │  80 │ 4.1.68.Final          │ Netty/Transport/Native/Epoll
261 │ Active    │  80 │ 4.1.68.Final          │ Netty/Transport/Native/Unix/Common
262 │ Active    │  80 │ 2.2.19                │ rxjava
263 │ Active    │  80 │ 1.0.0                 │ IO.Socket Engine Client
264 │ Active    │  80 │ 1.0.0                 │ IO.Socket Socket Client
265 │ Active    │  80 │ 20180813.0.0          │ JSON in Java
266 │ Active    │  80 │ 5.2.1                 │ nrjavaserial
267 │ Active    │  80 │ 3.7.2                 │ Apache Commons Net
268 │ Active    │  80 │ 3.8.1.1               │ Apache ServiceMix :: Bundles :: okhttp
269 │ Active    │  80 │ 1.13.0.1              │ Apache ServiceMix :: Bundles :: okio
270 │ Active    │  80 │ 2.1.2                 │ Java Concurrency Tools Core Library
272 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Airquality Binding
273 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Astro Binding
274 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Chromecast Binding
275 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: CoronaStats Binding
276 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Daikin Binding
277 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Xiaomi Mi Smart Home Binding
278 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Xiaomi Mi IO Binding
279 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: MQTT Broker Binding
280 │ Active    │  81 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: MQTT EspMilightHub
281 │ Active    │  81 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: MQTT Things and Channels
282 │ Active    │  82 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: MQTT HomeAssistant Convention
283 │ Active    │  82 │ 3.2.0.M3              ??? openHAB Add-ons :: Bundles :: MQTT Homie Convention
284 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Network UPS Tools Binding
285 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: OpenWeatherMap Binding
287 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Systeminfo Binding
288 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: UniFi Binding
289 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Yeelight Binding
290 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Binding
291 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee CC2531 Bridge
292 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Console
293 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Console Ember
294 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Console Telegesis
295 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Ember Bridge
296 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Serial Driver
297 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee Telegesis Bridge
298 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: ZigBee XBee Bridge
300 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration USB-Serial Discovery
301 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration USB-Serial Discovery for Linux using sysfs
302 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Configuration Serial
303 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: MQTT Transport
304 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Serial Transport
305 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Serial Transport for RXTX
306 │ Active    │  80 │ 3.2.0.M3              │ openHAB Core :: Bundles :: Serial Transport for RFC2217
308 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: IO :: openHAB Cloud Connector
309 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Persistence Service :: InfluxDB
310 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: Exec
311 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: JavaScript
312 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: JSonPath
313 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: Map
314 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: RegEx
315 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: Scale
316 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: XPath
317 │ Active    │  75 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: Transformation Service :: Xslt
318 │ Active    │  80 │ 3.2.0.M3              │ openHAB UI :: Bundles :: Basic UI
319 │ Active    │  80 │ 3.2.0.M3              │ openHAB UI :: Bundles :: HABPanel UI
320 │ Active    │  80 │ 3.2.0.M3              │ openHAB UI :: Bundles :: Icon Set :: Classic
321 │ Active    │  80 │ 1.0.3                 │ reactive-streams
322 │ Active    │  80 │ 3.2.0.M3              │ openHAB Add-ons :: Bundles :: WLed Binding
325 │ Installed │  80 │ 3.3.0.202202101933    │ openHAB Add-ons :: Bundles :: SamsungTV Binding
326 │ Active    │  80 │ 3.2.0.202202231909    │ openHAB Add-ons :: Bundles :: State O-Matic Binding


I have to thank you, @Nicholas_Waterton , for your great support and fixing this problem! I think one can really not underestimate the complexity and development effort of such a binding which is covering such broad variety of TV generations.

I meanwhile have programmed some holistic scenes, where lights (homematic + HUE), media (TV, AV Receiver, Sat Receiver) and shutters are commonly controlled by just one Switch, partly also some apps (fireplace, aquarium) are started. To close this part of my sitemap, I just have four quick questions where I’d kindly ask you for a hint:

Q: How can I select a specific HDMI input? I’ve mapped the different inputs as I see them on the screen, hence I can not switch. (Remark: “digitalTV” is differing, since it is not shown on the screen, but at least it works somehow…)

            Switch item=TVSamsung6Series75SourceName label="Source Name" mappings=["digitalTv"="digitalTv", "TV"="TV", "AVR-X4500H"="AVR-X4500H", "Synology"="Synology", "Denon"="Denon"]

Trying alternatively to switch by SourceID instead of SourceName, I just can switch between 0 (TV) and 1 (Denon). The other inputs are somehow not considered.

            Setpoint item=TVSamsung6Series75SourceId label="Source ID"

Q: How can I exit an app in a Switch “Source App”? In the forum, I somewhere read in a code to send “”, therefore I defined

            Switch item=TVSamsung6Series75SourceApp label="Source App" mappings=["Prime Video"="Prime Video","YouTube"="YouTube","Internet"="Internet",""="EXIT"]            

But hence, “EXIT” does not close the app…

Q: After starting an app, is there a way to check the current loading status, so I can send an “OK” press as soon as the app is completely loaded? E.g. after starting Amazon Prime, I first have to wait till the app is loaded, then I have to confirm my user, before I finally can navigate in the Prime menu. (Of course, a workaround would be a program a delay by a 5s timer or so. This is what I actually did)

Q: Finally, how can I invite you for a beer to show my appreciation and gratitude :slight_smile:

MC

@Pedro_Liberal

I don’t see the UPnP services listed:

257 │ Active │  80 │ 2.6.0                 │ JUPnP Library
284 │ Active │  80 │ 3.2.0                 │ openHAB Core :: Bundles :: UPnP Transport

Did you follow the instructions and install:

feature:install openhab-transport-upnp

From the karaf console?

@DocMC

Thanks!. You can send me a beer at Paypal

You do this in one of two ways. You can send the HDMI setting to the TVSamsung6Series75SourceName item, or send the source id (number) to the TVSamsung6Series75SourceId item (as you have figured out). The trick is knowing what to send. Each TV has it’s own way of naming the inputs and assigning id’s. The way to figure out what they are is to display the names when you manually change the inputs (I notice you don’t display the values in your sitemap).

So use this:

Switch item=TVSamsung6Series75SourceName label="Source Name [%s]" mappings=["digitalTv"="digitalTv", "TV"="TV", "AVR-X4500H"="HDMI1", "Synology"="HDMI2", "Denon"="HDMI3"]
Setpoint item=TVSamsung6Series75SourceId label="Source ID [%s]"

When you switch inputs (using your remote), the name/id of that input will be displayed in the openHAB UI - this is the name/id that you have to send to select that input.

For example, this is what I use on my older (N series) TV:

Switch item=TVUN46EH5300_SourceName label="Old TV Input Name [%s]" mappings=["TV"="TV", "HDMI1/DVI"="HDMI 1", "HDMI2"="HDMI 2", "HDMI3"="HDMI 3", "HDMI4"="HDMI 4"]
Switch item=TVUN46EH5300_SourceID label="Old TV Input ID [%s]" mappings=[0="TV", 67="HDMI 1", 68="HDMI 2", 69="HDMI 3", 70="HDMI 4", 80="Browser"]

As my TV uses HDMI1/DVI for HDMI1 and the source ID’s are as shown (this may be different for your TV).

You are right, sending "" should exit the current running app. It is slightly more complicated that that, though as different TV’s start/stop apps in different ways (of course). You can also use the stopBrowser channel to try and exit an app. If you send ON to stopBrowser it sends "" to the app, and sending OFF to stopBrowser sends a long press of EXIT to the app. Try these, see if they work better.

It may be a bug of course.

If you could send me a TRACE log of you starting an app, then sending "" to try and exit the app I might be able to figure out why it’s not exiting.

What should happen is that you send the command to the sourceApp channel with the app name, and when the app is launched, the sourceApp channel receives an update with the current app name (which should be the same as the app name you sent to launch the app). You can trigger a rule off received update of the sourceApp channel item (ie TVSamsung6Series75SourceApp) to send the OK key press, as the update happens when the app has been loaded.

If you send me the log I mentioned above, I’ll take a look - my TV doesn’t notify apps at all (Samsung removed the API in 2020), so it’s hard to test. As you say, you can just program a 5s delay (but that 5s seems to be forever when you are waiting). There is a built in 3 second delay before the sourceApp channel update happens (as most apps seem to take about 3 seconds to launch). I might consider taking the 3s delay out if the API is available - might make things more responsive. Let me know how long it is after the app is launched before you receive the received update trigger.

Thanks again for the help, the more people who can test the binding, the better it will get.

UPDATE:
I have done some testing, and this works.
First, you have to define your Item TVSamsung6Series75SourceApp as autoupdate="false".
ie

String  TVSamsung6Series75SourceApp  "Source App [%s]"   <television>   { channel="samsungtv:tv:family_room:sourceApp", autoupdate="false" }

(using your TV thing name)

Then you can define some rules. These are test rules:

rule "TV App launched"
when
    Item TVSamsung6Series75SourceApp  received command
then
    logInfo("TV_App", "received command: " + receivedCommand)
end

rule "TV App started"
when
    Item TVSamsung6Series75SourceApp  received update
then
    logInfo("TV_App", "received update: " + newState)
    if (newState == "Amazon Prime" ) {
        sendCommand(keyCodeItem, "KEY_ENTER")
    }
end

You have to substitute your keyCode item for keyCodeItem and whatever key you need to send.

I don’t use the OH rules engine, but this seems to work.

NOTE: you may have an issue if you switch between running apps, as when you switch to Amazon Prime (as opposed to launching Amazon Prime), it will send the ENTER key again. This will also happen if you launch the app via the remote control.

Oops. Don’t know how I missed that. Now I see the binding but it’s not picking up anything. Só same behavior of the normal binding. I’ve been struggling with this for a year now and it’s driving me crazy. I’ve even tried connecting the tv with a cable without success. The tv (MU7005) simply is not found. Arggg!!
Any hints or pointers to help me troubleshoot this? The tv is connected through wireless, but cable doesn’t solve the issue either.
Also the binding description says “for Samsung TVs from 2010/2011 and 2012” seems… wrong….

@Pedro_Liberal

Can you post the output of http://ip-address:8001/api/v2/ where ip-address is your tv IP address (with the tv on).

Can you also post the TRACE level log for the binding, so I can see what you mean by “not being picked up”. I need to see the results of the discovery process once the binding has loaded. The binding should probe the TV to identify ports, protocols etc.

There are some troubleshooting steps you can take in the documentation. The results of those would be helpful.

1 Like

I tried using the binding icw the '22 The Frame TV ; but it stays offline…

172.16.5.208:8001/api/v2/ gives

{“device”:{“FrameTVSupport”:“true”,“GamePadSupport”:“true”,“ImeSyncedSupport”:“true”,“Language”:“en_GB”,“OS”:“Tizen”,“PowerState”:“on”,“TokenAuthSupport”:“true”,“VoiceSupport”:“true”,“WallScreenRatio”:“-1”,“WallService”:“false”,“countryCode”:“AE”,“description”:“Samsung DTV RCR”,“developerIP”:“0.0.0.0”,“developerMode”:“0”,“duid”:“uuid:a708c444-590b-44b3-bed6-372ee9755be6”,“firmwareVersion”:“Unknown”,“id”:“uuid:a708c444-590b-44b3-bed6-372ee9755be6”,“ip”:“172.16.5.208”,“model”:“22_PONTUSM_FTV”,“modelName”:“QA43LS03BAUXZN”,“name”:“Samsung The Frame 43”,“networkType”:“wired”,“resolution”:“3840x2160”,“smartHubAgreement”:“true”,“type”:“Samsung SmartTV”,“udn”:“uuid:a708c444-590b-44b3-bed6-372ee9755be6”,“wifiMac”:“d0:c2:4e:bb:28:d5”},“id”:“uuid:a708c444-590b-44b3-bed6-372ee9755be6”,“isSupport”:"{"DMP_DRM_PLAYREADY":"false","DMP_DRM_WIDEVINE":"false","DMP_available":"true","EDEN_available":"true","FrameTVSupport":"true","ImeSyncedSupport":"true","TokenAuthSupport":"tru

ideas?

Home Assistant does see the TV and I can control it, but I ideally want to use openhab for automation (morning activation of art mode and shutdown at midnight)

My '22 Frame works pretty well with this binding. Can you show the configuration of your tv thing?

and the TV is powered on… and seen by HomeAssistant… as being online too
image

I’ve got mine configured with the Secure websocket option, have you tried that?

@RZomerman
You have to use the secure websockets option, it won’t work otherwise. Usually this is set automatically during discovery though.

I would also say that the “art mode” functions do not work in the current version of the binding, as Samsung removed the art API (at least in the latest North American firmware).

@JustinG you say your '22 frame works “pretty well” - what version of firmware do you have on the TV, and are you in North America?

I am working on a '22 frame TV version of the binding, as I have a new '22 frame TV as well as a '21 Frame TV, but functionality is very limited (art mode wise) since Samsung removed the art API.

You can turn art mode on, and shutdown, but you have to implement it manually through SEND_KEY as there is currently no way to detect if the TV is in art mode or not (other than manual work arounds like monitoring the current consumption). I have implemented a manual ‘SetArtMode’ channel for this purpose in the '22 version of the binding.

If anyone knows how to discover the mode that the TV is in, it would be helpful, even the Smarthings interface can’t tell me.

When I say “pretty well” I mean that I don’t put a lot of demands on openhab as far as the tv is concerned. Pretty much OH just has to turn the tv on (into art mode) in the morning and turn it off again at night (we use the motion sensing feature in art mode and don’t want the screen waking up every time someone gets out of bed in the middle of the night). I use this beta binding because I need the SEND_KEY with the time function for the 4 second power signal to shut down. I use WOL from the network binding to wake it back up in the morning.

I am in north america. But, I’m not sure which version number you’re interested in as there no listings for any “firmware” version. The version at the end of the api return json is “version”:“2.0.25” and the software version that the TV about screen reports is T-PTMAKUC-1304.1,BT-S.