JarekToro / homebridge-roku-tv

Apache License 2.0
10 stars 5 forks source link

Unable to find TCL TV on Network #10

Open NateUT99 opened 4 years ago

NateUT99 commented 4 years ago

Have been using the homebridge-roku-3.0.0-alpha1 with my TCL TV running RokuOS for sometime now, but wanted to switch to something that seems to be under active development. I removed the homebridge-roku plugin and config and installed homebridge-roku-tv. After configuring the polling interval (30000ms), I restarted Homebridge but received the error below:

[5/26/2020, 7:55:49 AM] [RokuTV] Error: Could not find any Roku devices after 10 seconds
    at RokuFinder.<anonymous> (/homebridge/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:136:11)
    at RokuFinder.emit (events.js:310:20)
    at Timeout.done (/homebridge/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:55:12)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

I have validated that the RPi running Homebridge (192.168.4.10) is able to connect to the RokuTV (192.168.20.11) via tcp-8060 (I believe this is the port Roku uses for UPnP/discovery). I also checked to ensure "control by mobile apps" is enabled (I had to do this to make the other plugin work previously). My network does consist of multiple VLANs, but there are currently no firewall rules in place between them to restrict traffic.

This it the output if I go to http://192.168.20.11:8060) via a web browser on my network:

1 0 urn:roku-com:device:player:1-0 65" TCL Roku TV Roku http://www.roku.com/ Roku Streaming Player Network Media 65R615 7000X http://www.roku.com/ YS00NU235632 uuid:298c001e-9403-1098-8070-c0d2f39cc337 image/png 360 219 8 device-image.png urn:roku-com:service:ecp:1 urn:roku-com:serviceId:ecp1-0 ecp_SCPD.xml urn:dial-multiscreen-org:service:dial:1 urn:dial-multiscreen-org:serviceId:dial1-0 dial_SCPD.xml

Unfortunately, this is the first Homebridge plugin that I've had issues with, so I'm not entirely familiar with the best way to go about debugging/troubleshooting this issue. If there is any information that I can gather, please let me know and I'll get it.

NateUT99 commented 4 years ago

The more I dig into this, it looks like it is a problem with the discovery process. If I run the discovery tool that comes with homebridge-roku, I receive the same error as mentioned above. However, since homebridge-roku allows you to manually define the devices in the config file, the devices appear in the Home app and at least the basic functionality works.

Is it possible to manually define the homebridge-roku-tv settings for each TV in the config file?

LordZork commented 4 years ago

@NateUT99 not sure if this will help, but I have a TCL TV (running RokuOS) and – initially – the plugin was unable to find my TV on my network. But, this (https://github.com/JarekToro/homebridge-roku-tv/issues/6) is how I resolved the issue...

Note: I am using v1.0.7 of the plugin (I haven't updated to the latest v1.0.8 that was just released, as the version I'm running is working great for me, and I am not sure what the latest version does... can't seem to locate any documentation or details regarding the update).

NateUT99 commented 4 years ago

@NateUT99 not sure if this will help, but I have a TCL TV (running RokuOS) and – initially – the plugin was unable to find my TV on my network. But, this (#6) is how I resolved the issue...

Note: I am using v1.0.7 of the plugin (I haven't updated to the latest v1.0.8 that was just released, as the version I'm running is working great for me, and I am not sure what the latest version does... can't seem to locate any documentation or details regarding the update).

I checked this setting and I already had it configured like you do... I had to do this step to make the older Roku plugin work.

LordZork commented 4 years ago

@NateUT99 Hmm... not sure if it matters, but are you running the previous version (v1.0.7) like me, or are you running the latest version (v1.0.8)? I'm new to Homebridge, but I'm wondering if the latest version may have broke something... or if it's unrelated? Also, if you're running v1.0.8, I wonder if it's possible to install v1.0.7 instead?

NateUT99 commented 4 years ago

@NateUT99 Hmm... not sure if it matters, but are you running the previous version (v1.0.7) like me, or are you running the latest version (v1.0.8)? I'm new to Homebridge, but I'm wondering if the latest version may have broke something... or if it's unrelated? Also, if you're running v1.0.8, I wonder if it's possible to install v1.0.7 instead?

I had v1.0.7 installed this morning, tested and it didn't work. I upgraded to v1.0.8 after that, but the issue remained. I'm pretty sure it is an issue with how the discovery occurs... must not like something on my Ubiquiti network.

JarekToro commented 4 years ago

I’ll have to look into this over the weekend. Let me know if you find out anything else while debugging

LordZork commented 4 years ago

NO!!! My Homebridge auto-updated this plugin from v1.0.7 to v1.0.8, and now it's broken. v1.0.7 was working perfectly!!

@JarekToro

Is there anyway you can make v1.0.7 available again? This was one of my favorite plugins!

Also, I didn't know Homebridge would auto-update plugins... is there a way to prevent this?

JarekToro commented 4 years ago

Anything in the logs?

LordZork commented 4 years ago

[RokuTV] Error: Could not find any Roku devices after 10 seconds at RokuFinder. (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:136:11) at RokuFinder.emit (events.js:310:20) at Timeout.done (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:55:12) at listOnTimeout (internal/timers.js:549:17) at processTimers (internal/timers.js:492:7)

JarekToro commented 4 years ago

Was the tv on? Sometimes if the tv is off it can’t find it. Unless you turn on “fast start” or something like that can’t remember the name

JarekToro commented 4 years ago

The 1.0.8 update shouldn’t impact it at all. It was a very small change. I think the real issue was that the homebridge restarted

LordZork commented 4 years ago

The TV was on...

Ok, possible fix (though, I have a new problem now)...

I was wondering if maybe I should restart my TV since the plugin updated while my TV was on. So, I restarted the TV and that may have fixed the issue (I am not getting those errors now).

The problem I face now is that, before I had this idea, I uninstalled the plugin and removed the device (Roku TV) from the Home app... with the intention of reinstalling the plugin and reconnecting the TV (to the Home app)...

Now, I am unable to get the TV re-added to the Home app. Any ideas?

JarekToro commented 4 years ago

No ideas at the moment, unfortunately I’m only able to work on this over the weekend. I can respond to some stuff over GitHub but won’t be able to do any debugging til later. Feel free to share what you find on here.

LordZork commented 4 years ago

Update: I had to reformat the MicroSD card I use for Homebridge (with my Raspberry Pi), re-flash the latest Homebridge OS/server, remove My Home from the Home app, delete the Home app, reinstall the Home App, and start over with re-adding Homebridge and everything. Long story short, I was able to get the device (TV) re-added.

That said, I've noticed that – even though I've changed the name of the TV (in the Home app) to "Television", multiple times – it keeps changing back to TCL Roku TV or something like that, whenever I reboot Homebridge. Not sure what's going on, but I'd really like for the name to stay as what I've changed it to. Is there a "name" setting for the config for your plugin?

Damien514 commented 4 years ago

That said, I've noticed that – even though I've changed the name of the TV (in the Home app) to "Television", multiple times – it keeps changing back to TCL Roku TV or something like that, whenever I reboot Homebridge. Not sure what's going on, but I'd really like for the name to stay as what I've changed it to. Is there a "name" setting for the config for your plugin?

Same for me. Each time I restart the HomeBridge service, my Home app rename my TV "Other". I tried to add a name in the json file, but it did not change anything.

NateUT99 commented 4 years ago

Does the TV config get written to the home bridge config file when a new TV is discovered, or does it re-discover them each time HB is restarted? If the former, can someone share a copy of what has been written to their config file so I can try to manually get the plugin to work?

JarekToro commented 4 years ago

It rediscovers everytime. Which seems to be at the root of a lot of these issues some are experiencing. Over the weekend I’ll look into saving to the config file.

NateUT99 commented 4 years ago

It rediscovers everytime. Which seems to be at the root of a lot of these issues some are experiencing. Over the weekend I’ll look into saving to the config file.

Sounds good; I will certainly be a eager and willing tester as you build out this functionality... thanks for putting all of this together, it is nice to have an actively-developed Roku TV plugin again! 😀

LordZork commented 4 years ago

Ever since v1.0.8, after I was able to finally get my device (Roku TV) re-added back into the Home app, I have not been able to successfully use Siri to turn the TV on/off, like I was with v1.0.7. Also, my Roku TV no longer shows up as a remote option in the control center.

I have the TV in the Home app, and I can control it with the Home app. I just can’t use Siri or the control center remote like I did before. Any ideas?

theque9 commented 4 years ago

In the Home app, tapping "+" >> "Add Accessory", then "I Don't Have a Code or Cannot Scan", I was able to add both my TCL Roku TV and my Streaming Stick+. But suddenly the Stick stopped responding via the Home app, so I removed it in hopes that I could re-add it. Now I've tried repeating the steps above, reinstalling the plugin and rebooting homebridge all with no luck. Any suggestions?

LordZork commented 4 years ago

@theque9 I ran into a similar situation where I removed my Roku TV from the Home app, and was not able to re-add it. The only thing that worked for me was reformatting the MicroSD card, re-flashing Homebridge to the card, and starting over from scratch with Homebridge... re-adding everything.

As such, if you can, I recommend avoiding removing devices from the Home app that were added through homebridge or hoobs.

Also my understanding is that, when you remove a device from the Home app, it sometimes requires that the device is reset. So, apparently, for homebridge devices, that can mean resetting homebridge itself.

I imagine the same applies for hoobs too.

That said, after redoing everything and getting my TV re-added, Everything works but the remote option, which does not show up in the control center. No idea why.

LordZork commented 4 years ago

Ever since v1.0.8, after I was able to finally get my device (Roku TV) re-added back into the Home app, I have not been able to successfully use Siri to turn the TV on/off, like I was with v1.0.7. Also, my Roku TV no longer shows up as a remote option in the control center.

I have the TV in the Home app, and I can control it with the Home app. I just can’t use Siri or the control center remote like I did before. Any ideas?

I solved the Siri issue by renaming my TV within the Roku app (instead of the Home app). Now, whenever Homebridge is restarted, it will use the name the TV was given via the Roku app.

Only thing that is still not working, for me at least, is the remote feature, which does not show up in the control center. Is this feature working or not working for anyone else?

theque9 commented 4 years ago

@LordZork Thank you! I read your post earlier, but was hoping I could find another way. Ultimately I ended up just re-flashing. Luckily I was able to restore my HOOBS backup, so not a huge pain. I was then able to add the Roku streaming stick that I previously deleted via Home and it works, but my TCL Roku TV which was previously working fine and I didn't delete from Home is not working. I think I'll delete both from Home and reflash again to see if that solves it.

To answer your question on the control center remote feature, that is working for me. I have to force touch the remote icon in control center to bring up the remote and closing it is a little funky, but it works well.

LordZork commented 4 years ago

@theque9 let me know if your next attempt works. If it doesn’t, you might try removing the HOOBS hub from the Home app before re-flashing, and then (after re-flashing) re-adding HOOBS to HomeKit. If that doesn’t work, you might have to try – as a LAST resort – a fresh setup (instead of a backup) with HOOBS, or possibly starting over with your “home” in the Home app. Sucks, but when I couldn’t get anything else to work, that’s what I did.

Btw, thank you! I tried what you mentioned and “force touching” the remote icon in control center did the trick. My Roku TV now shows up with the remote feature, in control center, and – after I did the force touch the first time – I no longer have to... I can just tap the icon now and it works!

theque9 commented 4 years ago

@LordZork

Worked!

donavanbecker commented 4 years ago

@JarekToro any way to clean up the logs on this?

So instead of this:

Error: Could not find any Roku devices after 10 seconds
    at RokuFinder.<anonymous> (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:136:11)
    at RokuFinder.emit (events.js:315:20)
    at Timeout.done (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:55:12)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

It would log something like this:

Error: Could not find any Roku devices after 10 seconds.
donavanbecker commented 4 years ago

@JarekToro any way to clean up the logs on this?

So instead of this:

Error: Could not find any Roku devices after 10 seconds
    at RokuFinder.<anonymous> (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:136:11)
    at RokuFinder.emit (events.js:315:20)
    at Timeout.done (/usr/local/lib/node_modules/homebridge-roku-tv-plugin/node_modules/roku-client/lib/discover.ts:55:12)
    at listOnTimeout (internal/timers.js:549:17)
    at processTimers (internal/timers.js:492:7)

It would log something like this:

Error: Could not find any Roku devices after 10 seconds.

added this to #13, and made it a debug log.