It is currently Sun Jun 24, 2018 10:41 pm

All times are UTC - 8 hours [ DST ]




 Page 1 of 4 [ 47 posts ]  Go to page 1, 2, 3, 4  Next
Author Message
 Post subject: Example of Girder configuration
PostPosted: Wed Nov 28, 2012 2:50 am 

Joined: Wed Nov 28, 2012 2:33 am
Posts: 2
Hi,

I'm new to this product, so please go easy.

After using an app for my network enabled amp (Denon 3312), I thought about writing a native Android app with the flexibility to customize for Home Theatre and automation control. Then I found Andre and it looked exactly like what I wanted (without having to do the coding) and so I went ahead and got it even though it was in Beta.

Pretty happy with the flexibility. I think there are a few small concepts that I need explanation on.

At this point I've installed the software and created a layout on the demo welcome page. I plan on cleaning it up once I've got some functions working, but so far I've just put down a bunch of buttons (Device selection, on, off, frequently used device specific controls, incremental volume, activities for scripted responses and directional control etc) and a volume slider.

What I need to do now is connect some of the buttons up to Girder (to use an IR sender to control the TV) and the rest to my amplifier.

Does anyone have an example configuration/scripts that they can lend me so that I can get the concepts down?

I assume both will be controlled via TCP connections. Not quite sure whether I want to open a connection when Andre starts or whether I would wear the overhead of initiating a connection each time a button is pressed (just wanted to see the lag time before I made the choice).

Haven't reinstalled Girder on my HTPC yet. I think I'm a registered owner for Girder 5 (will have to confirm the version I purchased before I install). Does the version matter (between 5.0 and 5.1 - which I think is the latest?)?

Thanks,

Jason


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Nov 28, 2012 3:35 pm 
Site Admin

Joined: Wed Aug 17, 2011 4:55 pm
Posts: 39
Hi Jason,

There shouldn't be any difference between Girder 4/5/5.1 for simple control of IR, they'll all work the same. I'd actually recommend using the web service functionality instead of direct TCP; it's very fast, and much easier to implement.

On the Girder side, you'll first need to create an event mapping device (View->Event Mapping in Girder window, then click "Add Mapping Device"). Assign this device a unique mapping number. This mechanism lets you group input events. I have one called "Onkyo HT" for example, mapped to the number 4001.

Once you have this, you need to create a GML (File->New in Girder window). I create one per piece of hardware, though you can organize it any way you like. In this GML is where you'll create the actions and the cooresponding triggering events. In my case, I use USB-UIRT so I drag the USB-UIRT Action over to the GML for a given IR command. I name this action "Power On". Then I open the action and use the dialog box to record the IR from my physical IR remote control.

At this point, you should be able to select this action and click the 'Test Action' button in the tool bar, and it should send the IR out and control your equipment. If you're not using USB-UIRT, (e.g. Global Cache device or something else) you'll need to set up the proper action and get it configured.

Next, you want to be able to attach an event to this action so you can trigger it. Right-click the action and select 'Add Event'. In the Event dialog, select the Device you created the Event Mapper earlier ("Onkyo HT" for example). Then in the text box below the device drop-down, type a string that represent the event you want to trigger (I have "POWERON"). Save the event.

You should now be set up to trigger this action in Girder. If you haven't already, enable the web server (File->Settings->Plugins->Web Server) and test it by hitting the machine's IP address with a normal browser. You should see the Promixis Webserver Access page. By default, Girder also has a page that lets you trigger events, called ajax_sendevent.lhtml. All you need to do to trigger a Girder event is to send the device and event info as part of the URL request, like so:

http://192.168.1.100/ajax_sendevent.lht ... nt=POWERON

Supplying the Device Mapper number you set up and selected in the event and the event ID String you specified for that specific event. If you do this in a browser, you should trigger the IR.


On the Andre side, you simply need to assign a Web Service Parameter to a Button Entity. To do this:

1. Enter Edit Mode
2. Create a new Button Entity if you haven't already
3. Edit the Button Parameters (tap the Button to bring up the Editor Panel, tap 'Entity' then 'Parameters' then the 'Edit Parameters' button)
4. Tap the menu button and select 'New Parameter'
5. Under 'Control', in the Web Service tab, tap the "Service Call" Parameter.
6. Specify the full URL of the web service call to Girder (see above example) and tap 'Create'
7. Tap the Back button, then Menu->Stop Editing and save the changes.

That's it, you should now be able to tap the Button and trigger the Girder event. If it doesn't work, look at the Girder log to see if it's even getting hit by Andre. You can also go into Menu->Settings->Tools->Enable Debugging and go into Debug Options to turn on Verbose messaging. This will output a bunch of helpful messages as it tries to execute Parameters and call web services.

Note that you'll probably want to organize things a bit more efficiently when implementing an entire page of Buttons. Instead of using the "Service Call" Parameter, you can use the individual Service type Parameters (Service domain, Service port, Service API, etc.) to set up the call details once for the entire EntityGroup or Page, then just add the URL parameters (device= and event= ) alone in each Button. This not only lets you more centrally control domain names, ports, etc. but it also lets you more dynamically change things on the fly.

Let me know how this goes for you, I'll be happy to help with any questions or problems you encounter.


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:42 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:43 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:43 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:43 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:44 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:44 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:44 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:44 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:45 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:45 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:45 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:45 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
 Post subject: Re: Example of Girder configuration
PostPosted: Wed Jun 13, 2018 9:46 am 

Joined: Fri Jun 08, 2018 6:08 am
Posts: 81388
wh552wh552wh552wh552wh552


 Profile  
 
Display posts from previous:  Sort by  
 Page 1 of 4 [ 47 posts ]  Go to page 1, 2, 3, 4  Next

All times are UTC - 8 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

cron