Page 1 of 2 12 LastLast
Results 1 to 10 of 18

Thread: Tutorial - IR Codes on Webpage

  1. #1
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default Tutorial - IR Codes on Webpage

    Guys, I'm working on putting together a new tutorial, this might become a video. Please give feedback on things that are not clear or improvements...

    How to make a virtual remote with Girder 5 Pro/WHP

    This tutorial will show you how to create a virtual remote using Girder 5 Pro. We will build this using the PIR-1 (you can also use an USB-UIRT) and
    the built in webserver. This will allow you to send the IR codes from an internet enabled device.

    You'll learn from the tutorial:


    • how to enable plugins.
    • how to use the IR Profile editor
    • how to use the built-in webserver.



    1. Starting Girder


    First lets start Girder and enable our hardware.

    * File -> Settings -> Plugins
    * Find the PIR-1 plugin and enable it.
    * Find the webserver plugin and enable it.
    * File -> Component Manager -> Installed Component
    * Find the PIR-1 component and enable it.

    2. Learning IR codes - IR Profile Editor

    Open the IR profile editor


    • View -> IR Profile Editor


    Start the IR Profile Wizard by clicking it's button:


    • IR Profile Wizard


    Pick or create a new Manufacturer for your device. I'm createing a profile for my SqueezeBox so I pick Logitec.

    Then next I pick Generic Media Player as the device type. Next we'll actually learn all the code we want to use. You can skip codes
    you don't need and later you can add codes that were not in this list. Once all is learned we just need to setup the output device. Pick the PIR-1 and either front or back output. The back output requires a stick on ir emitter.

    Once you close the Wizard you should see a new Manufacturer, Device and Codes in the profile Editor.

    3. Using the button in the Device Manager

    There are two ways to go no. The automatic way using the Device Manager pages in the webserver. This gives you a predefined look and feel with all the
    buttons you just created on screen. Nothing else to do but use it.

    If you however are more creative and want to design your own look here is how to go about it.

    4. Creating your own web page

    I've created an example webpage called dm_example.html. If you open it up you'll find some javascript at the top. Don't mess with it unless you know what you are
    doing. The HTML section you can freely modify.

    If you look at the example you'll see buttons like this:

    <button class="autoButton" alt="chrome\IR Profiles\2\Power" val="1">Power</button>

    The important part of this line at the class, alt and val parameters. The class parameter must include the "autoButton". This is used to find buttons that will hook into the Device Manager. The alt parameter is the path of the control. You can find this in the device manager. The val is the value the control should be set to. For this tutorial leave this value at 1.

    You can add as many buttons as you like with any path and values you want to use. (Thus you can control other items as well!)

    5. Finding the control paths

    Open the Settings Window ( file -> Settings )
    Click on device Manager, find your newly added IR device in the list (for me it was \Home\SqueezeBox)
    Underneat the dropdown box you'll see the path displayed. This is the path up to the device, we'll need to add the control to it.

    for example: chrome\IR Profiles\3

    The controls are listed in the box below it, so copy the name of the control as well, for example "Power"

    The full path would then be chrome\IR Profiles\3\Power
    Attached Files Attached Files
    Ron
    No support through PM

  2. #2
    Join Date
    Oct 2005
    Posts
    307

    Default

    I am convinced this is the best way to implement Girder. I like the using ajax_sendevent.lhtml, because there are times I need the anti repeat...

  3. #3
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    Did you mean to say 'you are NOT convinced'?
    Ron
    No support through PM

  4. #4
    Join Date
    Oct 2005
    Posts
    307

    Default

    Ron, I ment using a webpage as an interface IS the way to go!

    Although different browsers/devices have presented a few challenges, it is only a fraction of the programming/setup/installation it would take for apps across different devices/platforms. Javascript with the Jquery library gives the ability to do anything I have thought of on the front end and Girder is taking care of the back end. I really think once users realize what can be done and once there are some better templates/instructions, the web interface will be something everyone accepts as the standard interface for automation.

  5. #5
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    Ah OK

    I thought you didn't like this because this solution does not use ajax_sendevent.lhtml it does not use the anti-repeat...
    Ron
    No support through PM

  6. #6
    Join Date
    Nov 2011
    Location
    San Antonio, TX
    Posts
    11

    Default

    Shaun5, my name is Bill and I just joined the forum. I am planning on controlling my home automation/media using the web interface of Girder.
    This is exactly the method I have been envisioning. Would you mind if I came to you for guidance/advice from time to time?
    Thks.

  7. #7
    Join Date
    Nov 2011
    Location
    San Antonio, TX
    Posts
    11

    Default

    Is there a way to add a macro button to the device manager web interface to initiate a lighting sequence?
    Thanks.

  8. #8
    Join Date
    Jan 1998
    Location
    Jupiter, FL
    Posts
    13,550

    Default

    Yeah by using the Event Devices component from Girder 5.1.

    1. Enable the even devices component in the component manager
    2. Under the Misc tab you'll find the Event Devices configuration.
    3. Type "Test" in the caption box.
    4. Select a location from the list.
    5. and press Add.
    6. Highlight Test - Location [disabled] in the list and go to the second tab called "Controls"
    7. In the device list make sure you newly created device exists
    8. Now in caption type "Lights On"
    9. Events String "LIGHTS_ON"
    10. Event Device 18
    11. Press Add.
    12. Go back to the first tab and make sure your device is highlighted and check "Enabled" and press Update.
    13. Now open the Device Manager pages in a webbrowser and find your newly created device. Press it.
    14. In the Girder log you'll find the even for it called "Girder / LIGHTS_ON" attach this to an action on the Girder tree to make it do whatever you like including Macros
    Ron
    No support through PM

  9. #9
    Join Date
    Nov 2011
    Location
    San Antonio, TX
    Posts
    11

    Default

    Ron, thanks for the prompt reply and your time. Of course now I have another question :-).
    I am using a Monoprice 4X4 Matrix Switch for whole house hidef video. Currently there is not a
    control or button combination to represent the remote layout in the web remote. Would it be possible to add
    buttons A1-A4, B1-B4, C1-C4 and D1-D4 to the IR profile wizard and then have these mapped to a
    4X4 table of buttons, or perhaps mapped to 4 drop down menus A, B, C and D, each with elements 1-4.
    Of course if you could then replace A-D with a location and 1-4 with a video source that would be great.

    The Matrix Switch also has a serial interface so it might be better to use that so you can get current state feedback.
    Hope I'm making sense and not rambling.

    Bill

  10. #10
    Join Date
    Nov 2011
    Location
    San Antonio, TX
    Posts
    11

    Default

    Ron, I dont see a Event Devices component in the component manager.
    I downloaded Girder for evaluation (Girder 5.0.14 build 551) then purchased a license
    but am still running 5.0.14. How do I upgrade to the latest version 5.1?
    Is this why I am not seeing the Event Devices component?
    Bill

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •