NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 14 15 16 17 18 … 93 Next »
WinLIRC as a channel changer

 
  • 0 Vote(s) - 0 Average
WinLIRC as a channel changer
dneprrider
Offline

Member

Posts: 222
Threads: 20
Joined: Mar 2005
#11
2005-04-07, 08:58 PM
Good news to report.

Today I tested the "WinLIRC controlled by telnet" java code written by my friend. The java app accepts the recording service {channel} arguments and using a telnet session (port 8765 ) to the WinLIRC server, passes the channel number.

Testing Results:
GB-PVR in recording mode passes the {channel} argument to WinLIRC and WinLIRC does switch the external receiver channel.

There is a little more tweaking to do. i.e Modify the code to close the telnet session upon completion.
I have compiled the java code from .java to .jar so that it runs as an executable, and is selectable from GB-PVR configuration.

Here are the arguments passed to the java code.

Parameters: x.x.x.x 3100 {channel} 4
Where x.x.x.x = IP where WinLIRC is located
3100 = LIRC remote control config model number, which is 3100 in my case.
{channel}
4 = # of IR repeats. 4 works good for my receiver.


I believe there are some good application for using this technique within GB-PVR.
One being long distance control of a remote switching an external device. Could be in another room, building or country even.

Will post more later.
Regards,
Richard
rheslip
Offline

Junior Member

Posts: 32
Threads: 4
Joined: Jan 2005
#12
2005-04-07, 10:30 PM
Cool !

It might be handy to have a channel changer hanging off a network.

Suggestion - I found I needed a time delay between sending the digits. My sat box would see multiple keypresses if I didn't insert about a 1 sec delay before sending the next I.R. code.

Rich
dneprrider
Offline

Member

Posts: 222
Threads: 20
Joined: Mar 2005
#13
2005-04-07, 10:42 PM
rheslip Wrote:Cool !

It might be handy to have a channel changer hanging off a network.

Suggestion - I found I needed a time delay between sending the digits. My sat box would see multiple keypresses if I didn't insert about a 1 sec delay before sending the next I.R. code.

Rich

There is a preset 1s delay between the transmits in the code.
Richard
Offline

Member

Posts: 81
Threads: 12
Joined: Mar 2005
#14
2005-06-01, 10:00 PM
Hello dneprrider,

How goes the channel changing through GBPVR? Today I received an ESI-9680, ran WinLIRC and nothing seems to work. I have the Bell 2700 and 3100 sat boxes and neither of them appear to work with ESI-9680 (I am using the 3100 config file). I am not sure if it is the ESI-9680 or something I am doing. I tried to run the serial port watcher you noted above and it will not work as long as WinLIRC is running. How can I watch the serial port if I can't have the watcher and WinLIRC running at the same time?

Is the java app finished and ready for posting?

What did you set the channel changer in the GBPVR config file to?

This is the first time I am working with this and any comments would be helpful.
dneprrider
Offline

Member

Posts: 222
Threads: 20
Joined: Mar 2005
#15
2005-06-02, 12:24 AM
I have tried to answer your questions and added the steps to setup the IR transmitter.


A few things are needed. You may already have these but others may find it useful.

WINLIRC - http://WINLIRC.sourceforge.net/ install into c:\winlirc directory

Your Satellite receiver Remote Control configuration file - http://lirc.sourceforge.net/remotes/
(Look and see if your remote control is listed. If not try a similar config file! If none is available I cannot help.)

Note: In this example the satellite box will be the Bell “ExpressVu 3100” (The 3100 remote control config files work for the ExpressVu 2700)
Therefore use this remote config file http://lirc.sourceforge.net/remotes/expressvu/SAT_3100

All the files and pictures are contained in the attached IR.zip file.


How goes the channel changing through GBPVR?

I have been using my java telnet transmit code over the past month with great success from GBPVR. I have had to tweak the timings to get it right. I found a pause of 1.3s between the IR channel digits work best for my setup.


Today I received an ESI-9680, ran WinLIRC and nothing seems to work. I have the Bell 2700 and 3100 sat boxes and neither of them appear to work with ESI-9680 (I am using the 3100 config file)?

The 3100.cf file works for both the 2700 & 3100 Bell ExpressVu boxes. I have both here and tested them.

I am not sure if it is the ESI-9680 or something I am doing?

As for the Jeteye (ESI-9680) it appears this is not setup correctly yet.
Make sure you have it attached to the proper COM port configured in the WINLIRC configuration. See image 1.jpg for my settings.

I tried to run the serial port watcher you noted above and it will not work as long as WinLIRC is running?

Yes this is true. If the serial port is in use by one application it is locked to all others. I think I only looked at the data being sent to the com port.

How can I watch the serial port if I can't have the watcher and WinLIRC running at the same time?

From the WinLIRC main screen you can test the settings to see if WINLIRC is working with you external device. See 2.jpg

Pick your remote model in the remote widow i.e. 3100

The code window shows the different commands the remote can send. The picture shows POWER - this code turns on/off the satellite box. Point the jeteye at the satellite box.
Other commands are available i.e channels numbers, up/down etc. Try them out.

Try playing with the different codes and click the Send Code button. If WINLIRC is working then the WINLIRC round icon in the task bar turns BLUE when sending the remote code.

NOTE: If WinLIRC is not working at this stage then it won't work from GBPVR either.

I found that I had to place the jeteye close to the satellite receiver IR window to get it to work, 3 or 4 feet away was good. It worked intermittently at longer distances.

Try these steps and get it working up to this point. Then you will know that WINLIRC, and the jeyeye IR module are working.


Is the java app finished and ready for posting?
I guess I can put it out for others to try. I cannot support it, but I am sure someone here could if they wanted too. It is pretty simple to make changes if you have downloaded the free Java Development Kit from Sun.

JAVA Coding and running
There are a few things required for the app to work. As it is a java app and not a windows executable you may need to have the Java development kit (JDK) on your machine if you wish to change the java app. You also need the Java Runtime Environment (JRE) to run the final java .jar file. These are free from Sun but is a bit of a download. I also cannot support issues with this. Lots of good info on Google/Sun about this.

I am using for the JRE - j2re-1_4_2_08-windows-i586-p.exe
(download the latest from SUN)

I found it a bit of a procedure to take raw java code and compile it to work in windows, never having worked with java before.

How to turn java code into something useful:
Read on to see the process of how to modify and compile your own version. Or simply skip to the end and use the attached final zipped .jar file.

The uncompiled java app code is shown below I called it WinClient.java
(Copy into a text file called WinClient.java and edit to change the timing delays if required)
This file is then complied using a java complier at the dos prompt
(javac WinClass.java) thus creating a file called WinClient.class
Then this WinClient.class file needs to be made into a java windows executable .jar file.
For this I used the Java Launcher program. A free download from http://www.syncedit.com/download_javalauncher.html
See 4.jpg on the settings to make the .jar file.


Using the app in GBPVR
To use this app you also need to modify the registry settings created by the WinLIRC to use the telnet capability. i.e. add the correct winlirc telnet port, and telnet password. Use the same port and password values as shown here, or to simplify the procedure click on LIRC.reg in the zip file to quickly add this to your registry, do so at own risk. I will not be held responsible if this messes up your machine.

[HKEY_LOCAL_MACHINE\SOFTWARE\LIRC]
"port"="COM1"
"sense"=dword:00000002
"animax"=dword:00000000
"transmittertype"=dword:00000002
"conf"="C:\\winLIRC\\SAT_3100.cf"
"speed"=dword:00002580
"devicetype"=dword:00000000
"notrayicon"=dword:00000000
"virtpulse"=dword:0000012c
"tcp_port"=dword:0000223d
"password"="SEND_ONCE"


What did you set the channel changer in the GBPVR config file to?

See 3.jpg for my GBPVR settings.
Here are the arguments passed to the java code.

Parameters: x.x.x.x 3100 {channel} 4
Where x.x.x.x = IP where WinLIRC is located
3100 = LIRC remote control config model number, which is 3100 in my case.
{channel}- this is how GBPVR sends out the channel number to switch to
4 = # of IR repeats. 4 works good for my receiver.


Note:
If you want to change the timing code change the timing pause between channel digits in the java app WinClient.java modify the value in Thread.sleep(1300) where the 1300 are units in ms.
I found that 1.3s worked good for my setup.
Hope this helps.
Richard
Offline

Member

Posts: 81
Threads: 12
Joined: Mar 2005
#16
2005-06-04, 02:32 PM
Thank you very much for the details.

I have been working on this the past couple of evenings. The jeteye was not controlling the 3100 or the 2700. I finally figured it out...the remote address had to be set to 1 for the 3100.cf file to work. I can't seem to change the remote address on the 2700, therefore it appears that I will not be able to control it.

Now that I have WinLIRC and the jeteye working, I want to start using it with GB-PVR. I have installed the Java runtime. However, when I go to the .exe Channel Changer Configuration it requires an executable with a .exe extension. I noted in your third picture you are using the winclass.jar. How did you get the program to use .jar.

Thank you again for your help.
dneprrider
Offline

Member

Posts: 222
Threads: 20
Joined: Mar 2005
#17
2005-06-04, 03:20 PM
Browse to the correct directory and then it looks for a file with a .exe extension. Simply type in the correct file name with the .jar extension. i.e. WinClass.jar and click OPEN.
That should do it.
Let me know how you make out.
Richard
Offline

Member

Posts: 81
Threads: 12
Joined: Mar 2005
#18
2005-06-04, 03:23 PM
Thank you,

I now have it working with the 3100! This is great!
zingalala
Offline

Junior Member

Posts: 1
Threads: 0
Joined: Sep 2005
#19
2005-09-30, 06:55 PM
THer is another alternative than java app to interact with WinLIRC server. THis one is written in Perl so very easy to tinker with it. Also it has several command line switches for controlling repeats, delay, and a lot more. You will need to install Perl on your machin if you want to use .pl file or alternatively, you can use the compiled exe included. (But then you can't modify the original program!!)

http://www.dumbengineer.com/sage-lirc/

This one is not even fast enough for me, it takes 3 sec since I issue the command before the channel actually changes. I don't have problem of "remote interaction" since I am running server on the same machine as the client machine. So I am going to try combination of Girder ans SendMessage plugin. I will tell Girder to receive event from server and then forward it as a SendMessage to WinLIRC window. Let's see if this seeds up the channel change.
markbb1
Offline

Member

Posts: 155
Threads: 7
Joined: Jul 2006
#20
2006-07-15, 09:23 PM
dneprrider Wrote:I think it more appropriate to post this under the WINLIRC thread as opposed to the external channel changer broken thread, as it is apparent that the .exe channel changer works, and my problem rests with WinLIRC.

Here is what I have learnt over the past few days. Thanks to all who have responded with similar scripts/apps to test out similar functionality. All have indicated the same issue! Which I am getting too below.

I have written a simplified NT script file (channel.cmd) that takes in the {channel} argument from the .exe channel changer, and passes the channel numbers to the WINLIRC command line IR transmit.exe executable.

The script file also logs the passed channel numbers into a text file c:\input.txt in order to check that correct channel numbers are being passed.

Results:
From the GB-PVR TV guide I can select a TV channel to watch, channel changer calls the script file which parses the 3 digit channel number into 3 seperate digits, and then calls transmit.exe. The correct IR commands are sent and the external satellite box changes to the selected channel. As evident from the changed contents of input.txt file and the satellite box switching channels.

From a command window I can run channel.cmd followed by the channel number, whereby the transmit.exe executable is called and the external satellite box changes to the selected channel.

However when in recording mode for any selected “to be recorded” TV show channel, at the correct time, the channel.cmd script is run, but transmit.exe executable dosen’t run. Therefore the recording starts but the external satellite box channel remains at the original setting. The input.txt file logs the correct channel number so the channel.cmd script is running but transmit.exe is not being called. The same situation exists when in instant record mode.



Does any one have any idea why for sometimes a batch called file will run but at other times it would not? Any other suggestions or altarnatives to a serial port IR blaster would be greatly appreciated.

System
I am running this on a Toshiba Tecra XP Pro laptop with SP2 installed.
No TV in encoder card installed as this is my testing machine. Easier to move around than my P3 desktop which will be the final system when my Nvidia MX440 TV out card arrives.
I have added the directories used to my PATH statement and ensured that the .cmd extension is included in the PATHEXT.

Please see below for the channel.cmd script file

///////////////////////////////////////

@echo off
REM .exe channel changer send out the 3 digit channel number as one number
rem i.e {345}
rem
rem However TRANSMIT.exe sends out the remote codes serially
rem
rem usage: transmit remotename codename #times to repeat IR signal
rem
REM Need to pass a string of 3 numbers to TRANSMIT i.e 345
rem
rem Therefore need to parse the 3 digit channel# 345 into three arguments
rem for example:
rem
rem transmit 3100 3 1
rem transmit 3100 4 1
rem transmit 3100 5 1
rem
rem make it easy and hard code the remotename = 3100
rem make it easy and hard code the repeat = 1


rem Need to take in the {channel} as %1 then parse it into 3 digits

SET CHANNEL=%1


call C:\WINLIRC\transmit 3100 %CHANNEL:~0,1% 4
rem copy 1st digit of channel # into input.txt file for debug purpose
echo 3100 %CHANNEL:~0,1% 4 >> C:\INPUT.TXT
SLEEP 1

call C:\WINLIRC\transmit 3100 %CHANNEL:~1,1% 4
rem copy 2nd digit of channel # into input.txt file for debug purpose
echo 3100 %CHANNEL:~1,1% 4 >> C:\INPUT.TXT
SLEEP 1

call C:\WINLIRC\transmit 3100 %CHANNEL:~2,1% 4
rem copy 3rd digit of channel # into input.txt file for debug purpose
echo 3100 %CHANNEL:~2,1% 4 >> C:\INPUT.TXT
SLEEP 1


EXIT

/////////////////////////////////////////////////////////
I would think that if Winlirc was running as a service, it would be available to all sessions on that PC.
You could try the method described at
http://www.tacktech.com/display.cfm?ttid=197
to run Winlirc as a service.
I was trying to fix a problem with my setup (Winlirc/transmit.exe works in the Winlirc gui and when running your cmd script, until I launch the HTPC application, at which point the set top box stops responding:confused: ). The blaster "bud" I use flashes, indicating that codes are being transmitted, but the set top box does not respond anymore.
Running Winlirc as a service did not fix my problemSad , but it might fix yours.
If you try it, let me know if it works.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (3): « Previous 1 2 3 Next »


Possibly Related Threads…
Thread Author Replies Views Last Post
  API channel.stream.start mvallevand 2 1,444 2023-05-07, 09:40 PM
Last Post: mvallevand
  Way to tell programmatically if channel load in from NPVR has finished... gdogg371 3 2,445 2021-03-11, 03:59 PM
Last Post: mvallevand
  What is being sent when using /live?channel=3.1 scJohn 2 1,968 2020-01-30, 04:51 PM
Last Post: sub
  Web command to create recurring any channel mvallevand 2 2,654 2019-02-04, 03:09 PM
Last Post: mvallevand
  XMLTV Channel Number Option gdogg371 12 7,019 2018-07-18, 04:32 PM
Last Post: sub
  Channels List by Channel Group Name scJohn 1 2,816 2018-01-05, 10:45 PM
Last Post: mvallevand
  Channel List (native controller) psycik 2 3,155 2017-06-19, 09:14 AM
Last Post: psycik
  Getting all channel listings - decimal channel numbers psycik 11 8,463 2015-12-13, 02:17 AM
Last Post: seejaydee
  Channel/ChannelMapping whurlston 4 2,955 2014-04-14, 06:26 PM
Last Post: whurlston
  What causes a new tuner to be used services/live?channel= psycik 2 2,363 2014-02-04, 05:32 PM
Last Post: psycik

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

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

Linear Mode
Threaded Mode