2016-03-02, 03:47 AM
Hi All,
I live in the US and our local Telco ran fiber through our neighborhood. I switched from TWC to the fiber provider, Cincinnati Bell. When I had TWC I was using MythTV with a Hauppauge HD-PVR. When I switched I knew it was going to be some reconfiguration because the fiber provider uses IPTV with no RF overlay and ZTE set top boxes. The major issue is that no one had a LIRC config for the ZTE STBs to issue IR commands for channel changes. I purchased an Iguanaworks USB IR transceiver and made a raw LIRC config file. MythTV was back up and running with the ability to change channels, but I noticed when I ran an HDBase-T extended that HDCP was not being transmitted through my new STBs. I figured this was an opportunity to use NextPVR with an HD-PVR2 (using HDMI output instead of component).
My raw LIRC config file worked fine with WinLIRC, but I had to write a script to issue the channel change commands to WinLIRC using the TCP interface. I looked in the forums and saw mentions of Java scripts, Perl scripts, but I didn't find the actual code. So, I just wrote a very small script in AutoIt. Compiled it as a console application and it is working fine with NextPVR. Here is the code if anyone has a use for it. Thank you NextPVR developers and contributors. I plan to donate in the near future.
I live in the US and our local Telco ran fiber through our neighborhood. I switched from TWC to the fiber provider, Cincinnati Bell. When I had TWC I was using MythTV with a Hauppauge HD-PVR. When I switched I knew it was going to be some reconfiguration because the fiber provider uses IPTV with no RF overlay and ZTE set top boxes. The major issue is that no one had a LIRC config for the ZTE STBs to issue IR commands for channel changes. I purchased an Iguanaworks USB IR transceiver and made a raw LIRC config file. MythTV was back up and running with the ability to change channels, but I noticed when I ran an HDBase-T extended that HDCP was not being transmitted through my new STBs. I figured this was an opportunity to use NextPVR with an HD-PVR2 (using HDMI output instead of component).
My raw LIRC config file worked fine with WinLIRC, but I had to write a script to issue the channel change commands to WinLIRC using the TCP interface. I looked in the forums and saw mentions of Java scripts, Perl scripts, but I didn't find the actual code. So, I just wrote a very small script in AutoIt. Compiled it as a console application and it is working fine with NextPVR. Here is the code if anyone has a use for it. Thank you NextPVR developers and contributors. I plan to donate in the near future.
Code:
; AutoIt3 program to issue channel change commands to WinLIRC
; compile this program as a console application using: "aut2exe.exe /in <filename.au3> /out <filename.exe> /console"
#AutoIt3Wrapper_Change2CUI=y
#include <Array.au3>
$sockhost = "127.0.0.1" ; should be set to the IP of the host where WinLIRC is running
$sockport = "8765" ; should be set to the port on the host where WinLIRC is running
If $CmdLine[0] = 0 Then
ConsoleWrite("Usage: changer {channel number}" & @CRLF) ; show usage if no channel number is provided
Else
$parmlen = StringLen($CmdLine[1])
If StringIsDigit($CmdLine[1]) Then ; Make sure the channel number provided is numeric
$channel = StringSplit($CmdLine[1],"")
TCPStartup()
$socket = TCPConnect($sockhost, $sockport)
For $i = 1 To $parmlen Step 1 ; Send the channel number string to WinLIRC
TCPSend($socket, "SEND_ONCE zte2 BTN_" & $channel[$i] & @CRLF)
sleep(1000)
Next
TCPCloseSocket($socket)
TCPShutdown()
Else
ConsoleWrite("Only digits are allowed as channel parameter" & @CRLF)
EndIf
EndIf