Roku Smart Home Integration

Hey all,

I recently discovered that the Merkury lights I’ve been using (added through LocalTuya) are no longer being carried by Walmart, and instead Roku’s Smart Home hardware (rebranded from Wyze) are taking its place. I was hoping I could pull them into the Wyze app and manage everything through there, but that is sadly not the case.

Is anyone aware of any work being done to be able to pull Roku Smart Home devices into HA?

3 Likes

I am also interested in this. I don’t have any of their products but they’re cheap and seem pretty cool so I might buy some smart plugs and try to write an integration if nobody’s started on it yet.

Update: I just ordered two of their smart bulbs to play with. Hopefully I can get an integration working with them.

1 Like

@Klikini Any progress on getting your Roku smart plugs integrated into HA?

Not really :frowning:

I have confirmed that the bulbs do have the regular Wyze LAN API on port 88 (with /device_request), but sadly Wyze decided to require encryption with a key that can only be obtained from the login process. (Note the archive.org links. The content has been taken down, presumably due to a request from Wyze).

The normal Wyze login process doesn’t work because authentication happens through Roku’s servers since it uses a Roku account instead of a Wyze account. I think the existing Wyze integration would work with them if the login process was adapted to handle this, but I’m not sure what it exactly needs to do because I haven’t been able to capture that login flow from the mobile app yet. I have a rooted phone to do this with, I just haven’t had time to get that set up yet.

I think our best bet for fully local control would be nagging Roku to add HomeKit support and controlling them that way, though I’m not sure if that’s possible with just a firmware update. I have also already logged a feature request with Roku to extend their ECP interface to their smart home products (I believe this is how Home Assistant controls Roku streaming players).

So, until something changes, I have two pretty nice bulbs sitting on the shelf because they won’t work with any of the lighting controls in my house.

Do your part… bug Roku (https://twitter.com/RokuSupport ?) to tell them to provide local non-cloud LAN control of our devices, and also join the Matter smart device specification… Build With Matter | Smart Home Device Solution - CSA-IOT.

1 Like

Update: I have successfully captured the Roku Smart Home app login process in plaintext. It looks pretty complicated, with multiple calls each to Roku and Wyze servers, so I’ll have to figure out how it actually works and reproduce it another day. But it’s progress!

Before anyone asks: I’m not going to share any capture files until I can scrub out personal info, login credentials, session tokens, etc.

I’m interested as well. I bugged Roku community about an API or joining the Matter standard. Due to lack of a response, I don’t believe they’re interested. So this is probably the only route.

Any chance you could point me in the right direction for capturing this process myself? I have some API/Auth knowledge but I have never tried to capture this on Android before.

I can root my phone but would love to know what other tools are needed to capture everything in plain text.

Thanks!

Here’s the guide I followed: Intercepting SSL Pinned Connections on Android

Though, before you go through the trouble of rooting your phone, I will say I have made some progress and discovered that they’re using AWS Cognito to get session tokens, and I think I’m pretty close to a working solution, I just need a little more time to implement the request signing process and the holidays haven’t allowed me to do that quite yet. I’m hoping to get it done sometime this week.

Glad to hear it!

I ended up doing a bit of digging today with mitm proxy and an emulator and also saw the calls to AWS Cognito flows, I’m able to make some requests to the cloud API with the JWT which is pretty cool.

Can’t wait to see what you come up with!

Happy new year!

Happy new year! I have made progress with the login process (code here) and now I can get bulbs from the account. I just have a little more testing to do with controlling the bulbs and then I will create a pull request for the Wyzeapy library, and then I need to figure out how to create a Home Assistant integration (I’ve done it twice before for Rachio and DoorBird, but that was before they added UI configuration!)

2 Likes

Status update: I have submitted a pull request to the Wyze library to merge in Roku support. It may not be accepted without some changes, though.

1 Like