Controlling TV from Hubitat Hub

I am very green to Hubitat. Got the C7 last month so I have been doing nothing but tinkering around. Im going to use my dashboard more as a command station than anything. Maybe down the road ill do some automation, but what need to wait til im a little fluid lol

I have a post 2016 Samsung Smart TV, downloaded the drivers and added the device. I am able to control the TV from within the device itself, but wondering if there is a way to control it from my dashboard?

1 Like

Someone posted a similar thread about 5 hours ago:

The answer to your question is YES!!!

3 Likes

Thank you. i searched everything Samsung but was narrow minded and didnt think to search TV remote

I wrote the Samsung TV integration. Embedded in the driver is a Button capability (push command) that can be implemented in Dashboard. This is for commands that are do not have their won template. The list of buttons is embedded in the code (search for "def push").

Below is my dashboard for when I am relaxing. The symbols are from the custom icons in the dashboard editor. The pictures are links from the internet entered into the editor.

There is a LOT you can do from the interface - just takes some experimenting. Sadly, I did not (do not) have time to document all the nuances of the capability.

Example below is the enter key on the tv remote. Device: your TV, Template: Button, Button Number: Number from driver for function. Custom Icon: What indicates to you what to do.

One special panel is the app start (see below). When selected, you can enter an app (after capturing the apps using the preference on the device's preference section. Template: Variable String.

4 Likes

DJ this is awesome and thank you for the visuals which helps me understand

Where do i find button number "Number from driver for function"
Im not a code guy By any means, but i assume its in the code you created? If so i cant find it.

I copied from driver for simplicity. The Case number is the button number.

def push(pushed) {
	logDebug("push: button = ${pushed}, trigger = ${state.triggered}")
	if (pushed == null) {
		logWarn("push: pushed is null.  Input ignored")
		return
	}
	pushed = pushed.toInteger()
	switch(pushed) {
		//	===== Physical Remote Commands =====
		case 2 : mute(); break
		case 3 : numericKeyPad(); break
		case 4 : Return(); break
		case 6 : artMode(); break
		case 7 : ambientMode(); break
		case 45: ambientmodeExit(); break
		case 8 : arrowLeft(); break
		case 9 : arrowRight(); break
		case 10: arrowUp(); break
		case 11: arrowDown(); break
		case 12: enter(); break
		case 13: exit(); break
		case 14: home(); break
		case 18: channelUp(); break
		case 19: channelDown(); break
		case 20: guide(); break
		case 21: volumeUp(); break
		case 22: volumeDown(); break
		//	===== Direct Access Functions
		case 23: menu(); break
		case 24: source(); break
		case 25: info(); break
		case 26: channelList(); break
		//	===== Other Commands =====
		case 34: previousChannel(); break
		case 35: hdmi(); break
		case 36: fastBack(); break
		case 37: fastForward(); break
		//	===== Application Interface =====
		case 38: appOpenByName("Browser"); break
		case 39: appOpenByName("YouTube"); break
		case 40: appOpenByName("RunNetflix"); break
		case 41: close()
		case 42: toggleSoundMode(); break
		case 43: togglePictureMode(); break
		case 44: appOpenByName(device.currentValue("variable")); break
		default:
			logDebug("push: Invalid Button Number!")
			break
	}
}

I also suggest you look at the below page for addition potential information on the Samsung TV Remote driver.
'HubitatActive/SamsungTvRemote at master · DaveGut/HubitatActive · GitHub'
and particularly the "Commands data:" link on that page: 'HubitatActive/Commands.pdf at master · DaveGut/HubitatActive · GitHub'

Old cartoon statement: "DJ - you dirty dog". Luckily my name is Dave.

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.