Поделитесь своими идеями, пожеланиями и примерами в этом разделе. Идеи, за которые голосуют чаще всего, будут реализованы быстрее!

Мы перевели нашу службу поддержки на новую систему технической поддержки. С 17.01.2022 мы отключили возможность создавать обращения через личный кабинет userecho. Теперь все запросы обрабатываются по почте на support@iridi.com .

Спасибо вам за ваше понимание и хорошего дня.

0
Отвечен

GC script command example

r riksma 9 лет назад в iRidium Script / AV and Driver scripts обновлен Oksana (expert) 9 лет назад 4
Good afternoon,
Could you please post an example showing how to send a native Global Cache command with a script?

For modbus i use this to send the value 1.

IR.GetDevice("Modbus TCP").Set("Command1",1);<br>



Let's say i want to send commands to an Apple TV, could i use Set, or Send like this?

IR.GetDevice("Modbus TCP").Set("CURSOR UP",X);<br>IR.GetDevice("Modbus TCP").Send([X]);<br>


What value should go where the X is now?
0
Отвечен

Event item exit?

Jackie Roos 8 лет назад в iRidium Script / AV and Driver scripts обновлен 8 лет назад 2

Hi

Is there an EVENT_ITEM_EXIT or equivalent?


I am currently using EVENT_ITEM_CHANGE for error checking, but I want to send the command once, based on the input, ie when focus leaves the item, not every time the edit box is changed


Or is there an event fired when the keyboard hits 'ENTER' or 'TAB'?


Or what do you suggest please?


thanks

0
Отвечен

Custom HTTP Driver - Receiving a response

r riksma 9 лет назад в iRidium Script / AV and Driver scripts обновлен 9 лет назад 16
Good afternoon,

I've been working on creating a custom HTTP driver. I can send commands without any problems but I would like to parse the returned response code and data as well.

I have been unable to find documentation on how to do this. Could you provide me with an example or tell me what's wrong with the following code? It does send the commands but the response from the server is lost.

function HTTPDriver(host,port){

this.init = function() {
this.HTTPDriver = IR.CreateDevice(IR.DEVICE_CUSTOM_HTTP_TCP, "HTTPDriver", host, port, "root", "atata", IR.SSL_OFF, IR.BACKGROUND_OFF);
};

this.get = function(param) {
IR.Log("Param " + param);
return this.HTTPDriver.Send(['GET,' + param + ',']);
};
}

IR.AddListener(IR.EVENT_START, 0, function () {
var httpDriver = new HTTPDriver("testserver","80");
httpDriver.init();

IR.AddListener(IR.EVENT_RECEIVE_TEXT, httpDriver, function(text)
{
IR.Log("RECEIVING TEXT");
IR.Log(text);

})

IR.AddListener(IR.EVENT_RECEIVE_DATA, httpDriver, function(text)
{
IR.Log("RECEIVING DATA");
IR.Log(text);

})

IR.Log(httpDriver.get("/abc/lol?123"));
httpDriver.get("/diag")
IR.Log("DONE!");
});
Ответ
Sergey (expert) 9 лет назад
status can not be obtained from the server via HTTP driver
0
На рассмотрении

Telnet autorization

Ekaterina (head of support) 10 лет назад в iRidium Script / AV and Driver scripts обновлен Aleksandr Romanov (CTO) 4 года назад 16

The user authorization at connection to Telnet looks as follows:

Connecting to 192.168.10.10 ...
Connected to 192.168.10.10
Login Please
Username: user
Password: password
Welcome to TELNET.

In the dialog window for connection login and password are sent in the open format. The login should be sent after receiving the "Username:" string, the password – after receiving the "Password:" string.

To perform the Telnet authorization in iRidium you should use the AV & Custom Systems (TCP) driver for which we create the following script:


IR.AddListener(IR.EVENT_RECEIVE_TEXT, IR.GetDevice('AV_Driver'), function(text)
{
  IR.Log("text = "+text);
 
  if (text.indexOf('Username') != -1)
  {
    IR.Log("login")
    IR.GetDevice('AV_Driver').Send(['Login',13,10]);
  } else if (text.indexOf('Password') != -1)
  {
    IR.Log("password")
    IR.GetDevice('AV_Driver').Send(['Password',13,10]);
  }
})

where

  • 'AV_Driver' – the name of the AV & Custom Systems (TCP) driver in the project device tree.
  • Send(['Login',13,10]) - Login – the user name
  • Send(['Password',13,10]) - Password – the password for  the indicated user.   


The script performs authorization after which (Welcome to TELNET.) you can send commands to equipment and receive feedback from it via Telnet.


PS: Your equipment might have a slightly different authorization dialog window. In this case modify the script so it could identify the strings after which you need to enter the login and password correctly. It will be enough for the correct work of the script.


Telnet_authorization.irpz
0
Запланирован

Javascript Methods

Damian Flynn 9 лет назад в iRidium Script / AV and Driver scripts обновлен Sergey (expert) 9 лет назад 10
I am currently converting a node.js program to be a driver in Iridium, and have some basic issues with Javascript functions not defined.

For example text.subscript and text.replace fail, but text.slice appears to work.

Where can i find the list of methods and functions which are supported in the Iridium implementation; as i am currently suck; or can i import/reference outside modules to add functions, and reuse work done?

thanks
Damian
0
Не ошибка

HDL iRidium Sctipt SPI (DDK) control

Эмиль Боев 9 лет назад в iRidium Script / AV and Driver scripts обновлен Ekaterina (head of support) 9 лет назад 1

Same HDL bus and devices.

One of devices is 'DMX'.


In first try, i gave name 'Channel 1' and executed:


IR.GetDevice("HDL-BUS Pro Network (UDP)").Set("DMX:Channel 1", 1);


It doesn't work.

Then: renamed command to 'Chanel_1' and it works!


IR.GetDevice("HDL-BUS Pro Network (UDP)").Set("DMX:Channel_1", 1);


May be one cannot control command (and feedback appropriately) with speces in name?

But here, in the official wiki info (http://wiki2.iridiummobile.ru/Drivers_API#Set) one can find:


IR.GetDevice("HDL-BUS Pro Network (UDP)").Set("Relay_1:Channel 3",0);

0
Ожидает ответа пользователя

Исключения при работе клиента

evg 8 лет назад в iRidium Script / AV and Driver scripts обновлен Dmitry - support (expert) 8 лет назад 1

Доброе утро!
Необходим механизм обработки исключений в работающем клиенте. Например, при невозможности выполнения команды:

var JSONObject = JSON.Parse(text);

эмулятор выдает сообщение:

WARNING Script exception: SyntaxError: C:\Users\evgeniy\Documents\iRidium mobile 2\Settings\iRidium\Main\script.js:331: <string>:1: expected ')' but got a string

текст получается от оборудования и разрезается на части, чтобы получить текст пригодный для конвертации в JSON. Но бывает всякое - и текст не всегда удается правильно обрезать единым алгоритмом.

Хочется иметь возможность:

1. сначала проверить текст на возможность конвертации, и только потом выполнить конвертацию. При невозможности, либо повторить запрос, либо ничего не делать

2. в непредвиденной ситуации, при получении сообщения "WARNING..." не останавливать выполнение общего кода

Может уже есть такие механизмы?

0
Отвечен

http level button

Alexandre Jacob - Home heaven 9 лет назад в iRidium Script / AV and Driver scripts обновлен Oksana (expert) 8 лет назад 2

Hi,

I want to create a new driver for a zwave box called jeedom.

The driver is http type and the commands are like :


http://172.27.175.53/core/api/jeeApi.php?apikey=

rHCc73U&type=cmd&id=88&slider=4


When creating a new script, I can connect to http device and send the url wich send the value 4 in to equipment.

Unfortunately, this value is a level (4 to 28)

So I want to create a level button to increase or decrease the value. But I can't send a different value automatically from the script.

Do you have any idea?


The feedback is like that :


http://172.27.175.53/core/api/jeeApi.php?apikey=rHCc73U&type=cmd&id=89

and send me the actual value on a web page but I can't reeive data in Iridium :-(


Thanks in advance for your precious help

Best regards



0
Завершен

Send mail from iRidium

Jackie Roos 8 лет назад в iRidium Script / AV and Driver scripts обновлен 8 лет назад 3

It would be great to be able to send an email from iRidium.


Please vote!


In the short term I have written a small email server to use as a driver in iRidium to send email. Please contact me if you need this (jackie@jamware.com)

0
Отвечен

Стандартный механизм лицензирования пользовательских приложений

evg 8 лет назад в iRidium Script / AV and Driver scripts обновлен Ekaterina (head of support) 8 лет назад 1

Добрый день разработчики!

Нет ли у вас планов создать некий стандартный механизм защиты для приложений (драйверов), разработанных инсталляторами?



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