Skip to content

Commit 144f716

Browse files
committed
everything else
1 parent 550a437 commit 144f716

6 files changed

+321
-0
lines changed

Harmony Remote with Remote Buddy .txt

+27
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
3. Now that you have you AS written, you need to map those to functions in RB. You need these to be Global actions so they are accessible across all behaviors.
2+
4. In RB, pick your behavior from Part 3 and click on any blank mapping. Find Custom Actions and click on it.
3+
5. Create a new Custom Action by clicking the + sign on the bottom left.
4+
6. Name it whatever you like, I used naming convention “Plex Activate”, “EyeTV Activate”, etc.
5+
7. Click the “Action available globally and for context menu” check box. This makes the action global for all behaviors.
6+
8. Click the + on the right under “Actors to run within Action” and add an AS actor.
7+
9. Paste in the corresponding AS code from above.
8+
10. Click Compile.
9+
11. Assuming no compile errors, change the Options to be “Execute on button press”.
10+
12. Click Close.
11+
13. On the Mapping tab, select Global mapping on the left and assign the newly created actions to whatever button press you want. Again, follow the steps from part 3 to as you have to cross reference all the mappings.
12+
a. Note: I am using soft keys for this, but you can use hard keys also if you prefer. If using soft keys, you’ll most likely need to go back into the Harmony software and change the name of soft key to something useful that describes what it’s doing.
13+
14. Once done, press the button on the remote and it should fire the AS and switch applications for you. RB automatically recognizes what application is active so at this point, you can map all the Harmony buttons to what you want for the new application, again using the steps from Part 3.
14+
15. Create additional “switchers” as needed and add apps as desired.
15+
16. At this point, you should have everything functioning with just one sticky point left.
16+
Part 5: Adding Power On and Power Off procedures.
17+
1. All that’s left at this point is telling RB what you want it to do when you “power on” the activity (I.E. press “Watch TV” or whatever you named your activity from Part 1) and what happens when you press the power button to shut everything off.
18+
2. What I did was create PowerOn and PowerOff AppleScripts to fire.
19+
3. Start by telling the Harmony software to send an extra command at Activity Start and Power Off. Go into the Harmony software, and select “Settings” under your activity.
20+
4. Click “Review the settings for this activity”.
21+
5. Click “Yes, but I want to add more control of options and devices for this Activity.”
22+
6. Keep clicking all the way until you get screen that says “When you enter this activity, these devices are turned on and the following actions occur:”.
23+
7. Click “Add action for Plex”.
24+
8. Click the “Send this infrared command” and then select an unused Plex function from the list.
25+
9. Click Next.
26+
10. Repeat for the power off action.
27+
11. Now when you power on your activity, or when you power off the Harmony will send an extra IR command that you can map in RB to run an AS to do whatever you like. Write your AS how you like, and repeat Part 4 to make these global, and map them as you did in Part 3. Below are the PowerOn and PowerOff scripts I’m using. The PowerOn script is identical to the “Switch to EyeTV” script above, but I wanted to map them to separate functions so in the event I ever want to change either script to add more control, I have the option without having to go back into the Harmony software.

README

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
TV Stuff
2+
========
3+
Scripts and other misc data for my TV setup.
4+
5+
Software and hardware in use:
6+
7+
[Apple Mac Mini](http://www.apple.com/ca/mac-mini/)
8+
9+
[Silicon Dust HDHomeRun tuners](http://www.silicondust.com/products/hdhomerun/atsc/)
10+
11+
[Elgato EyeTV](http://www.elgato.com/eyetv/eyetv-3)
12+
13+
[Remote Buddy](http://www.iospirit.com/products/remotebuddy/)

Signal Strength and Quality.txt

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
Taken from http://www.silicondust.com/forum2/viewtopic.php?t=4474
2+
3+
Signal Strength and Quality
4+
5+
There are three percentages reported by the HDHomeRun -
6+
7+
Signal Strength (ss)
8+
- raw power level as measured by the receiver
9+
10+
Signal Quality (snq)
11+
- how clearly defined the digital data is
12+
13+
Symbol Quality (seq)
14+
- Amount of correct or corrected data over the last second
15+
16+
The above definitions can be confusing, so a much simpler definition is to imagine listening to the radio:
17+
- Signal Strength represents the volume
18+
- Signal Quality represents how clearly you can hear the lyrics
19+
- Symbol Quality indicates the percentage of the lyrics you could hear or guess correctly
20+
21+
As it turns out, Signal Strength is somewhat irrelevant; if your antenna isn't pointed properly, it doesn't matter how loud you turn up the volume, the static will prevent you from hearing the lyrics correctly. Similarly, amplifying a weak HDTV signal can result in a high signal strength but too much noise to decode the digital data correctly.
22+
23+
Use the Signal Strength for a rough idea of direction, but align the antenna for the highest Signal Quality, ignoring Signal Strength. When aimed correctly, Symbol Quality will show 100%, indicating no errors in the output. Splitters and amplifiers can introduce noise which will lower the Signal Quality, even if the Signal Strength increases.
24+
25+

channel_scan.sh

+139
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,139 @@
1+
#!/bin/bash
2+
#set -x
3+
######################################################################################
4+
#
5+
# channel_scan.sh
6+
# v2013.11.29.r1
7+
#
8+
# This script will scan a HDHomeRun for ATSC channels and print a formatted list
9+
#
10+
# Use the -csv option to print out CSV formatted results
11+
#
12+
# A note about deciphering the results here:
13+
# http://www.silicondust.com/forum2/viewtopic.php?t=4474
14+
#
15+
# Follow me on Twitter https://twitter.com/shmick
16+
#
17+
######################################################################################
18+
19+
# Set the path to the hdhomerun_config utility here
20+
#
21+
HDHRConfig=/usr/bin/hdhomerun_config
22+
23+
if [ ! -x $HDHRConfig ]
24+
then
25+
echo ""
26+
echo "Unable to locate the hdhomerun_config utility, please edit the HDHRConfig variable in this script"
27+
echo ""
28+
exit
29+
fi
30+
31+
# Attempt to discover HDHR devices on the LAN
32+
#
33+
Devices=`$HDHRConfig discover | awk '{print $3}'`
34+
35+
# Exit if no device are found
36+
#
37+
if [ "$Devices" == "found" ]
38+
then
39+
echo "No HDHomeRun units detected, exiting"
40+
exit
41+
fi
42+
43+
# Create unique variables for each device found
44+
#
45+
FoundDev=( $Devices )
46+
HDHRDev1=${FoundDev[0]}
47+
HDHRDev2=${FoundDev[1]}
48+
49+
# Functions to check the lock status of each tuner
50+
#
51+
D1T0status () {
52+
echo `$HDHRConfig $HDHRDev1 get /tuner0/lockkey`
53+
}
54+
D1T1status () {
55+
echo `$HDHRConfig $HDHRDev1 get /tuner1/lockkey`
56+
}
57+
D2T0status () {
58+
echo `$HDHRConfig $HDHRDev2 get /tuner0/lockkey`
59+
}
60+
D2T1status () {
61+
echo `$HDHRConfig $HDHRDev2 get /tuner1/lockkey`
62+
}
63+
64+
# Determine which Device and Tuner we're going to use by looking for the first tuner that isn't locked
65+
# If all tuners are locked, the script will exit
66+
#
67+
68+
if [ "$(D1T0status)" = "none" ]
69+
then
70+
ScanDev=$HDHRDev1
71+
ScanTuner=0
72+
elif [ "$(D1T1status)" = "none" ]
73+
then
74+
ScanDev=$HDHRDev1
75+
ScanTuner=1
76+
elif [ "$(D2T0status)" = "none" ]
77+
then
78+
ScanDev=$HDHRDev2
79+
ScanTuner=0
80+
elif [ "$(D2T1status)" = "none" ]
81+
then
82+
ScanDev=$HDHRDev2
83+
ScanTuner=1
84+
else
85+
echo "Sorry, no tuners are available"
86+
exit
87+
fi
88+
89+
# Perform a tuner scan, outputting the results to $ScanResults
90+
#
91+
RunScan () {
92+
ScanResults=`$HDHRConfig $ScanDev scan $ScanTuner \
93+
| tr "\n" " " \
94+
| tr "(" " " \
95+
| tr ")" " " \
96+
| sed -e 's/SCANNING....................../\'$'\n/g' \
97+
| grep TSID \
98+
| sed -e 's/PROGRAM....//g' \
99+
-e 's/L.....8vsb.//g' \
100+
-e 's/TSID.........//g' \
101+
-e 's/ss=//g' \
102+
-e 's/s.q=//g' \
103+
| awk '{print $1"\t"$2"\t"$3"\t"$4"\t"$5"\t"$6"\t\t"$7"\t"$8"\t\t"$9"\t"$10"\t\t"$11"\t"$12"\t\t"$13"\t"$14"\t\t"$15"\t"$16}'`
104+
}
105+
106+
# The above awk command formats the scan results into tabbed columns
107+
# $1 through $6 are:
108+
# RF, Strnght, Quality, Symbol, Virtual, Name
109+
# $7 through $16 print up to 5 subchannels found
110+
111+
# Count the number of channels found from the $ScanResults variable
112+
#
113+
ChansFound () {
114+
NumChannels=`wc -l <<< "$ScanResults"`
115+
}
116+
117+
# Start doing some work
118+
# 1) Print the "Beginning scan" header
119+
# 2) Run the RunScan function
120+
# 3) Run the ChansFound function
121+
# 4) Display the number of channels found
122+
#
123+
echo "Beginning scan on $ScanDev, tuner $ScanTuner at `date '+%D %T'`"
124+
RunScan
125+
ChansFound
126+
echo ""
127+
echo "${NumChannels// }" channels found
128+
echo -e 'RF\tStrnght\tQuality\tSymbol\tVirtual\tName\t\tVirt#2\tName'
129+
echo "------------------------------------------------------------------------"
130+
131+
# 5) Check to see if the -csv option was used on the command line
132+
# If so, then CSV format the $ScanResults output
133+
#
134+
if [ "$1" = "-csv" ]
135+
then
136+
echo "$ScanResults" | sed $'s/\\\t/,/g'
137+
else
138+
echo "$ScanResults"
139+
fi

harmony_remote_buttons.txt

+61
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
Harmony Remote Buttons layout for Remote Buddy
2+
OK - 150 Select
3+
Up - 150 Up
4+
Down - 150 Down
5+
Left - 150 Left
6+
Right - 150 Right
7+
VolUp - 152 Up
8+
VolDn - 152 Down
9+
Mute - 152 Select
10+
ChUp - 158 Up
11+
ChDown - 158 Down
12+
Prev - 153 Down
13+
Menu - 150 Menu
14+
Exit - 155 Up
15+
Guide - 157 Play
16+
Info - 153 Up
17+
Stop - 151 Play
18+
Replay - 160 Up
19+
Skip - 160 Down
20+
Play - 151 Menu
21+
Rec - 155 Down
22+
Rew - 154 Up
23+
Fwd -154 Down
24+
Pause - 152 Menu
25+
26+
1 - 151 Up
27+
2 - 151 Down
28+
3 - 151 Left
29+
4 - 151 Right
30+
5 - 152 Left
31+
6 - 152 Right
32+
7 - 153 Left
33+
8 - 153 Right
34+
9 - 154 Left
35+
0 - 154 Right
36+
Clear - 154 Play
37+
Enter - 153 Menu
38+
Blue - 159 Menu
39+
Red - 159 Left
40+
Green - 159 Right
41+
Yellow - 159 Play
42+
Aspect - 157 Up
43+
LargeUp - 159 Up
44+
LargeDown - 159 Down
45+
PwrToggle - 157 Menu
46+
Queue - 157 Down
47+
Sleep - 154 Menu
48+
F1 - 155 Left
49+
F2 - 155 Right
50+
F3 - 155 Play
51+
F4 - 155 Menu
52+
F5 - 160 Left
53+
F6 - 160 Right
54+
F7 - 160 Play
55+
F8 - 160 Menu
56+
F9 - 158 Left
57+
F10 - 158 Right
58+
F11 - 158 Play
59+
F12 - 158 Menu
60+
F13 - 157 Left
61+
F14 - 157 Right

multi_status.sh

+56
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
#!/bin/bash
2+
#set -x
3+
#
4+
# Follow me on Twitter https://twitter.com/shmick
5+
6+
# multi_status.sh - display the current status of up to 2 HDHomeRun units
7+
#
8+
# Use this to compare channel & signal strength stats in real time
9+
#
10+
# You'll need to set the channels on each tuner with the HDHomeRun Config util
11+
12+
#Linux users - you will need to adjust the below path to hdhomerun_config
13+
#
14+
HDHRConfig=/usr/bin/hdhomerun_config
15+
16+
#This script will run every second. Change this to whatever you want.
17+
SECONDS=1
18+
19+
# Gather the IDs of the units and parse the results
20+
21+
Units=`$HDHRConfig discover | awk '{print $3}'`
22+
23+
# Define how many seconds to sleep between
24+
if [ "$Units" == "found" ]
25+
then
26+
echo "No HDHomeRun units detected, exiting"
27+
exit
28+
fi
29+
30+
# Split the 2 scanned units into variables
31+
a=( $Units )
32+
Unit1=${a[0]}
33+
Unit2=${a[1]}
34+
35+
clear
36+
37+
while true
38+
do
39+
date
40+
# Query the debug info of the first unit
41+
echo "$Unit1, tuner 0"
42+
$HDHRConfig $Unit1 get /tuner0/status
43+
echo "$Unit1, tuner 1"
44+
$HDHRConfig $Unit1 get /tuner1/status
45+
46+
# If a 2nd unit was found, query the lock status
47+
if [ "$Unit2" != "" ]
48+
then
49+
echo "$Unit2, tuner 0"
50+
$HDHRConfig $Unit2 get /tuner0/status
51+
echo "$Unit2, tuner 1"
52+
$HDHRConfig $Unit2 get /tuner1/status
53+
fi
54+
sleep $SECONDS
55+
clear
56+
done

0 commit comments

Comments
 (0)