I am new to Hubitat, I am switching from Home Assistant mainly for Alexa integration.
I have a 55" Samsung curved TV that I use as a monitor for my workstation. I would like to add a switch to my Main dashboard to turn the TV on/off from my cell phone. It took me a few hours to figure out how to get the driver installed:
I can now click on all the commands under the device and make my TV do things... like turn off!
Where I have been stumped for a few hours is trying to figure out how to add a button / switch on a dashboard to turn the TV on/off from the dashboard on my phone?
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.
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 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?
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.
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.
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?
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.