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

That's it - use it as a switch ....

2 Likes

Reinstalled the driver and all the child switches populate correctly and all the apps work fine but HDMI 1,2,3 do not work when the "switch" is pressed. Logs below.. am I missing something?

       errorFailed to launch appId: hdmi3
dev:15162020-04-04 05:22:36.015 pm debugExecuting 'launchApp hdmi3'
dev:15162020-04-04 05:22:35.225 pm inforeceived refresh request from Roku TV-HDMI 3
dev:15162020-04-04 05:22:33.535 pm

The bug as been fixed. Thanks for report.

Awesome! Thanks

1 Like

Thanks for your Roku device handler. I've been using it for a while. I do have a question. Can the Roku report back that it is in sleep mode? I have a light that creates a glare in my TV that have turning off if the Roku is on. But I ran into the issue of the Roku going to sleep and it still reported that it was on.

Thanks

1 Like

Is there a special way to upgrade for this? e.g. after updating the driver, do we need to do anything to the child devices?

All I did was impressed the new driver.. worked fine

1 Like

@armand - Is there a way to limit which sub-devices show up?
I'm getting all of the possible apps i have show up, and I'd like to reduce those to only the ones I really use if possible. I see a few options:

That might do this, but I'm not sure what combination and what I would do to achieve this.

Yes. Let it find all your apps, then turn off automatic management of child devices, or just turn off Enable management of Roku installed applications.

Enable automatic management of child devices
This options, when turned on, will scan for, and create/delete child devices based on the state of the Roku. When turned on, you can selective turn on/off what types of components are included in the automatic management.
Enable management of Roku installed applications
When automatic management is turned on, enabling this option will include the installed apps within the auto management feature.

So, you can turn off automatic management as a whole, or you can turn off just the applications. I recommend you only turn off the management of Roku installed applications.

Once you have turned off management of applications, go in and delete the applications you don't want. This will be handled differently in the Roku Integration App, but for now, this was the best way I could think of handling the logic.

1 Like

And it works very well. Deleting unwanted Roku channel child devices on HE is a one-time thing and doesn't take that long!

1 Like

Go to the drivers section, open the Roku TV device, then click import. If you are pointing to the old path, you will be instructed to save and re-import to pickup the new driver.
That is really all there is to it. I am pondering a way to notify if the driver has an update available, though such a feature may be better implemented in the Integration App when that is finished.

1 Like

Excellent, thank you. Just did it and that worked great!
If I were to add an app later, is their an easy way to add one app or would I go through this process again? Just curious, thank you once again for this awesome integration!

1 Like

Let me see what I can do to allow you to select an app to add (one-at-a-time) in the preferences. I think it should be possible.

2 Likes

It was a bit of a challenge, but I got it working. I had to remove some async calls (which I learned by the devs aren't really any faster, and can actually slow things down). I also had to disable the apps from being able to issue a refresh. But the good news is this version is actually faster than the prior, and when you turn off management of apps, you can now manually add/remove apps from the TV driver.
With this update, it is no longer necessary to turn on auto-management at all.

Thanks for you suggestion

2 Likes

Is there a way to have the Roku report to hubitat that it's sleeping instead of on?

For the Roku Media Players, they can command the TV on/off, but they always report their status as on. There are four status reports possible in the Roku API,
PowerOn
PowerOff
DisplayOff
Headless

In my code, if I receive PowerOn, then I set the status to on, any of the other three options, and I report off.

1 Like

Ok I'll do some more testing. My TV was off and I'm not sure if it was the Roku or the TV that did it.

Can an external Roku Media Player turn off a non-Roku TV or does app have to be installed in the TV?

There is no push service on the Roku. This means that you must setup a refresh. When sending a command, the new system sends the command, then waits for the command to complete, after it is completed, it will then perform the necessary refresh commands to determine state.

For instance, if you turn on the TV, the driver sends the PowerOn command, and upon receiving a success response it should immediately issue the necessary refresh to validate the action was carried out (in the case of power, this is a refresh), at which time the device status is set to whatever the TV reports as the current state. It is possible that either the device is not correctly reporting power state, or that there is a new power state. PM me, and we can try a few things to determine what is going on.

No app needs to be installed on the TV, but the TV must be connected via HDMI, and it must support HDMI-CEC for remote power control. It is not clear to me which Roku models work like this, but mine does, (as I understand it, all the current models do), the Roku Stick may be the only one in question. My Roku is about 3 or 4 years old now, and my TV is older than that (very limited HDMI-CEC support) and they work great together.