[Release] Roku Connect integration App and Roku TV Device Handler

Play is a command, not a state. Use the custom attribute trasportStatus for play, pause, stop state along with mediaInputSource for current app / input status.

1 Like

Like this?

I have mine like this. Works for my needs...

Then I use this to bring the lights up.

1 Like

Awesome! Thank you! I will try this! First time using RM and it's a bit confusing

First, I use the Roku Ultra,

I still have not had any of the apps launch... Wait a minute, ... you need to trigger the ON actuator!!!! Let's see what off off one does?? Yep, exited, Next ON one app then another ...
Yeah, it switches without having to exit first !!!! Channels do not work within apps. I use the Roku as a player for all my OTA recordings on my Tablo Quad but I do stream too.

Works - VolumeUp, VolumeDown, Stop, Reload Apps, Refresh. Home, Key Press, Off, On

The following act like the remote and toggle, MUTE = UNMUTE, sane for play = pause.
Mute and Unmute do the same thing, should be Mute On/Off,
Pause / Play do the same thing as well.

Fails - SetVolume (I expected this to work), Query (all 4, perhaps a TV only function)

N/A - Input Source

Untested - Initialize (no idea what it does)

Custom Command then Actuators exposes all the magic inside, I use Custom Commands ALL THE TIME. Same for properties, say I want to know the current wind direction, no other way to get it. I have strobe that blinks under a specific condition. You can only do that using a custom command, Get use to them, A lot of lighting can be done under a single app now. I am still having problems with while loops and editing them is impossible. I just wanted to change a sensor, fogedaabout it. Just start over!!

1 Like

Use ON not just changed!!! I am still looking for decent rollers that do not cost a few grand for me to set up. I have for HUGE windows in the "TV room". You might want to use Sunset and Sunrise and not a specific time. I do that with my outdoor lighting. Even 15 seconds is probably long enough for trigger. You alos may want to make on more generic and just ON/OFF rather than only if Hulu is ran.

I have enough automation I had to get a second hub for actions I need to happen instantly. Still porting over rules and meshing devices.

Play and Pause are the same on the Ultra, they also works within apps, even my Tablo one.

It is actually under Custom Command, it simulates using the remotes play/pause button.

Ultra has no input, just skip using it

I don't always want the lights dimmed so I don't want the scene activated just by turning the tv on. I've actually modified it a bit since my last post.

When the time trigger hits, it's usually on whatever the kids already have it set it for...(in the case of my screen shot it just happened to be on hulu) By that time the whole family is on the couch and the change happens when we switch to something else then since the time frame is there the lights trigger. We have 5 large windows with blinds already in that room but none that shine on the tv but my wife likes to leave them open but dim the lights as well so we only close the blinds at sunset...

You want mediaInputSource instead !! The other is a commands not attribute. Select Custom Attibute to find it.

Yep, that might be a command to "insert after"

Yeah, for whatever reason mediaimportsource doesn't work well as a trigger for me. Application attribute works reliably and consistently. I don't know if this is because this is a Roku TV and not a Roku Set top box/stick or not. (I haven't used it with one of my old boxes yet)

Most likely the reason it is different, no tuner so I can not test the differences.

1 Like

Yeah, essentially this is a rebranded TCL Roku TV. It's great... (Though occasional blue bleeding during dark scenes)

Available attributes. Like I said, could never get mediainputsource to work... No biggie as the rule triggers correctly :slight_smile:

They are just button presses. That is a behavior of the Roku. The play and pause button are the same button. So is the mute and unmute button.

Fails - SetVolume (I expected this to work), Query (all 4, perhaps a TV only function)

This cannot work. Roku does not offer a set volume, and there is no way to query current volume, therefore there is no way to simulate set volume either. I believe I documented this limitation already. I have also submitted a feature enhancement request a few years back which is still not being addressed. The command is there, because it is part of the AudioVolume capability”, which is implemented to notify Hubitat that the roku volume can be controlled.

As for channel control within the apps, you can channel up/down and set channels within the Roku TV app for watching live TV. Any other apps that offer TV like viewing experience don’t support channel up/down, they have their own way of changing channels. When there is a common method, I will be happy to code for them. The only live TV I use is Spectrum streaming app, which isn’t available on Roku, so I cannot test theirs. What is the streaming service you use that offers channels?

1 Like

It is set at the same time as application. In fact, it is set first, and then the value is translated to get the application name. The reason application exists is that mediaInputSource and the associated supportedInputs were not a thing originally, so I kept it simple to match what we see in the app. With mediaInputSource, we have more detail as to chat is happening. There is no reason for mediaInputSource to not work, but the values are different than application.

Hubitat simply does it offer any support for televisions and media streamers beyond what I could leverage for this driver. Notice when you are adding rules, you cannot select TV nor media streaming devices. It is all centered around building automation. As soon as they offer standardized options of TV controls, so will be there to adapt and make this available for those mechanisms.

I own 5 TCL Roku TVs:
Motorhome Cab - 32” series 3
Master Bedroom - 32” series 3
Office - 42” series 4
Bar - 42” series 4
Living Room - 64” series 5

2 Roku streaming devices:
Motorhome Bedroom - Roku Streaming stick 4k
Guest Bedroom - Roku Premier +

The stick I obtained a couple months back.
My software works on all these devices, equally. I cannot power TV on/off nor raise / lower volume from my app using my Roku stick, because the TV it is attached to does not support HDMI-CEC, Sinai have to use the IR on the Roku remote for the TV control.

My premier+ is connected to a HDMI-CEC capable TV, and volume control as well as power do work on this device.

Both the TV and the media streaming devices fully support channel changing since Roku made the Roku TV streaming channels available as a simulated TV Antenna service, so channel changing should work, like it does on my devices.

Can you send me a screenshot of this? The ultra does not have an input, but the inputs are not just Aux, HDMI, TV antenna, the apps are also inputs, and when the application is the tuner the ultra does support this when you install / setup the TV tuner feature using the Roku TV app.

The premier+ that I have is the exact same device as the ultra. There may be a difference in the SoC used to power it, but they have the same software and same specs. I can assure you, mediaInputSource works in the premier+