"Samsung TV Remote" Driver installed and working. How to make a dashboard button for controlling it?

You need to add the device to your dashboard to use it.

Open up the Hubitat Dashboard app from your apps page, select your dashboard (Main) then click 'choose devices' and select your Samsung Monitor.

Now open your actual dashboard and your device will be available in the device list. You can add a new tile with the + sign (top right) or edit an existing tile by tapping on the 3 dots. Towards the bottom of the tile edit page you will see 'pick a device', choose your monitor, then 'pick a template' and try Switch (for on/off).

A lot of the command will not appear on the standard dashboard settings. In the code, I have included a button controller that allows access using the "Button" template. It is designed for those commands that do not have templates. So, that being said, the button definitions are at the bottom of the driver code in the method "push".

Doing this I have a simple setup for my "relax" dashboard. See below. The big on showing FireTv is a Variable template with a uri of a Samsung TV for a background (obtained from a google search). This is not yet available (next version, it is under test). The other icons are from the Hubitat icons (part of the template setup). I use the variable to allow users to set tv input by name (not HDMI1, ...) as well as call up Applications.

I have not had the time to sit down and figure out how to create buttons or switches in driver definitions yet. BUT after installing the Samsung TV driver and adding my Samsung TV to my Hubitat / Alexa skill and Alexa will now turn off my Samsung TV via voice command which is mainly what I was after. Someday I will take the time to figure out how to add more buttons and switches to drivers.

This is the Samsung TV driver I am using: https://raw.githubusercontent.com/DaveGut/HubitatActive/master/SamsungTvRemote/SamsungTVRemote.groovy

I copied the text and pasted it into a new driver in Hubitat then created a Samsung TV using that driver by adding the appropriate IP address of my Samsung TV.

I received a PM asking for more information on adding Yamaha Receiver and Samsung TV devices so I created a new thread detailing how "I" added a Yamaha receiver to Hubitat:
https://community.hubitat.com/t/newbs-implementation-for-adding-control-of-yamaha-receiver-to-hubitat-with-screen-pics/109827/2

I am still in the dark about how to configure usable buttons for virtual devices and add them to a dashboard. I was hoping this new thread would be more of a complete explanation of how to add a device using a .groovy file.

I have 3 Samsung TVs that I'd like to be able to shut off as well.

I'm new to this and I got the driver code loaded that you show, but I have no idea how to create a device from it. Searching for an article hasn't turned up anything yet. Can anyone help me out with that please?

Did you try clicking on the help link in the upper right hand corner on the device's edit page?

image

Also, a search for "Samsung TV Remote" showed the below (2nd on list):

This link points you to the installation instructions.

I don't know what you mean by "help link in the upper right corner of the device's edit page". I go there and I get this...

Am I missing something that I should be seeing?

I do see the notes in the code header in the background, and am reading the info in the link you provided.

I appreciate your help!

You went to the Editor's help page. The TV Help page is the icon below in the upper right of device's edit page display. Looks like what was in last post. You could also go to the other link above to get to the various documents.

So of the 3 tvs I have, only 1 has the "Remote IP" setting. One of the others has IPv6 settings on the Expert Screen and the other only has "Power on with Mobile".

All were purchased in the 2016 on time frame. So I'm not sure why the settings aren't there as all are "smart".

Even on the one with the defined settings, I can't seem to get it to work. The Switch state seems to flip back and forth based on the tvs actual status but the buttons don't control anything.

What am I missing? I've been looking at this for hours.

How is the TV setup in the Hubitat App. Let go with ONE at a time. NOT all three. Start with the one that shows on/off.

This is indicative that you have not set your TV to accept the commands from the Hubitat Remote. Please look at the instructions for guidance. Particularly line 6. HubitatActive/SamsungTvRemote/Docs/Installation.pdf at master · DaveGut/HubitatActive · GitHub

I tried following that.

None of the remotes have a "Menu" button. I've poked several of the others looking for something to come up that I need to allow but there's nothing?

You get to menu on your TV using the home key followed by going left to the gear box on the display. I really can not explain to you how to operate your TV.

That just takes you to the Settings screen, as expected, what I'm getting at is I don't see any Window I need to click "Allow" on.

Perhaps I'm not triggering something through hubitat?

Hey D, I have everything working and I'm trying to use in custom command for "setInputSource." I was trying to figure out how to select HDMI1 or HDMI2 as well as an example of the parameter type and an example if it is the string command?

Thank you in advance :smile:

App is working great for everything but the app device "ON". i have static IP set in the ASUS mesh router, it is bound to the appropriate router device (tried with and without binding). Roaming is disabled in the router. But it appears that main issue is the TV always shows offline when turned off after a short period in time. TV is a 2019. How can this be remedied?

I have had a Samsung TV connected to Hubitat for a while. I've been able to control it using the buttons in the device page but never really explored much further.

I recently got another one for my office and wanted the TV to turn on off at particular moments when I am there. I realised that a relatively simple rule in Rule Machine (and therefore likely Advanced Button Controller) when I choose the option to Control Switches and pick the TV device and I create a rule (or a button command) that turns the tvs on or off. I've just tried this now with a single command for both tvs and they both came on in unison.

Is this the functionality you are referring to creating?

All Samsung TVs disconnect from the LAN when switched OFF (and are then not clients on the ASUS router). The only way to turn it back on is the physical remote or a Wake-on-Lan command. You can not turn off the TV without it disconnecting (after about 1 minute of cleanup).

The hubitat driver sends the Wake-on-lan command when you select on. HOWEVER, sending on/off very rapidly will cause issues (if it is shutting down, it does not abort the shutdown process). (Note that I see the same behavior with the Samsung-written SmartThings integration.)

Finally, like many wifi devices, you must make a DHCP reservation (static IP address) or the router may change the IP address when it rejoins the LAN.

Understood. I have had it set to a static IP, I have a camera in the media room so i can monitor the TV from my desk. Just one press of ON at a time. ... a little history, i have had this TV set up using a virtual trigger from Alexa for a few years now. After I moved to Hubitat while learning Smartthings was soon to be offed by Samsung a few years ago, all devices (350+) were moved to the Hubitat platform but one, the Samsung TV. It was kept on the Smartthings platform (after trying Hubitat options) so we could walk into the media room, have Alexa "turn on or off the TV", Alexa had the Smartthings skill enabled and was great at turning the TV on/off. All of the lighting, fade routines would then be enabled from the virtual switches I had set up in Alexa. Back in October, it no longer would work likely after an Alexa update. i have tried to get the "ON" to work but have been unsuccessful to date. From Alexa, I could always turn off the TV if it and hence all lights, were left on. I will not give Alexa any control of any "real" devices, only virtual devices albeit the TV. So I am in this dilemma looking for an answer to how can I make this a smart automation again?

I just installed on my test hub the TV driver. Tested off, on, and some of the other remote commands. Did not bother testing the SmartThings integration (since on was the issue).

Suggest re-reading the instructions and trying again. Important, the TV must be ON during initial setup to get TV device information critical for the driver to operate.

Dave

Hi Dave, first of all, Happy New Year. Thanks for all of your follow up. Lets go back to my first post. “The driver works great”. All buttons are responsive albeit the ON. Yes, it is because the Samsung TV makes itself go offline. So again, the driver works great. But, ON is very important to our home automations. It is so important, that the Samsung TV has now been replaced by a new Sony Bravia 77”. After many hours over several weeks of researching it out, finding a hubitat user driver for the Bravia TV and talking directly to Sony engineers, the TV has built into its software the likelihood that customers may want to use their mobile device or an app with the TV and handles the power off functions accordingly With available settings. After an hour of setup, adding a virtual device to hubitat, updating router settings, updating webCore pistons, it all worked. Now the best news is that i can also finally rid myself of smartthings! And i do not have to use Alexa ( I detest it but my wife will use it). The webCore pistons can now determine the TV was powered on or off as triggered by the remote and make all of the lighting automation decisions accordingly. Now, as the 30 year electrical engineer in me is always curious, i will set up the samsung and again try to achieve success with it. You have convinced me it may be possible to overcome the ON dilemma.