NextPVR Forums
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Hardware v
« Previous 1 … 8 9 10 11 12 … 261 Next »
AutoIt3 program to change channel with WinLIRC

 
  • 0 Vote(s) - 0 Average
AutoIt3 program to change channel with WinLIRC
drake3
Offline

Junior Member

Posts: 1
Threads: 1
Joined: Feb 2016
#1
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.

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
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Add Colossus as a Single Channel source txinga 4 909 2022-01-04, 08:51 PM
Last Post: txinga
  Improve reliability of STB channel changing? jksmurf 39 9,734 2019-09-29, 07:07 AM
Last Post: jksmurf
  Global Cache Channel Changer (IR Blaster) Executable jksmurf 0 1,686 2019-03-18, 08:07 AM
Last Post: jksmurf
  Change device type kgvelkov 4 1,842 2018-10-11, 04:04 PM
Last Post: kgvelkov
  Channel export/import with capture device change ga_mueller 9 3,457 2016-10-24, 01:07 AM
Last Post: sub
  Channel changing a UK SKY HD+ (sky make) via hauppauge colossus 2 IR Blaster TheWiFiWizard 13 6,714 2016-09-13, 09:06 AM
Last Post: martint123
  Copy-Once and Copy-Freely by stream/program or channel? Lone_Stranger 10 5,347 2015-09-13, 12:15 AM
Last Post: sub
  HDPVR cannot change channel adc 8 4,123 2014-07-27, 02:40 AM
Last Post: sub
  Direct TV & IP Channel Changing smajor 2 1,543 2013-11-13, 03:12 PM
Last Post: smajor
  Channel changer? (which are good and small). SFX Group 2 1,460 2012-06-13, 11:06 PM
Last Post: JonnyCam

  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode