tidbyt / community

A publishing platform for apps developed by the Tidbyt community 🚀
Apache License 2.0
392 stars 681 forks source link

PlexRecentlyAdded Widget Not Displaying Data Despite Successful Proxy Setup #2700

Closed owainri closed 1 week ago

owainri commented 2 weeks ago

Hi @noahpodgurski ,

I’ve been working on setting up the PlexRecentlyAdded widget using the Tidbyt app, and I’ve encountered some issues. Here’s a breakdown:

Setup:

Testing:

Troubleshooting:

I made a few minor updates to the index.js file (attatched as index.txt), including changing the Plex server host from 'localhost' to the IP address of the Plex server on my network (192.168.1.72). I also added logging for forwarded requests and improved error handling for better visibility in my troubleshooting. I don’t think these changes affect the core functionality of the proxy server, but they help ensure it forwards requests correctly within my setup.

Would you have any insights on whether the widget might be experiencing an issue, or if there’s something I might be missing in the configuration?

Thanks in advance!

index.txt

noahpodgurski commented 2 weeks ago

Unless you're running the tidbyt code and pushing it to your tidbyt device yourself, you'll have to port forward to make the proxy available externally. Tidbyt's servers are not run on your local network. Once you port forward set the IP to the public IP of the proxy. Use postman to verify it's available externally with the public IP.

Hope that helps

owainri commented 1 week ago

Hi Noah, thanks for your previous reply. I've since discovered my ISP doesn't allow for CG-NAT/port forwarding unless I pay for their top-tier internet plan, which I'm not willing to do.

I’ve confirmed that the ngrok public URL works externally using curl and Postman while hotspotting to my phone. Unfortunately, the Tidbyt widget still shows the cloud icon and doesn't seem to access the proxy via the ngrok URL.

I suspect this is probably due to the widget not sending the necessary x-api-key and x-plex-token headers for authentication. Could this be the issue, and is there a way to configure the widget to send those headers?

Also, you mentioned "running the Tidbyt code and pushing it to your Tidbyt device yourself." Could you clarify what that means? Is hosting the widget code on my NAS and pushing it directly to the Tidbyt device an option? If so, I’d be interested in learning more about how to do this. Thanks for your help!

noahpodgurski commented 1 week ago

If you can't port forward I don't think it will work for you from their servers, sorry.

The other option is running a cronjob or something that runs every X minutes, which renders the file, and pushes it to your device, all within your local network. You can view more about it here

https://tidbyt.dev/docs/integrate/pushing-apps

owainri commented 1 week ago

Hey Noah

Thanks for the message. This thread has been super helpful, I've just decided to go down the route of configuring pixbyt and hosting the app on my NAS instead. I felt like I was banging my head on the wall until I confirmed my ISP was the cause of the issue. I'll close this off. Thanks!