|
SageTV Github Development Discussion related to SageTV Open Source Development. Use this forum for development topics about the Open Source versions of SageTV, hosted on Github. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
USB-UIRT Gentuner
I am testing a linux Sagetv V9 installation but having difficulties setting up my HDPVR to use the generictunerplugin and the USB-UIRT. I would appreciate if anyone has a working gentuner script they don't mind sharing? I am trying to change channels on a FIOS Motorola QIP-7100 STB with LIRC. Thanks!
|
#2
|
||||
|
||||
here's what I've got running right now for mine:
gentuner Code:
#!/bin/bash # # gentuner.LIRC # GenericTunerPlugin to LIRC Connector # # See gentuner.README for details on gentuner # # This script proxies commands from the Generic Tuner Plugin # to LIRC. If the remote name defined in the lircd.conf file # ends in "-N" (where N is 1, 2, 3 or 4), it will also # use SET_TRANSMITTERS to restrict which emitters LIRC uses. # Your LIRC hardware must support this feature. # CMD=$1 REMOTE=$2 KEY=$3 CHANNEL=$3 DELAY=.1 LOCKFILE=/tmp/lirclock if [ "$CMD" = "REMOTES" ]; then /usr/bin/irsend LIST "" "" 2>&1 | cut -d" " -f2 elif [ "$CMD" = "KEYS" ]; then /usr/bin/irsend LIST "$REMOTE" "" 2>&1 | cut -d" " -f3 elif [ "$CMD" = "SEND" ]; then while [ -f $LOCKFILE ] do #echo "Waiting for lock" sleep $DELAY done touch $LOCKFILE POST=${REMOTE:(-2)} TRANSMITTER_NUM=${REMOTE:(-1)} /usr/bin/irsend SEND_ONCE $REMOTE $KEY sleep $DELAY rm $LOCKFILE elif [ "$CMD" = "TUNE" ]; then echo "NO" elif [ "$CMD" = "CAN_TUNE" ]; then echo "NO" else exit 1 fi Code:
#Chosen Remote Control REMOTE="USB-UIRT-REMOTE" REMOTE_MODULES="" REMOTE_DRIVER="usb_uirt_raw" REMOTE_DEVICE="/dev/ttyUSB0" REMOTE_SOCKET="" # Perhaps the following setting could move the lircd.conf file to the sagetv/server/lirc/ directory - I have not tested. REMOTE_LIRCD_CONF="lircd.conf" REMOTE_LIRCD_ARGS="-d /dev/ttyUSB0" #Chosen IR Transmitter TRANSMITTER="USB-UIRT-TRANSMITTER" TRANSMITTER_MODULES="" TRANSMITTER_DRIVER="usb_uirt_raw" TRANSMITTER_DEVICE="/dev/ttyUSB0" TRANSMITTER_SOCKET="" TRANSMITTER_LIRCD_CONF="lircd.conf" #This was important to get it to work with gentuner or you could edit the script to include the socket to use, but it fails without mention of the device to irsend. TRANSMITTER_LIRCD_ARGS="-d /var/run/lirc/lircd1" #Disable kernel support. #Typically, lirc will disable in-kernel support for ir devices in order to #handle them internally. Set to false to prevent lirc from disabling this #in-kernel support. #DISABLE_KERNEL_SUPPORT="true" #Enable lircd START_LIRCD="true" #LIRCD_ARGS="-d /var/run/lirc/lircd1" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD="false" #Try to load appropriate kernel modules LOAD_MODULES="false" # Default configuration files for your hardware if any LIRCMD_CONF="" #Forcing noninteractive reconfiguration #If lirc is to be reconfigured by an external application #that doesn't have a debconf frontend available, the noninteractive #frontend can be invoked and set to parse REMOTE and TRANSMITTER #It will then populate all other variables without any user input #If you would like to configure lirc via standard methods, be sure #to leave this set to "false" FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD="" Code:
# # this config file was automatically generated # using lirc-0.6.6(sir) on Wed Mar 24 22:28:59 2004 # # Modified by Stephane Lavergne <stephane|iMars.com>: # Base frequency is 56kHz, irrecord was otherwise right on. # # contributed by # # brand: Scientific Atlanta # model no. of remote control: AT8400 # devices being controlled by this remote: Explorer 8000 # begin remote name SAE8000 bits 22 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 3397 3372 one 827 2557 zero 827 855 ptrail 827 gap 101386 toggle_bit 0 frequency 56000 begin codes power 0x000000000037C107 guide 0x000000000036C127 menu 0x000000000036F920 info 0x000000000036213B select_up 0x000000000036812F select_down 0x000000000037A10B select 0x0000000000366133 select_left 0x000000000037810F select_right 0x0000000000364137 select_page+ 0x000000000036D924 select_page- 0x000000000037D904 exit 0x0000000000366932 settings 0x0000000000373918 A 0x000000000037E902 B 0x000000000036193C C 0x000000000037191C vol+ 0x000000000036093E vol- 0x000000000037091E ch+ 0x0000000000377111 ch- 0x000000000036F121 mute 0x000000000036892E fav 0x000000000037F101 last 0x000000000036E123 rew8secs 0x000000000037C906 list 0x000000000036C926 live 0x000000000036B129 rew 0x000000000037291A ff 0x000000000036293A play 0x000000000037990C stop 0x0000000000365934 pause 0x0000000000374117 rec 0x0000000000375914 1 0x000000000036113D 2 0x000000000037111D 3 0x000000000036912D 4 0x000000000037910D 5 0x0000000000365135 6 0x0000000000375115 7 0x000000000036D125 8 0x000000000037D105 9 0x0000000000363139 asterisk 0x000000000037E103 0 0x0000000000373119 pound 0x000000000036B928 pip_power 0x000000000037B908 pip_swap 0x0000000000367930 pip_move 0x0000000000377910 pip_ch+ 0x000000000036E922 pip_ch- 0x000000000037F900 video_source 0x0000000000376113 end codes end remote
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room Last edited by Fuzzy; 11-12-2016 at 04:32 PM. |
#3
|
|||
|
|||
Thanks Fuzzy! I'm a newb with Linux so please be gentle with me . My hardware.conf and lircd.conf files are setup but when I run gentuner REMOTES as shown below the result is could and No, what am I missing?
sage@sage16:/opt/sagetv/server$ ./gentuner REMOTES could No |
#4
|
||||
|
||||
I've seen this before when I was working with it. You'll need to run the irsend command itself to see it's output (the script parses this output to get the list of configured remotes, which is where it's getting could from).
try running: Code:
/usr/bin/irsend LIST "" ""
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#5
|
|||
|
|||
Quote:
/var/run/lirc and then typing lircd -d /dev/lirc0 Channel changing is still not working but I am thinking maybe its the remote code I am using as gentuner finds the remote. One other thing, how do you make /var/run/lirc persistent between reboots? I have to constantly re-create it. |
#6
|
||||
|
||||
I think it should be able to create it on it's own when it runs LIRCD, but I'm not very linux saavy, so i can't be for sure. I do know the script I have running doesn't create it, so it must be getting made some other way.
If you run lircd as root (sudo lirdc -d /dev/lirc0), does it create it on its own?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#7
|
|||
|
|||
If I run lircd as sudo I get this:
lircd: can't open or create /var/run/lirc/lircd.pid lircd: No such file or directory I still end up having to mkdir /var/run/lirc manually. By the way, do you know where I can get the remote control codes for the Verizon FIOS universal remote? |
#8
|
||||
|
||||
as far as I know, the best place for LIRC remote codes is here: http://lirc.sourceforge.net/remotes/
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#9
|
|||
|
|||
Great, I''ll check that out. Would you please look at my hardware.conf and lircd.conf files and see if you notice any issues, I still can't change channels even though gentuner.log is dsiplaying what I believe is normal.
Hardware.conf #Chosen Remote Control REMOTE="USB-UIRT-REMOTE" REMOTE_MODULES="" REMOTE_DRIVER="usb_uirt_raw" REMOTE_DEVICE="/dev/ttyUSB0" REMOTE_SOCKET="" # Perhaps the following setting could move the lircd.conf file to the sagetv/server/lirc/ directory - I have not tested. REMOTE_LIRCD_CONF="lircd.conf" REMOTE_LIRCD_ARGS="-d /dev/ttyUSB0" #Chosen IR Transmitter TRANSMITTER="USB-UIRT-TRANSMITTER" TRANSMITTER_MODULES="" TRANSMITTER_DRIVER="usb_uirt_raw" TRANSMITTER_DEVICE="/dev/ttyUSB0" TRANSMITTER_SOCKET="" TRANSMITTER_LIRCD_CONF="lircd.conf" #This was important to get it to work with gentuner or you could edit the script to include the socket to use, but it fails without mention of the device to irsend. TRANSMITTER_LIRCD_ARGS="-d /var/run/lirc/lircd1" #Disable kernel support. #Typically, lirc will disable in-kernel support for ir devices in order to #handle them internally. Set to false to prevent lirc from disabling this #in-kernel support. #DISABLE_KERNEL_SUPPORT="true" #Enable lircd START_LIRCD="true" #LIRCD_ARGS="-d /var/run/lirc/lircd1" #Don't start lircmd even if there seems to be a good config file #START_LIRCMD="false" #Try to load appropriate kernel modules LOAD_MODULES="false" # Default configuration files for your hardware if any LIRCMD_CONF="" #Forcing noninteractive reconfiguration #If lirc is to be reconfigured by an external application #that doesn't have a debconf frontend available, the noninteractive #frontend can be invoked and set to parse REMOTE and TRANSMITTER #It will then populate all other variables without any user input #If you would like to configure lirc via standard methods, be sure #to leave this set to "false" FORCE_NONINTERACTIVE_RECONFIGURATION="false" START_LIRCMD="" Lircd.conf #this configuration has been automatically generated via #the Ubuntu LIRC package maintainer scripts. # #It includes the default configuration for the remote and/or #transmitter that you have selected during package installation. # #Feel free to add any custom remotes to the configuration #via additional include directives or below the existing #Ubuntu include directives from your selected remote and/or #transmitter. include "/usr/share/lirc/extras/more_remotes/hauppauge/lircd.conf.hauppauge" #Configuration for the USB-UIRT2 : Motorola FIOS box transmitter: #include "/usr/share/lirc/extras/transmitters/motorola/dctxxxx.conf" s config file was automatically generated # using lirc-0.8.3-CVS-pvr150-2(default) on Sun Nov 16 20:41:54 2008 # # contributed by Michael Hanson # # brand: Verizon (?) # model no. of remote control: Verizon FiOS Universal # Inside battery compartment has the following # information: # RC1445302/00B # 3139 238 16051 REV 2 # MADE IN CHINA # CP02 50829 G 009840 # devices being controlled by this remote: Motorola QIP6200-2 # begin remote name Motorola_QIP6200-2 bits 16 flags SPACE_ENC|CONST_LENGTH eps 30 aeps 100 header 9028 4450 one 555 4433 zero 555 2181 ptrail 556 gap 99876 toggle_bit_mask 0x0 begin codes KEY_POWER 0x5006 # Was: power KEY_MENU 0x9806 # Was: menu KEY_INFO 0x0C0B # Was: guide KEY_INFO 0xCC05 # Was: info KEY_UP 0x2C09 # Was: up KEY_DOWN 0xAC01 # Was: down KEY_LEFT 0x6C0E # Was: left KEY_RIGHT 0xEC06 # Was: right KEY_OK 0x8807 # Was: ok KEY_EXIT 0x480B # Was: exit KEY_OPTION 0x4205 # Was: options widgets 0xC209 KEY_POWER 0x580A # Was: ondemand KEY_FAVORITES 0xA805 # Was: favorites KEY_LAST 0xC803 # Was: last fiostv 0x7C0F KEY_CHANNELUP 0xD00A # Was: ch+ KEY_CHANNELDOWN 0x3002 # Was: ch- KEY_PREVIOUS 0x3C08 # Was: previous dvr 0xBC00 KEY_NEXT 0xFC07 # Was: next KEY_REWIND 0x7808 # Was: rewind KEY_PLAYPAUSE 0xF800 # Was: play-pause KEY_FASTFORWARD 0xB804 # Was: fastforward KEY_STOP 0x380C # Was: stop KEY_RECORD 0x8C03 # Was: record KEY_1 0x800F # Was: 1 KEY_2 0x4007 # Was: 2 KEY_3 0xC00B # Was: 3 KEY_4 0x2003 # Was: 4 KEY_5 0xA00D # Was: 5 KEY_6 0x6005 # Was: 6 KEY_7 0xE009 # Was: 7 KEY_8 0x1001 # Was: 8 KEY_9 0x900E # Was: 9 KEY_0 0x0000 # Was: 0 KEY_NUMERIC_STAR 0x2201 # Was: \* KEY_NUMERIC_POUND 0x0203 # Was: # KEY_YELLOW 0xE801 # Was: yellow KEY_BLUE 0xE40E # Was: blue KEY_RED 0x1406 # Was: red KEY_GREEN 0x940A # Was: green av 0x280D pip 0x4403 pip-change 0xC40D end codes end remote |
#10
|
||||
|
||||
I think the sage script, as I posted above, sends the commands 1, 2, 3, 4, 5, 6, 7, 8, 9, and 0. (as are in my lircd.conf I posted). It appears your lircd.conf calls the number KEY_1, KEY_2, etc. So when the script tells it to send '1', it can't do it. You can probably append KEY_ to the command in the script:
Code:
KEY=KEY_$3 Code:
1 0x800F 2 0x4007 etc...
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#11
|
||||
|
||||
Quote:
You would never need to run the command as you are doing, but, rather, use either... Code:
/etc/init.d/lirc start|stop Code:
service lirc start|stop
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#12
|
|||
|
|||
Quote:
|
#13
|
|||
|
|||
Quote:
|
#14
|
||||
|
||||
The first step before you even consider genturner and sagetv, is to really get it working using irsend. If you can get it working using irsend, then that would validate the everything is working, and at that point, you now just need to use a simple gentuner script to make it work with sagetv.
http://www.lirc.org/html/irsend.html I'd start with irsend "LIST" "REMOTE NAME" "" to make sure the remote is configured. I'd then use the SEND_ONCE and try sending some commands, and see if that is failing, etc. once you get that working, I don't think you'll have much issues with the gentuner part. Unfortunately, I haven't played with lirc very often, but I may end up getting USB UIRT device, since the CommandIR is no long supported, and likely, the usb uirt would be a good choice (it wasn't an option 7 years ago).
__________________
Batch Metadata Tools (User Guides) - SageTV App (Android) - SageTV Plex Channel - My Other Android Apps - sagex-api wrappers - Google+ - Phoenix Renamer Downloads SageTV V9 | Android MiniClient |
#15
|
|||
|
|||
Good idea Stuckless, I will leave gentuner out of the mix for now and see if I can get things working with irsend and address those errors first.
|
#16
|
|||
|
|||
After further testing and transmitting still failing, I am beginning to think that I am missing the drivers in this distro Ubuntu 16.04 here is my abbreviated dmesg output
[ 13.096563] usbcore: registered new interface driver usbserial [ 13.096582] usbcore: registered new interface driver usbserial_generic [ 13.096596] usbserial: USB Serial support registered for generic [ 13.115361] usbcore: registered new interface driver ftdi_sio [ 13.115380] usbserial: USB Serial support registered for FTDI USB Serial Device [ 13.115462] ftdi_sio 2-2:1.0: FTDI USB Serial Device converter detected [ 13.115523] usb 2-2: Detected FT232RL [ 13.139210] usb 2-2: FTDI USB Serial Device converter now attached to ttyUSB0 [ 15.011165] usbcore: registered new interface driver hdpvr I am missing something similar to the output below (copied from an online source) [ 15.045918] drivers/usb/serial/ftdi_sio.c: v1.4.3:USB FTDI Serial Converters Driver If anyone is running ubuntu 16.04 with the USB-UIRT transmitting properly please chime in. Thanks. |
#17
|
||||
|
||||
I am using unRAID, with sage running in a docker, and am successfully running the USB-UIRT to blast to my cable box, and my dmesg doesn't have that entry. part of the problem with all the various guides out there, is that lirc went through a lot of changes over the last decade, so there is likely some misinformation out there - in any case, I'm pretty sure ubuntu 16.04 should include the usb-uirt drivers (as indicated by it getting property attached to ttyUSB0)
What is the output of irsend when doing the test commands stuckless mentioned previously?
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#18
|
|||
|
|||
I'd like to run Sage in an unRAID docker as well but Opendct is not detecting my tuners hence the testing now with the VM in docker. I get the results below running irsend but my device doesnt flash as it does when I point a remote control at it.
sage@sage16:/etc/lirc$ irsend LIST Motorola_DCT6200 9 irsend: 000009145dff5fff 9 then this: sage@sage16:/etc/lirc$ irsend -d /var/run/lirc/lircd1 SEND_ONCE Motorola_DCT6200 SELECT irsend: command failed: SEND_ONCE Motorola_DCT6200 SELECT irsend: transmission failed |
#19
|
||||
|
||||
Quote:
__________________
Buy Fuzzy a beer! (Fuzzy likes beer) unRAID Server: i7-6700, 32GB RAM, Dual 128GB SSD cache and 13TB pool, with SageTVv9, openDCT, Logitech Media Server and Plex Media Server each in Dockers. Sources: HRHR Prime with Charter CableCard. HDHR-US for OTA. Primary Client: HD-300 through XBoxOne in Living Room, Samsung HLT-6189S Other Clients: Mi Box in Master Bedroom, HD-200 in kids room |
#20
|
|||
|
|||
Thanks Fuzzy, I'll work on my Unraid docker Sage installation and Opendct issues if that is successful, then I will go that route and abandon the VM for now.
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
UPNP Tuning some DISH receivers with gentuner | mibsy | SageTV for unRAID/Docker | 14 | 01-29-2022 12:31 AM |
HELP! gentuner stopped working properly?! | sgx2 | SageTV Linux | 2 | 07-23-2014 10:37 PM |
Two USB-UIRT's | jsonnabend | Hardware Support | 3 | 03-14-2008 09:22 AM |
V5 & USB-UIRT = No Joy | digitalgm | Hardware Support | 3 | 05-02-2006 08:53 AM |
IR-200 or USB-UIRT? | heffe2001 | Hardware Support | 0 | 04-16-2004 10:53 AM |