If this is going to be a robust driver we should probably have a preference for whether the TV is set to fast wake mode or not. Also, we get the MAC addresses back from the status query so we don't necessarily need to ask the user for those. We can populate them first time we perform a status request. That way the user doesn't have to fuss and worry about the way the code wants it formatted either.
Man I wish there was a section where people like me who have absolutely no clue about programming and code could take advantage of things like this.. I also have a TCL (Roku) TV and I would love to add functionality to Google Home using a driver like this.
Perhaps once you guys get it all sorted out, you'd be willing to post up a "how to" for total newbs like me?
Google or search the forums about how to install a user provided driver. Use this code to create the driver. Create a virtual device and choose this driver as the type. Once you have the correct type selected there will be two required preferences; IP and MAC. You can Google this as well if you don't know where to find this but those are essentially identifiers for where your TV is found on your network.
Once those are filled in you should be able to control your TV from Hubitat. If you share the device to Google it will only show up as a switch so you would be able to turn it on or off and nothing more. Google's API doesn't provide a type for TVs yet.
We could implement switch level on the driver which would probably allow us to change the volume but then the TV would also get treated as a light switch. I'm not too keen on that. I'd rather create a scene in Hubitat that does all of the heavy lifting (switches input, sets volume, etc.) and then share the scene switch to Google.
This is dated, I know. I had the same issue, and I fixed it in my own version of the device handler that was based on this one. I made other changes so I did not push my changes, I just forked the DTH to make it fit my unique needs. This is not a push to switch to my driver, rather a suggestion that I had the issue as you explain, and it was able to be fixed. As such, maybe the fix you tried to apply just has a typo, or was not quite implemented right.
Yes. That is intentional. I based mine off of this one, and have made several changes. I don’t want to take away from this one, just wanted to point out I added some additional capabilities and changed some behavior. So, I created a different thread for mine. I don’t remember the details as to why, but I try to make it clear, that mine is just an extension on the work done here.