Project HDMI Switcher Part 3 - The Macro

This is really where the pedal hits the medal and we start pulling our solution together. But before we get started if you didn't catch the previous posts take a look here:

Part 1 - Introduction

Part 2 - In-room control

The macro framework on CE based devices (Webex Room Kits and such) as you should hopefully know by now is javascript based. There are two main functions to our script. This first is listenToGui and the second is switchHDMI.  ListenToGui takes input via the events generated by the widgets on the Touch 10 which then calls switchHDMI to send the HTTP GET request to the HDMI Switch IP interface which then switches HDMI inputs. Once you look at the script below you will see just how simple it really is.


Your URL if using a different HDMI switch will differ of course but should be documented by the manufacturer if the switch is IP controllable. In my case  the ${source}AVx1 on line 6 is just the id of the widget we created in the last post. By using simple id's to identify each of the inputs we are able to keep our code simple as the HDMI switch uses the same identification to assign input ports.

Next up HDMI switch setup and final thoughts.


No comments:

Post a Comment

Note: Only a member of this blog may post a comment.