0
Answered

IR.Getdevice server

Ferry 3 months ago in Tips and Tricks updated by Vladimir Ovchinnikov 2 months ago 7

Hello,

Is it possible to send a value from js to a tag on the server?

I have a UMC with a mqtt driver on it.

I would like to send a value from JS but cannot get it done with IR.GetDevice ("iRidium Server"). Set ("MQTT.Address", 1);


What am I doing wrong?

GOOD, I'M SATISFIED
Satisfaction mark by Ferry 3 months ago
Under review

Hello.

The code should look something like this:

var device = IR.GetDevice("iRidium Server");
IR.AddListener(IR.EVENT_ONLINE, device, function()
{
device.Set("MQTT.room_1", 1);
});

Code for this driver, with the following channel names (specify your channel names):


Thank you. I'll give it a try.


Sorry but I can't get it done. I have added a test project. What am I doing wrong?Project

Hello.

Delete the folder C:\Users\%username%\Documents\iRidium pro documents\Client\ before starting the emulator.

mqtt_panel.irpz
mqtt_server.sirpz

Thank you. Now it works. Why do you have to empty the folder?

Clearing the folder will delete all saved settings of the i3 pro client.