Samsung Hubitat TV Integration (2016 and later)

Any luck polling the ArtMode status? I'm using the 32 Frame which doesn't have the built in motion sensor so I'm looking to create a automation that looks for Art Mode status and then triggers via a room motions sensor if its not on w/ motion. Thanks again.

Fixed in test code. Out in next release.

Beta Update 1.3.5 Available. Detailed data is available at:
"HubitatActive/Samsung TV Remote.pdf at master · DaveGut/HubitatActive · GitHub"

This is hopefully the final Beta version. Need to concentrate on Anomalies. All previous anomalies are considered closed (or I will go crazier than I am).

5 Likes

Appreciate all the effort here. Is there anything special I need to do to initialize the driver?

A couple minor things I'm noticing.

Under the current status, the mute variable appears to be reversed. When the TV is muted the status says "unmuted" and when the volume is on it reports "muted".

artModeStatus is always reporting on. When the TV is on, watching SamsungTV (streaming) artModeStatus is still reporting on. I cycled through a couple apps and sources, the artModeStatus is always reporting "on". Not sure how you're parsing or issuing the command for ArtMode but depending on the app you're in the artmode button doesn't have any effect.

Initialize: Do a save preferences to initialize. Art Mode issues are an open issue.

Looking forward to this!

In latest version! Set top post in thread for instructions.

Very impressive. Thanks a lot for this! I am seeing a few issues though.

  1. InputSource doesn't automatically update. It appears it only updates when a command is called to the ST API (so using "Set Input Source" or "Set TV Channel"). As such, it's almost always the wrong value.

  2. TvChannelName: This is always null. Even when apps are launched, I've never been able to get it to update. I also tried clicking "set tv channel" and that doesn't cause a refresh (like it does with the inputSource.
    Also, FYI, even with ST, it doesn't automatically update and I had to add a polling job that called a refresh to the HubConnect ST device to get this to update. In your driver though, nothing gets it to update.

  3. Can't set tv channel. The command doesn't seem to work even with apps like " org.tizen.netflix-app"

  4. I'm getting an error every 10s. Not clear what's prompting this. The non ST commands work great and it appears the UPnP connection is fine.

Error messages here:

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:38.341 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:38.321 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:28.336 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:28.316 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:18.332 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:18.303 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:08.337 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 12:00:08.313 pm [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:58.332 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:58.304 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:48.401 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:48.290 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:46.736 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:38.323 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:38.296 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

[dev:581](http://192.168.1.245/logs#dev581)2020-12-18 11:59:28.325 am [error](http://192.168.1.245/device/edit/581)java.lang.NullPointerException: Cannot get property 'Body' on null object on line 334 (parse)

Fixed in next version.

This behavior is correct. TV Channel refers to antenna channel only - so it reflects the last channel played.

See above comment.

You may have quick poll turned on to 10 seconds. Try turning this off. Also, make sure you run a savePreferences on each update of the driver.

Update 1.3.6 now available

Update instructions:

  • Updated and save driver
  • Save Preferences.

General Instruction Link: "HubitatActive/Samsung TV Remote.pdf at master · DaveGut/HubitatActive · GitHub

Fixes:

  • Refresh: Fixed error in refresh causing failure to request important satus data.
  • Mute: Fixed mute functions to properly operate and report state.
  • WebSocket Interface: Now auto-closes in 3 minutes after opening. I was unable to reliable capture the close status when closed by tv.
  • Art Mode: Converted ArtMode into artModeOn and artModeOff. Changed buttons to 5 for artModeOn and 6 for artModeOff
  • HDMI Status: Fixed HDMI and Source methods to call ST status 5 - 10 seconds after the update is activated.
2 Likes

1.3.5 has bee working flawless for my use cases, updating to 1.3.6 now. Thanks for all your hard work on this. I know this one was more challenging than your typical device driver given everything it's doing and all the models of TV's vs just one. I do have one more request though. In package manager you're missing a donate button...

image

2 Likes

Ah, so no way to see which app is currently running? In ST and the API, tvChannelName reports the app running. If it's on antenna TV, then it reports the channel number. I'm hoping to be able to see that app running.

I had poll interval set. Please what's the difference between the poll interval and the device refresh interval.

Just updated to 1.3.6 and the input source issue doesn't seem fixed. I looked at the code and it appears you only call getStDeviceStatus() when command source or HDMI is called.

I do wonder if it's possible to subscribe to events to the ST API as that'd be the ideal solution. In the meantime, any chance you can add an option to poll (or call that function) ever few seconds? Or can you add a command that essentially calls the function so I can add a rule to call it every number of seconds?

Edit:

Also, the issue with tvChannelName is that you have a typo on line 447. It says "tvChannlName" instead of "tvChannelName":

def tvChannlName = data.tvChannel.tvChannelName.value

Refresh does a refresh or all attributes. The Poll is explicit to power status (checks and sees if the device on on-line; if so, the power is "on").

No, Not an option I am going to currently pursue.

Will look into this on next update.

Update.
I will look into subscribing to ST events. The function uses a HTTP POST interface, so i am not sure how to relate this to subscribe examples I have seen. In lieu of Subscribing, I am considering (for persons integrated with smartThings, using the ST device status as the polling function vice the current implementation.

UPNP Subscribe: Working on implementing this.

The "Frame" is a nice TV but the best part is the flush mount to the wall. The Samsung integration controller was easy to setup and even has options to program Art Mode on/off separate from the TV power. I've got it programed with Habitat to be fully off in the morning and turn on Art Mode in the evening before bed. That functionality isn't built into the TV itself so its nice having the integration. But it was nearly 3x the price of a normal TV in the same size. 2x the price of the same size Samsung. That I'm still having a hard time justifying for a bedroom TV that only my GF and I see. Would maybe be worth it in a designer living room space

1 Like

How do you have things setup to trigger on/off/ art mode? I have a 32 inch frame, unfortunately the 32" doesn't have a motion sensor so I'm looking to create a rule to trigger Art mode on motion. Just wondering how to best setup so I'm not constantly triggering the TV with each motion event.

artModeOn and artModeOff are separate commands. It does not currently check the artMode status before sending the command (attribute for artMode is too unstable currently -- working on it).

If the TV is off, you can use the ON command with the preference to start up in ArtMode.

1 Like

Great work on this driver!!

I am looking for the AppIDs for YoutubeTV and Amazon Prime. The prime ID that is floating around on the Internet is not working for me.

Would you be able to add a function to show the installed apps in the log with their IDs? I poked around in wscat a bit but {"method":"ms.channel.emit","params":{"event": "ed.installedApp.get", "to":"host"}} does not return anything for me.

1 Like

Been working. can not get it to work (yet).

1 Like