Premise Script for fast forward or rewind

Motorola Premise

Shinyshoes

Member
I have a Nuvo Whole house audio system.  One of the sources is hooked up to my computer for playing music, making whole house announcements via Text to speech, and other computer based audio.  I was trying to figure out a way to make Premise react to certain Key presses on the Nuvo keypads when on that source.  This would be handy for changing stations on internet radio, changing songs in windows media player or winamp, or playing other text to speech functions on demand.
 
I created a "dummy" device module with avoutput inheritance and connected it to the appropriate source in premise.  I was able to create a script for when somebody presses the "Play/Pause" button on the Nuvo by creating a "OnChangePlay" function in my dummy device.   
 
Now I am struggling with how to get premise to react to a "Fast Forward" or "Rewind" button press.  The dummy device has the transport commands and when looking at the module it has Commands for them but I cant create an OnChange script for a command.
 
Any Ideas how i can make this work? 
 
This would require adding new code to the current Nuvo Grand Concerto module to use ALL of the buttons.  The module John posted does not say it uses all of the buttons, so my guess is only prev/next and play/pause are supported.
 
 
Luckily, the original module is opensource, so you can add what you need.  
 
1. You will need to fully understand what is shown in PortSpy when you press the buttons.  Try to find the necessary documentation online or call Nuvo for it.
2. Next, examine and modify:  sys://Schema/Modules/NuVoConcerto/Classes/ConcertoSystem/OnChangeOnNewData as appropriate.
3. I would follow the existing programmatic flow and use your dummy device idea.
4. You'll need to create new global scripts (one for each new button type) under sys://Schema/Modules/NuVoConcerto/GlobalScripts/SetZoneDataScript, similar to what's already there for pause, play, etc...  These global scripts will be called by OnChangeOnNewData.
 
Sorry I don't own one or I'd help more, but feel free to ask questions here as you go along.
 
yeah, I already have expanded on the Nuvo Driver.  I plan on releasing an update to it once i get the rest of the bugs out because I have added quite a bit of functionality.  I have already added the code to capture the button presses.
 
I was trying to leave the code in the Concerto driver to be as universal as i could.  I added the "Sony" module that comes with the premise install and added one of the cd changer items.  In there, there is a "Transport" section that includes play, pause, duration, etc.  I wanted the Nuvo to be able to pass those commands on to the connected devices.  "Play" and "Pause" are easy because they are boolean properties in the transport section.  For my "dummy" device, I just created an onchange property for both play and pause.  
 
In the Nuvo Driver, I can capture the button press, but I dont know how to do 2 things:
1) tell the connected device to Fast Forward
2) once the command is sent to my "dummy" device, run script rather than the "TransportCommand FastForward" item (limited to serial or IR data)
 
I knew this would be hard to explain....
 
First, study how to navigate objects and their classes if you haven't already:  http://cocoontech.com/forums/files/file/190-diagram-exploring-a-premise-object-and-its-class/
 
Now, once you learn the control + left click trick from the link above, find a class that inherits from transport and navigate to: sys://Schema/Device/Transport
 
Now, click on TransportCommand.  Note that the TransportCommand property is of Type "MultiValue."  This means you should follow the guidance from the help file for "MultiValue" properties.
 
If you control + left click on TransportCommands filter, you get to:  sys://Schema/Device/TransportCommands
 
Now, note the enum objects under TransportCommands and their respective values.  This number is how you invoke a particular transport command.  You can also use the string name of the enum, but I always just use the numbers.
 
 
Code:
' fastforward the currentsource on my panasonic tv
home.Living.MediaZone.PanasonicTV.CurrentSource.Source.TransportCommand = 7

 
 
Back
Top