0
Beantwoord

IR.Getdevice server

Ferry 5 jaar geleden in Tips and Tricks bijgewerkt door Vladimir Ovchinnikov (expert) 5 jaar geleden 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?

GOED, IK BEN TEVREDEN
Satisfaction mark by Ferry 5 jaar geleden
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.