Page 1 of 1

Indigo Touch Radio Control Page with Dynamic Presets

PostPosted: Fri Jan 14, 2011 9:00 pm
by hamw
I made a little write up on how to create a page to control your radio. What's neat about it is that when you switch from AM to FM the station selection buttons automagically update, and it shows what station is currently selected. It's based on variables and presets so once set up, there is very little maintenance if you move, change order of stations etc. Below are a few pics to show the page in Indigo, and how it changes the display in Indigo Touch.

Here's the URL--it's in the hardware section. Hope you like it.
http://www.perceptiveautomation.com/filelib/index.php

Re: Indigo Touch Radio Control Page with Dynamic Presets

PostPosted: Sat Jan 15, 2011 2:45 pm
by hamw
**EDIT**
The zip file has now been updated with this info.


A couple of necessary additions until the documentation in the file can be updated. First, here's the code to populate the variables automatically:
Code: Select all
tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_AM_Preset_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_FM_Preset_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    set acount to 1
    repeat 10 times
        make new variable with properties {name:"WHA_Button_" & acount, value:acount}
        set acount to acount + 1
    end repeat
end tell

tell application "IndigoServer"
    make new variable with properties {name:"WHA_Radio_Display" & acount, value:acount}
    make new variable with properties {name:"WHA_Radio_Preset" & acount, value:acount}
    make new variable with properties {name:"WHA_Radio_AMFM" & acount, value:acount}
end tell


Second (and most important): the trigger that is set up to toggle the tuner between AM and FM needs a further action to switch the band on the tuner.

This trigger will fire when the "WHA_Radio_AMFM" variable changes. The condition is "always". The actions are TWO "execute applescript" and are separate. The first is the following:
Code: Select all
RemoteControl("Sony Tuner", "Sony/Tuner", "Band")

This will actually send the signal to the tuner to change the band.

The second is the control code listed in the write up. I am keeping them separate so that the code can be corrected in one of the trigger actions and simply copied/pasted into the other without having to worry about the toggle.

Re: Indigo Touch Radio Control Page with Dynamic Presets

PostPosted: Mon Jan 24, 2011 6:46 am
by hamw
BTW if anyone is interested in this Sony tuner, there is a great writeup on it here:

http://www.ham-radio.com/k6sti/xdr-f1hd.htm

This is measured data showing the excellent performance of this little box.