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

We have moved our support service to a new technical support system. Since 17.01.2022, we have disabled the ability to create appeals through the userecho personal account. Now all requests are processed via mail to support@iridi.com .

Thank you for your understanding and have a nice day.

0
Answered

JS script: changes Image Stretch

Braet Stijn 7 years ago in iRidium Script updated by Aleksandr Romanov (CTO) 7 years ago 2

Is it possible to change  the image stretch to 'proportional' with a JS -script?Image 19543

0
Not a bug

Good_List.Color won't change color

Lance 7 years ago in iRidium Script updated 7 years ago 7

The template/clones are all transparent. When switching the substate colors of a list, it always appears solid black and no other color is possible. In other words, ListName.Color doesn't seem to work.


I thought I had broken some code, but adding the same correct commands to your item_good_list demos I get the same results. is there another way to change the background of a good_list? 

0

How can I connect a feedback channel to a button by script?

AdG 7 years ago in iRidium Script updated by Andrey S 7 years ago 1

I woulld like to use 1 Popup for several different rooms. So, I want to connect the feedback channels to the value property of the buttons on the Popup.

I made a script that puts the name of the channels in some project tokens. And now I want to connect the channel to the value property. So, not the value of the channel as text on the button at the moment the script is running. But, the value has to change, when the value in the channel is changing.

Can that be done? Or is that only possible by making an AddListener function to check the changing of the value, and then updating the value of the button?

0
Waiting for user's reply

edit list item properties

igor 7 years ago in iRidium Script updated 7 years ago 2

How do you change properties for the list items in a template?

My template has 2 dynamic images next to eachother, so for each listitem I need to set 2 url's.


For example:

var list = IR.GetPopup("Pop_camera").GetItem("camera_list");

list.CreateItem(0,1,{Image: urlPrefix+cameras[i]});

0
Answered

Отключение подсветки в зависимости от освещенности в помещении

Michael G. Baev 7 years ago in iRidium Script updated by Ekaterina (head of support) 7 years ago 1

День добрый, подскажите пожалуйста среди системных токенов нашел почти все датчики Ipad http://dev.iridiummobile.net/Tokens_API/ru кроме самого нужного мне - датчика освещенности, подскажите пожалуйста как можно реализовать механизм отключения подсветки панели в зависимости от наличия\остутствия освещения в помещении(используя встроенные механизмы Ipad) например анализируя изображение с камеры? И если это невозможно просьба пояснить по какой причине. Спасибо.

0
Waiting for user's reply

Read 4bit event from feedback

Martin Sundström 7 years ago in iRidium Script updated 7 years ago 12

I am trying to read the event from a 4bit dimming feedback channel and cannot get anything to show in the log. I am using the following code to catch all events and write them to the log:


IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetDevice("KNX Router (KNXnet/IP)"), function(name, value)
{
IR.Log(name+":"+value) // output the tag name and its new value in the log

}


It works well for events from other types, KNX touch buttons, temperature from sensors etc. But when I send a 4bit dimming event from either a touch button or through ETS4 I get nothing. Should I use another type of event to catch that specific value or should IR.EVENT_TAG_CHANGE work?


Thanks!



0
Not a bug

Странная работа IR.PlaySound()

AlexDr 7 years ago in iRidium Script updated by Aleksandr Romanov (CTO) 7 years ago 6

Сделал тестовый проект. Почему то после поочередного запуска через скрипт больше одного звука функцией IR.PlaySound() при закрытии эмулятора возникает исключение.


В рабочем проекте такое исключение возникает если запустить из скрипта проигрывание звука сразу после запуска клиента (эмулятора).


Объясните почему в тестовом проекте не проигрывается звук по кнопке Sound 3, если перед ней нажать Sound 2?


Завтра отпишусь как ведет себя проект со звуками на iPad.


тестовый проект

0
Answered

IR.GetServer doesn't work

Marco Tanis 7 years ago in iRidium Script updated 7 years ago 9

Hello,


I want to execute an command when one of my server tags changes, so i tried using IR.GetServer but that doesn't work i get a syntaxerror


here an example:


IR.AddListener(IR.EVENT_TAG_CHANGE, IR.GetServer(), function(name, value){
if(name == "test" && value == 0)
{
testoff();
}
else if(name == "test" && value == 1)

{
teston();
}

});

function testoff()

{
IR.GetDevice("KNX").Set("address1", 0);

IR.GetDevice("KNX").Set("address1", 0);
}


function teston()

{
IR.GetDevice("KNX").Set("address1", 1);
IR.GetDevice("KNX").Set("address1", 1);
}


does anyone know whats wrong here, or maybe another solution?


Thanks,

Marco

0

работает только в эмуляторе

Богдан Меленчук 7 years ago in iRidium Script updated by Andrey S 7 years ago 1

Управляю камином planika,

function pl_start()

{
IR.GetDevice("planika").Send(['POST,,__SL_P_UBT=ButtonStart']);

}

При работе с эмулятора все супер работает, и при загрузке на панель перестает работать

Image 17576

0
Answered

Как получить ссылку на кнопку в списке?

Oleg Bubnov 7 years ago in iRidium Script updated by Aleksandr Romanov (CTO) 7 years ago 4

Создаю список методом IR.ITEM_LISTBOX, заполняю его кнопками - выключателями релюх на AMX. Мне нужно при создании списка проверить какие реле включены и включить кнопки в списке. Как это правильно сделать? Я пытался изменять свойство Value у создаваемых кнопок (по аналогии с Text и Image), но генерируется ошибка. А как создать и поставить ссылку на кнопку в глобальный слушатель, не могу понять. Помогите, пожалуйста. Вот мой код:

var testPopup = "Баня";
var Switches = ["Вход","Душ","Пещера Потолок","Купель Патио","Купель Щит и Люстра","Батареи и Потолок","Пещера Люстра"];

IR.SetGlobalListener(IR.EVENT_GLOBAL_TAG_CHANGE, function(name, value)
{
IR.Log("Global Listener Activated: " + name + "\tValue: " + value);
//Как получить сюда ссылку на кнопку из списка и присвоить ее полю Value значение Value слушателя?
});

// оформляем подписку на изменения каналов драйвера
for (var i = 0; i < Switches.length; i++) {
IR.SubscribeTagChange("Drivers.amx."+Switches[i]);
};
IR.AddListener(IR.EVENT_START,0,function()
{
MakePanelID();
InitController();
NewPopup (testPopup);
IR.ShowPopup(testPopup)

// Создаем список и заполняем его
IR.GetItem(testPopup).CreateItem(IR.ITEM_LISTBOX,"Выключатели",0,0,750,1344);
test_list = IR.GetItem(testPopup).GetItem("Выключатели");
test_list.Template = "Шаблон Списка Выключателей";
for (var i = 0; i < Switches.length; i++) {
// или как здесь получить и указать значение GetFeedback из канала, соответствующего кнопке
test_list.CreateItem(i, 1,{Text: Switches[i]});

};

//При изменении выключателя, включаем или выключаем кнопку в AMX
IR.AddListener(IR.EVENT_LIST_ITEM_CHANGE, test_list, function(Item, Subitem, TypeEvent, object){
var tempnum = TypeEvent;
if(tempnum==12) {
amx.Set(Switches[Item],1);
amx.Set(Switches[Item],0);
Log(amx.GetFeedback(Switches[Item]));
object.Value = !amx.GetFeedback(Switches[Item]);

};
});
});