Your comments

Thank you for this! I changed the code to request the status from the Server Feedback and will test tomorrow when I get to our labs. This is to allow our users to 'enable' or 'disable' the ability for other control panels in other labs to access video controls. If enabled, a user in another lab can then see a popup allowing them to route video content to a local projector. If disabled, they will see a popup advising they need to ask permission from the other lab. 

IR.GetDevice("FMHS-ALERTSPKR-01").Set("Lab1_Alert_Playlist", ""),	
	IR.GetDevice("FMHS-ALERTSPKR-01").Set("play_sound", ""),
function doSecondThing()
{		
	IR.GetDevice("FMHS-ALERTSPKR-02").Set("Lab1_Alert_Playlist", ""),
	IR.GetDevice("FMHS-ALERTSPKR-02").Set("play_sound", ""),
}
IR.SetTimeout(2000, doSecondThing);

Thank you - this is working beautifully. I inserted:

IR.SetTimeout(200, sendRequests);

However I am now finding it repeating the result every 200ms (display text, play a sound). Next task is to have it query the device and if nothing has changed since last time, do not issue a command. 

Please to share that a clever colleague has solved the parsing problem for me. Only thing left is for it to poll the bridge every 100ms for a status change.

IR.AddListener(IR.EVENT_START, 0, function()
   
{
   IR.GetDevice("hue");
   // ***get Hue driver***
   sendRequests();
   // ***send request for API***  
   // ***Code to go here to request status every 100ms regardless of active page or popup***         
});

function sendRequests()
{
   // ***request status of Sensor 14 - Buttons ¬ eventually these scripts will need to listen to 10x buttons***
   IR.GetDevice("hue").SendEx({ 
         Type: "GET",                                                                    
         Url:  "/api/4pIBQMqs2Nib6JgK9XtBsaACKKClGAUTKrOtjivg/sensors/14",      
         cbReceiveText:       function(text)  
         {
            var response = JSON.Parse(text);
            var buttonEvent = response.state["buttonevent"];
            var numberToString = buttonEvent.toString();
            var firstNumber = numberToString.charAt(0);
            // Takes the first number of the button event response which correlates to the button press.
            // This is then parsed allowing the button to trigger something in iRidium unstead.
            switch (firstNumber)
            {
              case '1':
                        IR.GetPage("Page 1").GetItem("buttonstate").Text = "number 1 has been pushed.";    
              break;
              case '2':
                     IR.GetPage("Page 1").GetItem("buttonstate").Text = "number 2 has been pushed.";
              
              break;
              case '3':
                     IR.GetPage("Page 1").GetItem("buttonstate").Text = "number 3 has been pushed.";
              
              break;
              case '4':
                     IR.GetPage("Page 1").GetItem("buttonstate").Text = "number 4 has been pushed.";
                            
              break;
              default:
                            
              break;
            }
              
         },
   
   });
}

// The current response without parsing is as follows. What is important
// is the first number after state > button event > XXXX

// *start of response from API for Sensor = 12*
//{
//    "state": {
//        "buttonevent": 4002,
//        "lastupdated": "2018-12-15T01:23:33"
//    },
//    "config": {
//        "on": true,
//        "battery": 100,
//        "reachable": true,
//        "pending": []
//    },
//    "name": "DimmerDemo",
//    "type": "ZLLSwitch",
//    "manufacturername": "Philips",
//    "swversion": "5.45.1.17846",
//    "uniqueid": "00:17:88:01:04:af:cb:12-02-fc00"
//}
// *end of response from API for Sensor = 12*

Hi Vladimir - thanks for your awesome support. I tried to insert this code but it either breaks my code, or it still shows the old results. I have attached my project for your reference. Hue Dimmer Button Demo

HI Vladimir

Focusing on the JSON stuff, I think I may have your syntax a bit wrong. Is this on the right track?

function sendRequests()
{
// ***request status of Sensor 12 - Buttons - eventually these scripts will need to listen to 10x buttons***
IR.GetDevice("hue").SendEx({
Type: "GET",
Url: "/api/a8CaS3oaTHN0mL-1IgKZgYRzXTLL3kIbJVApJukm/sensors/12",
cbReceiveText: function(text),
var tmp = '{"state": "buttonevent"}';
IR.Log("JSON.parse(tmp).buttonevent");
str.charAt(1);
}

{
switch (buttonevent)
// ***Code to go here to parse response data and extract state > buttonstate > XXXX***
IR.GetPage("Page 1").GetItem("buttonstate").Text = text;

Thanks Vladimir

I will try this now!

The bit from the JSON I need is

LEVEL 1 = 0

LEVEL 2 = state

LEVEL 3 = buttonevent: XXXX

Hello

I have been using inexpensive WIFI controllers with RGB strips and integrating with iRidium through a custom driver. I have setup presets for the colours I need and then just recall them via TCP. If you want more information I could put together a tutorial or send you the information. 

I believe so. Tomorrow I will test the server on the AV network and see if my control panel is talking to it. Really appreciate your help this evening!!!!!

Thanks Vladimir. I used POwershell and was able to do the route -p. I am able to access iRidium Server from both 192.168.x.x and 10.36.x.x networks now (both locally on the machine and remotely). Just to confirm, all my AV device control panels are set to talk to 192.168.x.x interface. The 10.36.x.x interface is purely for management of the server, and is not use for controlling AV drivers.