tgorgdotcom / locast2plex

A very simple script to connect locast to Plex's live tv/dvr feature.
MIT License
233 stars 43 forks source link

4 Tuner emulation help. #9

Closed tharris9d closed 4 years ago

tharris9d commented 4 years ago

Is there a limit to the amount of streams we can record. Currently 2 channels record fine. Is it possible to record 4 by emulating HDHomerun Quatro? Does Locast limit the streams? I tried changing the code to 4 tuners but it didn't make any difference.

tgorgdotcom commented 4 years ago

Hello -- sorry for not getting back to you. There is some limiting of the streams occurring, but, if I recall correctly, the Locast webservice is super generous with how many concurrent streams are available for a given user.

In the code, the only places I'm aware of that would set max streams for Plex are the following (in v0.4.1):

Other than that, I could look into adding a feature to adjust available tuners, but I'm a little nervous because I don't want to make it possible to overload the Locast service either (but that might be my OCD talking). If anyone is listening from Locast, feel free to comment here :).

tharris9d commented 4 years ago

I did the following: Changed TunerCount to 4 Grabbed the info from my HD HomeRun Quattro (see below)
Boosted the listeners to 20 Cleared out my Plex Cache Cleaned Bundles and Database No matter what I do I still only show 2 tuners and can only record 2 streams. image

urn:schemas-upnp-org:device:MediaServer:1 Locast2Plex Silicondust HDHomeRun CONNECT QUATRO HDHR5-4US uuid:{} 'jsonDiscover': """{{ "FriendlyName": "Locast2Plex", "Manufacturer": "Silicondust", "ModelNumber": "HDHR5-4US", "FirmwareName": "hdhomerun5_atsc", "TunerCount": 4, "FirmwareVersion": "20200521", "DeviceID": "{0}", "DeviceAuth": "locast2plex", "BaseURL": "http://{1}", "LineupURL": "http://{1}/lineup.json" }}""",
lsalom commented 4 years ago

I was able to get 4 tuners setup. I changed TunerCount to 4 in template.py (and restarted locast2plex) I then re-added the tuner card in plex and 4 tuners were present.

Locast allow 4 streams for each user so setting 4 as the default should not be an issue unless you are clicking through channels quickly: Link to Locast help article on # of streams

tharris9d commented 4 years ago

I was able to get it working with 4 tuners by updating to 4.2. Now it matches my HD Homerun Quatro. Thanks!!

On Aug 5, 2020, 1:24 PM, at 1:24 PM, lsalom notifications@github.com wrote:

I was able to get 4 tuners setup. I changed TunerCount to 4 in template.py (and restarted locast2plex) I then re-added the tuner card in pplex and 4 tuners were present.

Locast allow 4 streams for each user to setting 4 as the default should not be an issue unless you are clicking through channels quickly: Link to Locast help article on # of streams

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tgorgdotcom/locast2plex/issues/9#issuecomment-669484034

jcastilloalonso commented 4 years ago

Hey, thanks a lot for this tool! Love it!!! Based on what I read, it seems Locast allows 4 simultaneous streams, but I do see the potential issues of having 4 and getting an error if you switch too fast. Does anybody know if we can set the default to 3? That would be a sweet spot of getting an extra stream while avoiding problems too often if fast switching.

tgorgdotcom commented 4 years ago

Thanks everyone for your contributions. After reading the comments I'm thinking I should expose a setting for number of streams as a attribute/docker variable, keeping a default of 3 streams like @jcastilloalonso mentioned.

doughnet commented 4 years ago

Thanks everyone for your contributions. After reading the comments I'm thinking I should expose a setting for number of streams as a attribute/docker variable, keeping a default of 3 streams like @jcastilloalonso mentioned.

would be awesome!

apristel commented 4 years ago

Is there any trick to spoof your location?

tgorgdotcom commented 4 years ago

@apristel not anything I'd like to divulge for legal reasons :)

cahiatt commented 4 years ago

I was able to get 4 tuners setup. I changed TunerCount to 4 in template.py (and restarted locast2plex) I then re-added the tuner card in plex and 4 tuners were present.

Locast allow 4 streams for each user so setting 4 as the default should not be an issue unless you are clicking through channels quickly: Link to Locast help article on # of streams

I tried this also but Plex still showing a two tuner DVR every time I try to add it back.

doughnet commented 4 years ago

I was able to get 4 tuners setup.

I changed TunerCount to 4 in template.py (and restarted locast2plex)

I then re-added the tuner card in plex and 4 tuners were present.

Locast allow 4 streams for each user so setting 4 as the default should not be an issue unless you are clicking through channels quickly:

Link to Locast help article on # of streams

I tried this also but Plex still showing a two tuner DVR every time I try to add it back.

Tried to remove and add tuner again? Maybe it requires re-adding it.

cahiatt commented 4 years ago

Tried to remove and add tuner again? Maybe it requires re-adding it.

Removed the tuner from Plex entirely. Even deleted the Docker container. Edited the file, started the container then did a new tuner search in Plex again. Always comes back with two tuner.

Other than that it has been working perfectly

eobie commented 4 years ago

Tried to remove and add tuner again? Maybe it requires re-adding it.

Removed the tuner from Plex entirely. Even deleted the Docker container. Edited the file, started the container then did a new tuner search in Plex again. Always comes back with two tuner.

Other than that it has been working perfectly

We you restart a docker, it pulls changes files back from the repository, so i bet your changes are being overwritten.

cahiatt commented 4 years ago

We you restart a docker, it pulls changes files back from the repository, so i bet your changes are being overwritten.

You had me curious so I opened the template.py file while the container is running and it shows 4 tuners.

eobie commented 4 years ago

We you restart a docker, it pulls changes files back from the repository, so i bet your changes are being overwritten.

You had me curious so I opened the template.py file while the container is running and it shows 4 tuners.

I run docker in unraid. In my case I'm pretty sure it does what I describe. Guess not in all cases. Sorry bud.

jcastilloalonso commented 4 years ago

Tried to remove and add tuner again? Maybe it requires re-adding it.

Removed the tuner from Plex entirely. Even deleted the Docker container. Edited the file, started the container then did a new tuner search in Plex again. Always comes back with two tuner.

Other than that it has been working perfectly

Did you restart Plex service after removing? A lot of times Plex caches too aggressively and might be not reading the new number. When dealing with DVR issues I always restart Plex multiple times and the issues go away.

cahiatt commented 4 years ago

Did you restart Plex service after removing? A lot of times Plex caches too aggressively and might be not reading the new number. When dealing with DVR issues I always restart Plex multiple times and the issues go away.

I did shut down the Plex server and service. I'll just uninstall it and clean up leftovers and try again. It sets up pretty quick.

tharris9d commented 4 years ago

I wanted to support Locast so I was going to double up on my donation. Instead I created a new account to see if I could add a 2nd Tuner giving me 4 per account and 8 streams total. I've had it working for a few days now. I have recorded 8 shows at once successfully. I have also tuned into the same channel from 3 different devices. IT WORKED. (Quite a strain on my under-powered Plex Server). I haven't been locked out of Locast! (yet). I have a tutorial coming soon if anyone is interested. Locast2Plex and Locast2Plex2nd are running as Windows Services. image

doughnet commented 4 years ago

I wanted to support Locast so I was going to double up on my donation. Instead I created a new account to see if I could add a 2nd Tuner giving me 4 per account and 8 streams total. I've had it working for a few days now. I have recorded 8 shows at once successfully. I have also tuned into the same channel from 3 different devices. IT WORKED. (Quite a strain on my under-powered Plex Server). I haven't been locked out of Locast! (yet). I have a tutorial coming soon if anyone is interested. image

interesting. i personally think 4 tuners is more than enough unless looking at it to be used at a datahoarding source and want to scrub OTA.

a simple modification/setting change in the configuration would be sufficient to switch from 2 to 4.

tharris9d commented 4 years ago

My brother is the issue for me. He is watching and recording shows and then I get locked out because all the streams were taken. LOL. I will probably never use all the streams at once except to test but will keep them active.

jcastilloalonso commented 4 years ago

I wanted to support Locast so I was going to double up on my donation. Instead I created a new account to see if I could add a 2nd Tuner giving me 4 per account and 8 streams total. I've had it working for a few days now. I have recorded 8 shows at once successfully. I have also tuned into the same channel from 3 different devices. IT WORKED. (Quite a strain on my under-powered Plex Server). I haven't been locked out of Locast! (yet). I have a tutorial coming soon if anyone is interested. Locast2Plex and Locast2Plex2nd are running as Windows Services. image

That's a neat idea if you want to record a lot of shows. Remember that multiple people can watch the same channel under Plex and still only count as one stream. So in theory you can have 20 people watching 1 channel and still have 3 tuners available to record. (if configured as 4 tuner)

I looking for next update so we can configure the a mount of tuners with a flag before I remove and add it again it to Plex, currently 2 is more than enough for my needs.

doughnet commented 4 years ago

My brother is the issue for me. He is watching and recording shows and then I get locked out because all the streams were taken. LOL. I will probably never use all the streams at once except to test but will keep them active.

make sense and you found a workaround ... awesome!

cahiatt commented 4 years ago

I wanted to support Locast so I was going to double up on my donation. Instead I created a new account to see if I could adfrom 3 different devices. IT WORKED. (Quite a strain on my under-powered Plex Server). I haven't been locked out of Locast! (yet). I have a tutorial coming soon if anyone is interested. Locast2Plex and Locast2Plex2nd are running as Windows Services. image

I'm interested. In actually tried this the other night by creating a second container and changing the ports but didn't get it to work. I didn't spend much time troubleshooting so your tips would be great.

I've got six in the house so 8 streams would be perfect to cover recording and live viewing.

jcastilloalonso commented 4 years ago

Hey @tgorgdotcom I've been playing on how to change the amount of tuners in Plex, specially as some people (myself included) are having a headache changing the amount of tuners from 2 to 4 (or any number)

Seems Plex caches the uuid used and "remembers" the number of tuners used, so the complete/correct solution would need to use a different uuid based on the amount of tuners being used.

Check here on same issue happening with xteve: https://www.reddit.com/r/PleX/comments/dadjle/delete_the_old_dvr_settings_from_server/

Hope this helps implementation!

tharris9d commented 4 years ago

Changing the Uuid is part of my tutorial for adding a 2nd Instance to Locast2Plex. It would be great if we could pass it as an option!!

On Aug 21, 2020, 11:21 PM, at 11:21 PM, jcastilloalonso notifications@github.com wrote:

Hey @tgorgdotcom I've been playing on how to change the amount of tuners in Plex, specially as some people (myself included) are having a headache changing the amount of tuners from 2 to 4 (or any number)

Seems Plex caches the uuid used and "remembers" the number of tuners used, so the complete/correct solution would need to use a different uuid based on the amount of tuners being used.

Check here on same issue happening with xteve: https://www.reddit.com/r/PleX/comments/dadjle/delete_the_old_dvr_settings_from_server/

Hope this helps implementation!

-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/tgorgdotcom/locast2plex/issues/9#issuecomment-678602260

jcastilloalonso commented 4 years ago

Agreed, ideally we could use a config file so we don't have to pass so many parameters, plus security wise, it would be better as the user/password would not be exposed on a simple ps aux command.

cahiatt commented 4 years ago

Hey @tgorgdotcom I've been playing on how to change the amount of tuners in Plex, specially as some people (myself included) are having a headache changing the amount of tuners from 2 to 4 (or any number)

Seems Plex caches the uuid used and "remembers" the number of tuners used, so the complete/correct solution would need to use a different uuid based on the amount of tuners being used.

Check here on same issue happening with xteve: https://www.reddit.com/r/PleX/comments/dadjle/delete_the_old_dvr_settings_from_server/

Hope this helps implementation!

I did a quick run through on that and came back with two timers again. Ugh....

Will try again tonight when I have time to dig into it.

tgorgdotcom commented 4 years ago

@jcastilloalonso - Good point on username/password. I'm going to move most settings to a config file.

A few thoughts on the UUID -- hopefully this will help for anyone wanting multiple services: Generally the UUID is generated on the very first run. It's saved to a file called service_uuid and referred to whenever locast2plex is reloaded. So, to have multiple services, you could either:

wdreiling commented 4 years ago

I deleted the service_uuid file and reloaded the service. Then I re added the tuner (having removed it earlier) and it shows up with 4 tuners now. Pretty slick!

tgorgdotcom commented 4 years ago

Just to add, the new config.ini feature will now allow you to change tuner count (max 4) and the uuid without modifying the code. Locast2Plex will still autogenerate a uuid, but will put the value in the config so you can change it (or remove it -- in that case it will autogenerate a new one).

cahiatt commented 4 years ago

Am I blind or stupid? I can't find the 0.5.2 version anywhere.

cahiatt commented 4 years ago

Am I blind or stupid? I can't find the 0.5.2 version anywhere.

Disregard. I found it when I pulled my head out of my butt.