Напишите здесь описание Вашего форума ...
Beantwoord

Sonos not working with latest Sonos Firmware

Jackie Roos 2 jaar geleden in Bugs and problems • bijgewerkt door Eddie Barrientos 1 week geleden 125

Hi

we have updated our Sonos to firmware 7.2

and the iRidium Sonos module has stopped working:

Can you please fix


thanks

Antwoord
Aleksandr Romanov (CTO) 8 maand geleden

Hi, Matthijs
Please, check your version of i3pro app (above 1.1.5) and version of project code

0
Under review

JSON.Stringify unexpected behaviour

Dan 2 week geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 2 week geleden 1

I am wanting to save a strinfigied table to tags, with some of the values containing line breaks.

To test, I am running the following code:

var tbl = {};
tbl.a = "ABC\r\n123"
tbl.b = "ABC\\r\\n123"
IR.Log(JSON.Stringify(tbl));

This gives the output in emulator:

[04-07-2019 11:06:06.412] INFO SCRIPT {"a":"ABC
123", "b":"ABC\\r\\n123"}

As JSON.stringify should automatically escape slash characters, I am expecting to get the following output:

[04-07-2019 11:06:06.412] INFO SCRIPT {"a":"ABC\r\n123", "b":"ABC\\r\\n123"}

This results in an error when I try to run JSON.Parse on the result. You can test this by running

var tbl = {};
tbl.a = "ABC\r\n123"
tbl.b = "ABC\\r\\n123"
var str = JSON.Stringify(tbl);

var tbl2 = JSON.Parse(str);

The above code should just duplicate the value stored in tbl to tbl2. When run, I get the error:

[04-07-2019 11:08:59.657] WARNING SCRIPT Script exception: SyntaxError: C:\Users\Dan Work\Documents\iRidium pro documents\Client\Project 1\scripts\Newscript.js:5: line 1: String literal not closed at end of line


For now I have implemented a workaround by creating a new stringify function that replaces the CR and LF after the fact, and always calling this one instead

function newStringify(tbl) {
    var str = JSON.Stringify(tbl);
    str = str.replace(/\r/g, "\\r").replace(/\n/g, "\\n");
    return str;
}

0
Under review

MQTT Driver - Client ID

Tero Mäkelä 2 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 2 maand geleden 5

Hi!

Is there any way to create mqtt client id for every iridium client automatically? Now I have to create different iridium clients for every phones, because mqtt disconnects if there is same client id's connected (mqtt client collision).

0
Planned

deleting server logs on iridium C3 server not working?

JBOY 3 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 3 maand geleden 1

Hi,

I would like to delete the current logs on my UMC C3 iridium server.

When i push the 'delete all logs' button, i see that all references to the log files are removed at that moment.

However, when i load a new project to the server, all old log files are present again.

So: how to remove the logs from the servers through the web interface?


iRidium Server (build 1.3.6.16739, Mar 28 2019 17:38:20) | Web-panel: v1.0.3.20 (Mar 12 2019)

 working with studio V1.3.6.20458

Thanks,

Joachim

0
Under review

Не приходя фидбэки от модуля тёплых полов HDL Buspro MFH06.432

Умед 4 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 4 maand geleden 7

Добрый день. Проблема заключается в том, что от модуля тёплых полов не приходят фидбеки об уставки, выбранном режиме и кнопки включения тёплого пола. Хотя все эти данные подгружаются при старте проекта.

0
Under review

JstDimmer / MlvDimmer issue with modbus

oggi katic 4 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 2 maand geleden 4

Hi 

Have somebody used jstdimmer / mlvdimmer with modbus? i have a issue when i send a token when i click on round joystick, 

it works normally when i descreasing and increasing on buttons

When i click on round joystick i get the command sends a 0 into modbus controller. 

0
Beantwoord

script indexOf()

Romain LE CAN 5 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 3 maand geleden 9

Hello,


i want to use a javascript function on my project but when i use it i can see on the log "function is not defined"

the function is indexOf() to return the position of an element in an array.

array.indexOf(element)

is it the right syntax in iridium ?

thanks for your help

0
Under review

Systom Error

Maurits Roos 5 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 5 maand geleden 4

Hi  

I have updated to V1.3.5.20380 and now when I try and run i3 Pro 64 the below error comes up V1.2  worked fine  32 bit works fine as well I have reinstalled and no different 

0
Under review

Requesting feedback at regular intervals and JSON parsing

Iain Brew 7 maand geleden in Bugs and problems • bijgewerkt door Vladimir Ovchinnikov 6 maand geleden 10

Hello all

I am working on a small task to use the Philips Hue lighting system ecosystem in a project in a different way. One of their products is a 4 button wireless light switch. When buttons are pressed, it sends commands to a Hue Bridge (base station) which then talks to lights etc. Instead, I want to use those four buttons to trigger iRidium commands (i.e. send data to a driver, write a value to a token etc). 

I have made some progress with my project however am stuck with two things:

1) Request status every 100ms

Currently, I can only gain feedback once when I land on the page which contains the text box which the feedback is attached too. For this to work, I need iRidium to be checking the status of the buttons constantly so that it can be responsive within 100 or maybe 200ms. Is this possible?

2) Parsing JSON

I am a bit stuck on this. I have been working on a small javascript file which uses an 'SendEx' request to GET a response from the button (in the system it is known as a 'sensor' and its current ID is '12'). This is using JSON.

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 12 - Buttons***
   IR.GetDevice("hue").SendEx({ 
         Type: "GET",                                                                    
         Url:  "/api/a8CaS3oaTHN0mL-1IgKZgYRzXTLL3kIbJVApJukm/sensors/12",      
         cbReceiveText:       function(text)  

For now in my testing phase, I have the output of the text response go into a text box on my page:

IR.GetPage("Page 1").GetItem("buttonstate").Text = text;


The response from the Philips Hue system when requesting the status of Sensor 12 is:

hello

{
"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"
}

What is important to me is the first number after "state" > "button event". These numbers refer to the button pressed (1000, 2000, 3000, 4000). The last digit refers to the kind of press (long, short, release etc). 


Only the first number is important to me. This tells me simply which button has been triggered (1, 2, 3 or 4). This is the area I am struggling with most is the JSON Parse to extract just that first number. 


From here, depending on the number, it would then trigger something. For example:


}    
//switch goes here I think???!??
    case "1": 
    //button number '1'
    IR.GetPage("Page 1").GetItem("response").Text = Button 1 Pressed;
// ***trigger a command to a device i.e. Turn Light 5 ON
    IR.GetDevice("hue").Set("Light ID 5 = On, "");
break;
case "2":
IR.GetPage("Page 1").GetItem("response").Text = Button 2 Pressed;
    // ***do the things***
break;
case "3":
IR.GetPage("Page 1").GetItem("response").Text = Button 3 Pressed;
// ***do the things***
break;
case "4":
IR.GetPage("Page 1").GetItem("response").Text = Button 4 Pressed;
// ***do the things***
// break;


If anyone could advise on how to properly parse this JSON response and then have it trigger events in iRidium I would be very grateful.  

0
Beantwoord

Sending Hex data

Mike Slattery 7 maand geleden in Bugs and problems • bijgewerkt door Aleksandr Romanov (CTO) 7 maand geleden 2

I am trying to send embedded hex data and seem to be having issues.Is there another way to do this?


From Main program

Matrix.sendData(camSlot[myCamera], 3, "\x81\x01\x04\x00\x03\xFF");

Matrix Driver


function SendMsg(msg) {
// IR.Log("SendMsg: " + msg);
this.device.Send([msg]);
}


this.sendMsg = SendMsg;

function SendData(slot, baud, data) {

this.sendMsg("/+" + slot + "/" + baud + ":" + data + ".");

}

this.sendData = SendData;


What is received using Hercules Server in hex.

{81}{01}{04}{03}{C3}{BF} 

Missing the \x00 and \xFF get changed to C3 BF