Ваши комментарии

If it is a constant values from the some button, you can just drag and drop all the needed commands to the single Item (make a "macro command").




But if you have some conditions or math that should be done before sending, you can use the script:

// this function send the value to the list of commands with specified interval (100ms) 
// to be sure that the automation system will bot be overloaded by the commands
function send_macro (driver, channel, value) {
   function send () {
      if (channel[0]) IR.GetDevice(driver).Set(channel.shift(), value);
      else IR.ClearInterval(interval)
   }
   var interval = IR.SetInterval(100, send)
}

// here we send a call the macro function with needed parameters when press on Item
IR.AddListener(IR.EVENT_ITEM_PRESS, IR.GetPage("Page 1").GetItem("Item 1"), function() 
{
   send_macro  ('Modbus',      // driver
               ['Channel 1', 'Channel 2', 'Channel 3', 'Channel 4'],   // list of channels
               1);        // value to send
});

/* 
   var value = 100;  //you can define the value as a variable from external logic
   
   send_macro  ('Modbus',
               ['Channel 1', 'Channel 2', 'Channel 3', 'Channel 4'],
               value); 
*/

Macro send.irpz

Description updated, tnx!

You can get the coordinates of cursor when move the cursor with pressed left mouse button.

It works with mouse (IR.EVENT_MOUSE_MOVE) or finger (IR.EVENT_TOUCH_MOVE). The event starts from specified item. The coordinates stop changing when you release the button.


IR.AddListener(IR.EVENT_MOUSE_MOVE, IR.GetItem("Page 1").GetItem("Item 1"), function ()
{
    IR.Log(x + ":" + y); // new coordinates on move
});

In the " Advanced capabilities" sample it is used to change the coordinates of item (drag it).


var item = IR.GetItem("Page 1").GetItem("Item 1");

IR.AddListener(IR.EVENT_MOUSE_MOVE, item, function(x, y)
{
   //IR.Log(x+":"+y);
   item.X = x;
   item.Y = y;    
}); 

IR.AddListener(IR.EVENT_TOUCH_MOVE, item, function(x, y)
{
   //IR.Log(x+":"+y);
   item.X = x;
   item.Y = y;    
});

Right, there was an error in script


// if your another JS files includes  "IR.SetGlobalListener()"  
// you have to add the code inside of previous IR.SetGlobalListener() and delete the listener from this file!
// if you are not sure that you are able to do it yourself please contact to support@iridiummobile.ru
IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function (name, value)
{
   if (name == "System.Time.Minutes")
   {
      // SET UP PERIODICAL ACTIONS:
      // start hour, start minute, duration of process (ms), channel full name, start value, stop value 
      // if you don't want to stop process, add "no" instead of stop value 
      check_timer (13, 55, 60000, "Server.Channels.KNX Router (KNXnet/IP).Pump 1", 1, 0);             // timer 1 
      check_timer (14, 30, 480000, "Server.Channels.KNX Router (KNXnet/IP).Pump 2", 1, "no");         // timer 2
                                                                                                      // you can add more
   } 
 
   // do not edit the other part, you need only to add the needed timers in above  
   function check_timer (hours, minutes, duration, channel, start_value, stop_value)
   {
      if (IR.GetVariable("System.Time.Hour") == hours && IR.GetVariable("System.Time.Minutes") == minutes) 
      { 
         function stop () 
         {
            IR.GetServer().Set(channel, stop_value);
            IR.Log("process at "+hours+":"+minutes+" stopped");
         }
         IR.GetServer().Set(channel, start_value);
         IR.Log("process at "+hours+":"+minutes+" started");
         if (stop_value != "no") 
         {
            IR.SetTimeout(duration, stop);
         }
      }
   }
});
 
IR.SubscribeTagChange("System.Time.Minutes");

Hello
It is possible to DnD popups:


If you need some advanced JS with DnD of items on page please see this sample: http://www.iridiummobile.net/download/software/v3/interface_detail/advanced-graphic-capabilities/

(DnD of AV source to AV zone).

It just have to consider only the visible values, it can be made automatically

At a moment scale checks the maximum tag value and doesn't check if it is visible or not. We'll reconsider the algorithm, thank you

Thales it means that your question is not "How to authorize a emulator?" but "How to Invite user in object". Please ask in the topic exactly what you mean, better with the screenshots.


Ok so you are trying to invite user in "Users and Panels" tab of Object in Cabinet. Generally you have to use this instruction: http://dev.iridiummobile.net/IRidium_for_iOS/en#Commercial_Use


You cannot invite to the object another integrator or your own account. You can invite only the End User who is not registered on the web site as an integrator. Then he'll receive an email with the link, he'll be able to select his own password and authorize in app. All the steps and details described in the article.

But if you just want to start the Emulator, pls take YOUR OWN integrator's login and password from the web site and add it in Log In tab of Emulator. You don't need to invite yourself before authoorisation with Intergrator's account.


Hi! Can you please describe how it looks like? The Y axis stop the scalin, and you see that the graphic goes outside of scale?

hi! what is the drivers you use in the Server project. The database get a tags only on change, but if the driver init a channels with 0 value, it could be a problem. We have to check. If it possible please share a project



Сервис поддержки клиентов работает на платформе UserEcho