I have a Roku TCL tv and since I don't have a remote for it and haven't in some time, I use the roku app. In order to use the app remote you have to connect your phone to the same wifi as your tv and then click the roku device you want to connect to. Usually my tv goes through this weird motion where it will stop being connected to wifi for a few days to a few weeks, the app will say "wake device" and the blinker censor at the bottom of the tv will blink nonstop when the tv is on, and then it will just randomly start working again until the next time. Any way to fix this? My tv is taking longer than usual to fix itself and the only way I can watch something on it is if I connect the Xbox to it.
With it giving you that degree of inconvenience, your best bet is probably to purchase a replacement Roku TV remote, if only to use as a backup for when you need to reset the TV's wifi network connection.
Replacement Roku TV Remote
Remotes that come with Roku TVs are supplied by the TV manufacturers, not Roku. They connect by infrared (IR) and are relatively inexpensive. (Remotes for Roku DEVICES use a different IR command set than Roku TVs, so IR remotes for Roku devices won't control Roku TVs, or vice versa.) You may be able to find them locally at Best Buy, Wal-Mart, Target, etc, or of course at online sources like Amazon and eBay, but not from Roku. Roku TV remotes from any Roku TV manufacturer or from third party suppliers largely use the same standard set of IR commands and are interchangeable for use on Roku TVs from other manufacturers*.
Thanks to @Tivoburkee for this info.
Upgrade to Roku Voice Remote
In addition all, Roku TVs will support any of the Roku "Voice Remotes". You may be able to find these locally at Best Buy, Wal-Mart, Target, etc, or of course at online sources like Amazon, eBay, and from Roku itself. These are point-anywhere remotes that connect to the TV via WiFi-direct, and must be paired to the particular TV to enable them to communicate.
First you need to determine if you are connecting your RokuTV to the 2.4ghz or 5ghz band of your network.
From Settings/Network/About, if you see a wireless channel 1-11, you are connecting to the 2.4ghz band.
If you are seeing higher numbers, 36-48, or 149-165, you are connecting to the 5ghz band.
----
If you are losing connection for days, I would verify that in your router settings if you have a cable ISP (Xfinity/Comcast, Cox, or AT&T) that you have the 2.4ghz Wireless Mode configured to use b/g/n. In your 5ghz wireless settings, verify that you are not using a DFS channel (52-144) or that any options to use DFS channels are Disabled. Roku cannot see or use DFS channels so will not connect to your network.
----
To narrow down whether it may just be a mobile app issue, try clearing the Cache and Data storage from within the mobile app settings. Then restart the phone and see if able to connect any easier.
Sometimes difficult to diagnose when dealing with multiple devices needing to connect in order to work. It may be worthwhile for you to purchase a Roku Voice Remote from Walmart, Best Buy, etc or even an inexpensive universal streaming remote compatible with RokuTvs so that you can narrow down whether network issue, mobile app issue, or tv issue next time this occurs. (A physical remote is always handy to have and will be required if you ever factory reset your RokuTV anyway).
As to the CAUSE of your Roku TV losing its wifi connection in the first place ....
That "self correction" with time, makes me wonder if the problem is that your router is set to automatically choose the channel it will use at any given time. If it switches the channel in use once in a while it may be switching into and out of wifi channels not supported by your Roku TV.
Rokus support only the following channels:
In the 2.4 GHz wifi band, channels 1 though 11 as are used in North America. Additional channels 12 and 13 as are used in some other parts of the world are not supported. If your router supports 2.4 GHz channels outside 1-11 make sure your router is set to use a channel within this range and that you aren't using an auto setting that could select channels outside this range.
In the 5 GHz wifi band, channels 36-48 and 149-165. Channels 50-64 and 100-144 are shared with other uses such as military, radar, and weather. These channels are termed DFS (dynamic frequency selection) channels and routers are supposed to automatically switch to a different channel if they detect one of these channels is in use in your area. Roku and many other home use devices don't support these DFS channels. Many home routers don't include DFS channels, but some do. Make sure your router is not using these DFS channels, and that it is not using an auto select option that could choose a DFS channel.
[Edit: After posting I see @AvsGunnar already covered this while I was composing my message.]