Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Add SSDP support #48

Merged
merged 8 commits into from
May 24, 2018
Merged

[WIP] Add SSDP support #48

merged 8 commits into from
May 24, 2018

Conversation

hazcod
Copy link
Contributor

@hazcod hazcod commented Feb 27, 2018

Add uPNP/SSDP support, so that discovery and heartbeat of telly works.
This will fix the 'tuner not available' errors.

@hazcod hazcod mentioned this pull request Feb 27, 2018
@tombowditch
Copy link
Collaborator

Looking good so far, will take a look myself later.

@hazcod hazcod changed the title add untested ssdp stuff [WIP] Add SSDP support Mar 6, 2018
@hazcod hazcod added enhancement New feature or request help wanted Extra attention is needed labels Mar 6, 2018
@lellimecnar
Copy link

I'm pretty sure this is the issue I'm having. I'm looking forward to this fix! 😁

@tombowditch tombowditch added this to To do in telly Mar 16, 2018
@handyhelp
Copy link

any news about this issue? I get the error too tuner not found on my synology nas 😊

@hazcod
Copy link
Contributor Author

hazcod commented Mar 22, 2018

This needs to be done in a channel, which honestly I am not familiar with.
You worked with it before @tombowditch ?

@hazcod hazcod mentioned this pull request Apr 24, 2018
@hazcod
Copy link
Contributor Author

hazcod commented May 8, 2018

@tombowditch this should work theoretically (looking at other work like https://github.com/OpenViX/HRTunerProxy/blob/master/plugin/ssdp.py), but plex marks it as dead.
Ideas?

May 08, 2018 15:22:58.197 [0x70000b1e9000] DEBUG - DVR:Device: Discovering and refreshing devices.
May 08, 2018 15:22:58.197 [0x70000b1e9000] DEBUG - DVR:Grabber: HDHomerun discovered 0 compatible devices.
May 08, 2018 15:22:58.197 [0x70000b1e9000] DEBUG - DVR:Device: Testing grabber HDHomerun device device://tv.plex.grabbers.hdhomerun/12345678 at http://localhost:6077
May 08, 2018 15:22:58.200 [0x70000b1e9000] DEBUG - DVR:Device: Device device://tv.plex.grabbers.hdhomerun/12345678 died
May 08, 2018 15:22:58.200 [0x70000b1e9000] DEBUG - DVR:Grabber: Mystery discovered 0 compatible devices.

@hazcod
Copy link
Contributor Author

hazcod commented May 14, 2018

Its not responding to M-HEAD from plex, thus plex marking it as dead.

@japaol
Copy link

japaol commented May 18, 2018

Reducing interval time in 'sendAlive' from 300s to something smaller seems to work for me (i'm using 15s right now)

@hazcod
Copy link
Contributor Author

hazcod commented May 18, 2018

Aha! Will try that tonight

@hazcod
Copy link
Contributor Author

hazcod commented May 18, 2018

@japaol touch test && go build main.go && ./main -playlist=test with aliveTick := time.Tick(15 * time.Second) or even 10s on every interface will not show telly in the search in Plex. What did you do?

@japaol
Copy link

japaol commented May 19, 2018

@hazcod I had to specify a UUID as device Id and a listen interface. I think i have not touch anything else.

@hazcod
Copy link
Contributor Author

hazcod commented May 19, 2018

I tried with go build main.go && ./main -playlist=test -listen=192.168.0.167:6077 -deviceid="2650EB7E-1768-4503-9FDA-E7377F3A640C", but still nothing.

@japaol
Copy link

japaol commented May 19, 2018

@hazcod Mine is ./telly -logrequests -playlist Movistar.m3u -streams 99 -listen 192.168.1.98:6077 -deviceid a5288e73-409f-4191-b02d-2bf963433d7e. I compiled telly with make, in raspbian.
I noticed that Windows shows telly as a multimedia device, in Networking, so it seems that SSDP is working well. My Plex Media Server is running on Windows.

@hazcod
Copy link
Contributor Author

hazcod commented May 20, 2018

But did it pop up automatically when adding a new tuner under Plex?

@japaol
Copy link

japaol commented May 21, 2018

I think i have managed to get it working.
Looking in another projects that emulates HDHomerun, like https://github.com/geertbongers/tvhProxy or https://github.com/TheJF/antennas, it seems that some models of HDHomerun uses its own discovery protocol on port 65001, and others models uses SSDP. So, changing the ModelNumber in the device.xml could make a change in Plex.
Furthermore, the DeviceID of the HDHomerun has to be a eight char Id, but in SSDP we need a UUID.
So this is what i have do:
Changes in code:

  • ModelNumber to HDTC-2US
  • DeviceId fixed to 12345678
  • Reduce alive interval to 15s
    Run telly specifing a valid UUID as deviceId

With all of this, Plex detects telly at the first alive notification sent.

@hazcod
Copy link
Contributor Author

hazcod commented May 21, 2018

@japaol can you try with this build? @tombowditch do you still have an IPTV subscription to test?

telly-build.zip

Edit: web gui still shows;

image

@tombowditch
Copy link
Collaborator

@hazcod I do, yes! :-)

@japaol
Copy link

japaol commented May 21, 2018

It works, but I think that Plex search for the word HDHomerun in the friendlyName to detect it as a valid HDHomerun tuner.
In all tests I made, if I left the friendly name as default telly, Plex found nothing. But it I change to telly HDHomerun Plex starts to detect the tuner.

Note: between each tests, i had to restart Plex Media Server because sometime it gets stuck and says that no tuner available (i think that it is related to some internal timers or cache)

image

This one is the instance that I'm using since weekend.
image

@hazcod
Copy link
Contributor Author

hazcod commented May 22, 2018

Committed the change to the friendly name (I remember seeing this myself), will test tonight.

@hazcod
Copy link
Contributor Author

hazcod commented May 22, 2018

Ok, so I finally got it to work if I restart Plex after adding telly!
@tombowditch can you test as wel? So we can merge,

image

@myusuf3
Copy link

myusuf3 commented May 23, 2018

I tested it! it works.

@hazcod
Copy link
Contributor Author

hazcod commented May 24, 2018

@tombowditch I will go ahead and merge it, but will not release a new version. I'll leave that up to you.

@hazcod hazcod merged commit 9449aca into tellytv:master May 24, 2018
@hazcod hazcod deleted the feat-ssdp branch May 24, 2018 06:01
@tombowditch
Copy link
Collaborator

All good! Many thanks for your work all. I will release a new version later today.

@hazcod
Copy link
Contributor Author

hazcod commented May 24, 2018

Thanks Tom, and thank you for your input @japaol !

@myusuf3
Copy link

myusuf3 commented May 24, 2018

@hazcod how do you keep guides in sync, I have guide working for a couple of days then they get old. I am using p2.xml method. ideas?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
telly
  
To do
Development

Successfully merging this pull request may close these issues.

None yet

7 participants