As it is posted, at least for Windows, HDHomeRun Plug-in no longer works with PMS.
I am attempted to rectify that and upgrade the plug-in to V2 API and make it work with HDHomeRun Prime
I am new to Plex and python and have run into many hurdles.
Mainly, lack of documentation of V1 API and many API development examples are based on V1.
I have overcome most of them and now I am stuck on the last hurdle.
It seems that HDHOMERUN:// stream type is no longer available in PMS after PLEX9.
There is a chance this problem can be overcome in the plug-in.
There are a very specific steps that need to happen to watch a stream from a HDHomeRun device.
Note: Silicondust has created a command line control program (hdhomerun_config) for most OSs.
The following came from here:
[http://www.silicondu...development.pdf](http://www.silicondust.com/hdhomerun/hdhomerun_development.pdf)
Here is an example of streaming to VLC.
Example: Streaming to VLC:
Run VLC: File, Open Network Stream. Select UDP/RTP. Specify port 5000.
Discover the HDHomeRun:
hdhomerun_config discover
Run a channel scan:
hdhomerun_config FFFFFFFF scan /tuner0 scan0.log
Set the physical channel:
hdhomerun_config FFFFFFFF set /tuner0/channel auto:651000000
Check sub-programs:
hdhomerun_config FFFFFFFF get /tuner0/streaminfo
Select a sub-program:
hdhomerun_config FFFFFFFF set /tuner0/program 3
Set the target:
hdhomerun_config FFFFFFFF set /tuner0/target :5000
Note: there is an option to pipe the stream to a program.
[indent]eg: hdhomerun_config FFFFFFFF save /tuner0 - | vlc -
[/indent]When done streaming the HDHomeRun channel needs to set to none.
hdhomerun_config FFFFFFFF set /tuner0/channel none
If this step is not done, only the very first connection attempt to each tuner will be able to watch a stream. subsequent requests will be rejected.
I think most of this can be handled through python call method.
The biggest issue is the these two items.
[list][*]You need to tell the HDHomeRun device to stream to a specific target.[/list]In order to support the most clients we need to Plex to transcode if needed.
[list][*]Being notified when the client has disconnected / stopped the stream.[/list]The the steps might be.
1. Tell Plex transcoder to listen for a stream. return the port it is listening on and the port it is transcoding to.
2. Use the listening port to tell HDHomeRun to stream to the plex transcoder.
3. Tell the client to connect to the Plex transcoder on the output port.
Note: Not all clients can handle all stream types or video or audio codecs, so initially the focus would be PMC and ROKU. (So this might need to be wrapped with HTTP?)
4. Wait for Client to send stop or disconnect, so the HDHomeRun can stop the streaming.
I am willing to entertain all suggestions on how to solve this.
I did not necessarily want to brute force a solution, however; the V2 development documentation is sparse.
I am attaching my current version of the plug-in.
Note: This is extremely alpha code. I have left a lot of debug, test and original code in.
Please feel free to suggest any improvements to the existing code.
If you do suggest a better way to solve something, all I ask is you point me to some reference, so I can understand why that is a better choice.
Thanks for any assistance.
For the next few weeks I may not have access to my home network, so I may not be able try any solutions.
HDHomeRunV2.bundle.zip (4.66 MB)
Cal
Everyone,
I appreciate your debug logs, however; this plugin is a work in progress, and does not currently work.
It needs a lot of effort.
There a quite a few hurdles to solve before it is usable.
The purpose of this topic was two fold.
One, attempt to expose issue discovered as developing a plug-in goes.
Two, solicit help and ideas when I get stuck at different areas.
Unless your like to get your hands on code, or a glutton for punishment, please do not install this plugin.
When I get to a point where it might work, I will update this message.
Thanks for being patient.
Cal