Welcome!

On this forum you can discuss iRidium with other users. iRidium consist of 2 main components - i3 pro app and iRidium Server. Please post here your questions, ideas or errors you find.

Please send your questions to support team as a private messages.


Please subscribe to the Change Log to know our news

+2
Waiting for user's reply

Недокументированные свойства кнопок для скриптов

Oleg Bubnov 10 months ago in iRidium Script • updated by Ilya Markov (expert) 6 months ago 12

  1. Руководство обозначает свойство состояния DrawOrder, но никак его не описывает. Можно ли его использовать? Если да, то как? Я попытался использовать вот такой подход: btn.GetState(0).DrawOrder = "Fill Image Border Text Icon"; - кнопка исчезла с экрана, но на нажатия реагировала. Такой же результат, если через запятую перечислять.
  2. То же самое со свойством Font. В руководстве описано, что можно использовать только Тахому-20. Можно ли в скрипте поменять как-то значение и размер шрифта при помощи скрипта? Например, используя FontId? Если да, то как?
  3. Можно ли задать свойство Image однажды для всех состояний? Аналогично свойству Text.
  4. Если скриптом нельзя полноценно создать экземпляр кнопки, тогда как решать эту задачу? Создавать некий шаблон кнопки в Студио и потом уже его прятать на никогда не вызываемой странице, размножать и изменять?
+2
Answered

.AddChannel & .AddTag

Dmitry Ryzhkov 1 year ago in iRidium Script • updated by Andrey S 10 months ago 4

Здравствуйте,


когда можно ожидать добавление функционала .AddChannel & .AddTag


Это очень необходимо для динамического создания драйверов и их каналов.

+2
Voting

New List Direction

Damian Hartin 2 years ago in iRidium Script • updated by Oksana (expert) 2 years ago 3

As per my other topic for info on the new list..

Direction doesn't seem to work? Even in the sample list project you have provided...?

Answer
Oksana (expert) 2 years ago

Hello Damian,

The new list doesn't support Direction now.The new list have a minimal functional in the first release. In future, we plan to improve them.

+1

Server Timer

Henry 5 months ago in iRidium Script • updated by Andrey S 4 months ago 1

Hi Guys,


Anyone can help on how I can make a timer in the server that can be sent/controlled in the panel.


I need to send the month,  the day and the time plus the command from the panel going to the server.


appreciate your help.


Thanks,

Henry

+1
Answered

How to Embed Youtube App inside iRidum?

admin 1 year ago in iRidium Script • updated by Aleksandr Romanov (CTO) 4 months ago 3

How can we embed the YouTube app to open a default youtube channel and to send it to smarttv

+1
Declined

Supported Javascript methods

geurtsd 2 years ago in iRidium Script • updated 1 year ago 9

Dear support team,


Despite the fact that your training and reference material has grown and professionalised a lot over the time, would it bw possible to publish a list of supported methods of standard javascript? Or a javascript version that the script editor is based on so we can research it ourselves?


I find regularly that standard javascript methods do not work in iridium, which makes it cumbersome to troubleshoot if I did something wrong in my programming, or if the method s just not supported.....


one example: Array method "indexOf"


thanks in advance.


cheers

Answer

Polifill for indexOf("item of array")
add this script in your project and you will be able to use indexOf(array) thats available in ECMA5


// Polifill, IndexOf
// ECMA-262, 5, 15.4.4.14
// http://es5.github.io/#x15.4.4.14

if (!Array.prototype.indexOf) {
  Array.prototype.indexOf = function(searchElement, fromIndex) {
    var k;

    if (this == null) {
      throw new TypeError('"this" is null or not defined');
    }

    var O = Object(this);

    var len = O.length >>> 0;

    if (len === 0) {
      return -1;
    }

    var n = +fromIndex || 0;

    if (Math.abs(n) === Infinity) {
      n = 0;
    }

    if (n >= len) {
      return -1;
    }


    k = Math.max(n >= 0 ? n : len - Math.abs(n), 0);

    while (k < len) {

      if (k in O && O[k] === searchElement) {
        return k;
      }
      k++;
    }
    return -1;
  };
}

then you can use it:

var arr = ["All Systems", "Floor 1", "Room 1", "Room 3", "Room 4"];

var a = arr.indexOf("Room 1");
IR.Log(a);   // 2


+1
Voting

i3 Lite/Pro Lists Suggestion

Dmitry Ryzhkov 2 years ago in iRidium Script • updated 1 year ago 5
Hello.
Please consider a new opportunity to work with lists of type List to develop new drivers.
At the moment the list is announced in the script,
var myList = Module.GetPopup ("myPopup"). GetItem ("myList");
It has the right to life in the development of drivers for i3 Lite.
In the transition to the development of drivers for i3 Pro it becomes a problem, because the driver is closed and it does not make a difference.
Therefore, you must manage the list of drivers through the channels (Commands and Feedback)
Thus to connect to the driver list is necessary and sufficient to throw drayveha channels on the list in the interface.
In the driver pressing on the list will be processed through IR.EVENT_CHANNEL_SET, and display information through Module.SetFeedback ('myList', [data]);
I am more than sure that there are nuances, but the meaning is clear about.

0
Waiting for user's reply

Yahoo Weather Module - Need to extract data

j4zz J4zzee 2 months ago in iRidium Script • updated 2 months ago 2

Hi everyone -


I'm currently working on a project to close the shutters at a certain time. I can set that time manually and the function works. Now, I would like to close the shutters at the sunset time.


I am using the Yahoo Weather Module, and I would like to know how to extract this sunset time to use it in my script.


Thank you for your support! :)


0
Waiting for user's reply

Как считать поле data из Feedback в JS ?

Василий Пупкин 3 months ago in iRidium Script • updated by Tatiana Kiselyova (expert) 2 months ago 3

В Драйвере в Feedback создаю элемент:

Name: Розетка

Data: ZWayVDev_zway_4-5-38


Каждую секунду я опрашиваю сервер и мне приходят обновленные ID. Мне нужно пробежаться по всем элементам в Feedback, прочитать поле Data и сравнить Data c полученным ответом от сервера. Это возможно?


Основная идея, чтобы в Name лежало человеческое имя, а в Data лежало ID устройства с которым я буду сравнивать приходящие от сервера обновления.

0
Not a bug

Не считывается IR.GetDevice("AV").GetCommandAtName("Command 1").data

Василий Пупкин 3 months ago in iRidium Script • updated by Aleksandr Romanov (CTO) 2 months ago 5

По инструкции http://dev.iridiummobile.net/Drivers_API#.GetCommandAtName хочу считать поле data, но там пусто.
В Драйвер добавляю элемент в Commands с полями:

Name: ZWayVDev_zway_4-5-38
Type: POST
URI:

Data: hahaha


Хочу в JS прочитать data:

IR.AddListener(IR.EVENT_CHANNEL_SET, that.device, function(name, value) {
         var Command = that.device.GetCommandAtName(name);
         IR.Log("id: " + Command.id + ", name: " + Command.name + ", data: " + Command.data);


Ответ:
[02-10-2017 12:55:57.753] INFO CORE * The client started to work *
[02-10-2017 12:55:59.968] INFO SCRIPT id: 2, name: ZWayVDev_zway_4-5-38, data: 
[02-10-2017 12:55:59.968] INFO SCRIPT /ZAutomation/api/v1/devices/ZWayVDev_zway_4-5-38/command/on


data пусто!!!