IMPORT ENIGMA2 CHANNELS, THROUGH OPENWEBIF, TO TVHEADEND
First of all, give thanks to Luis Pascual, Luispa, for the .py file that let us to convert the .m3u we get from openwebif to hts format, tvheadend. iptv2hts.py is a forked work based on m3u2hts git. This project, let you to manage EPG and picons too.
Tested with TVHeadend 4.3 unstable on RPI3/Ubuntu-Debian
Raspberry pi3 method
What you need to have is a linux environment and a enigma2 receiver.
We get it in three simple steps: (now the m3u file method used on debian/ubuntu works on raspberry pi3 with 4.3 tvheadend unstable versions, maybe on stable versions too)
Copy iptv2hts.py and movistartv-canales.m3u of services or stream we get from openwebif to the tvheadend instalation folder, it would be /etc/tvheadend in ubuntu distro, I think so.
Give permissions 777 to iptv2hts.py:
#sudo chmod 777 /home/hts/.hts/tvheadend/iptv2hts.py #sudo chown hts:hts /home/hts/.hts/tvheadend/iptv2hts.py
we are giving the same owner and group to the .py file as tvheadend folder, maybe you have owner 'hts' and group 'video', so adapt it to tvheadend folder.
Now, we have to stop tvheadend:
#service tvheadend stop
Then, we have to run this line on console, inside the folder /home/hts/.hts/tvheadend and logged in as hts user (sudo chmod 777 iptv2hts.py):
#/home/hts/.hts/tvheadend$./iptv2hts.py -r -n 0 -i eth0 -c utf-8 services.m3u
all this parameters ara selected by default, not -r, but -r parameter don't have any repercusion on enigma2 .m3u file of OWIF, so we could launch simply
We are deleting the channel number before channel name (-r) to generate correlative channel number (-n 0) the interface we are working with (-i eth0, for example) we indicate the m3u code (-c utf-8), and finally the *.m3u file we want to convert.
This will create the channels on tvheadend, the input name comes inside the .py file, you can change it before run the .py, by default the input network name will be IPTV Movistar.
Now, lets to start tvheadend
#service tvheadend start
Now, when we go to configuration>dvb inputs>networks we will find the network we define inside the .py file or the default network name IPTV Movistar.
It's the moment to force scan of the network, taking in consideration one thing:
If we import a complete service with several channels, we have to edit the input network and we place 1 on maximun # input stream field.
If we import a single channel, it doesn't care.
Now select the network and click to force scan. You will see how the total muxes goes to scan queue, and decrease up to 0. When all muxes are scaned with their services, we can go to services, and map all services.
Finally we will have all channels created on tvheadend.
We edit input again and put 0 where we had 1 on max# input stream, this way tvheadend will stop to test each channel on input continuously. (if you check status>stream you will see the input channel test 1 by 1 always running if you leave max # input stream on 1 value)
TVHeadend works fine on ubuntu/debian distro, more powerful hardware, and new tvheadend working features.
So easy as creat an input, IPTV automatic, max # input streams value to 1. First URL field you have to put the m3u file path, f.i. file:///home/hts/.hts/tvheadend/services.m3u (yes, file:///) We create the input and if it doesn't start to scan, click on force scan. We will get the same result as raspberry, but it put a channel number and leave the same channel order as m3u list.
TVHEADEND TO PLEX MEDIA SERVER
it's to share tvheadend channels we have got to a plex server, it's easy and quick, through a plex plugin.
We download the plugin
We extract the folder and rename the folder tvheadend-ng.bundle.master to tvheadend-ng.bundle
and place by ftp to /var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins
Now we are going to connect by ssh console to give permisions and restart plex server:
#cd "/var/lib/plexmediaserver/Library/Application Support/Plex Media Server/Plug-ins/"
#chown plex:plex -R tvheadend-ng.bundle
#service plexmediaserver restart
We enter to plex media server and we will see tvheadend plugin on our plexmediaserver, we fill in all plugin settings fields to access our tvheadend, user, pass, port, we save changes and restart plex media server.
Once again we enter to media plex, and we would have to see our channels we have imported with the method taught before (iptv2hts/M3U Url).
=== Now we have 3 more resources to get it ===
1) tvhproxy on this github: https://github.com/jkaberg/tvhProxy
2) One more plex plugin: https://github.com/taligentx/LiveTVH.bundle
3) The enigma2 plugin, HR-tuner proxy on plugin feeds download