alexjsp / homebridge-plex-sensors

Homebridge Sensors for Plex - a plugin for Homebridge to adds sensors triggered by Plex playbacks.
MIT License
110 stars 10 forks source link

Plex sponsor for a friends sensor #16

Open Lucasfranz123321 opened 5 years ago

Lucasfranz123321 commented 5 years ago

I actually mostly use a friends server and wanted to ask if its possible to use those sensors without installing something on his Server?

alexjsp commented 5 years ago

It is technically possible, but might be hard to configure in a way that was secure (assuming your friend's server is on a different local network and you're accessing it over the internet anyway).

This plugin uses Plex's webhooks, which work by the server calling a specific URL to tell it about playbacks etc. Webhooks are configured on your user account so will apply to your playbacks from your friend's server, but the webhook URL has to be accessible to the server that is starting the playback.

So that means if you expose the endpoint provided by this plugin to the internet, it could be called by a remote server successfully. However I probably wouldn't recommend that, as anyone could call that endpoint with fake data and possibly trigger things in your Home, which would obviously be undesirable.

There are ways you could make that more secure by configuring a remote proxy to add SSL encryption etc, but I probably wouldn't recommend it unless you're very careful / understand the risks.

(EDIT: All of the above applies equally to any server not on the same local network as your homebridge install, regardless of whether you own the server or not)

Lucasfranz123321 commented 5 years ago

Okay I won't do it then... Thank you for your Answer anyway :)

Lucasfranz123321 commented 5 years ago

Just quick a bit different question now with the integration of TV's in iOS 12 like the harmony and TV plugins here. (Example: https://github.com/merdok/homebridge-webos-tv) You think it would be possible to make the Plex remote we know from the plex app show up in Homebridge as an TV remote or even create switches to launch our favorite TV show randomly?

clemone210 commented 3 years ago

I actually mostly use a friends server and wanted to ask if its possible to use those sensors without installing something on his Server?

I have my Plex server based in Luxembourg and I live in Germany. I use Nginx Proxy Manager on all my sites. You can run it on a raspberry pi. So my config is on each server: Docker Container for Nginx Proxy Manager as well as an DDNS-Updater to update my dynamic IPs. With this I can secure access all my stuff.

For Homebridge I have my domain on my local network in Germany as following homebridge.mydomain.com I created a subdirectory homebridge.mydomain.com/plex-sensor to point at the homebridge plex-sensor plugin. So you friend can add your url as webook and you can configure your sensors accordingly.