someweirdsin
Participant
Post count: 2

Hello, people of Earth.

I have installed ETS SDK recently and made wrappings in JavaScript(using Jint interpreter) for some Sdk functions.

https://box.bobalus.tech/cloud/index.php/s/j8Yb23xqtKNQR7C
md5 hash: 3d8fce6050db844c16c45fd257ccb12d

Archive contains project source code and compiled binaries, zipped into .etsapp container.

All of these I developed and compiled in MicroSoft Visual Studio Community edition, which is free to use for physical person.

As and editor I used AvalonEdit and Ctrl+Space inside text area should show helper with commands.

I didn’t use it with ETS, but, guessing, it is working (at least source code is ok).

As a general reminder: always make backups for your own good.

Simple example:

setStrictMode(false);
createGroupAddress("2/3/4", "meoow");

More complex example(create group addresses and link comm objects for device):

clear();
setStrictMode(false);

let device = "1.1.1";
let range = "1/1"; let i = 0;
let info = getDeviceInfo(device);

writeln(JSON.stringify(info, null, 2));
info.communication_objects.forEach(function(co) {
	let addr = range + i;
	createGroupAddress(addr, co.text);
	link(device, co.number, addr);
});

Last one:


// now a quick way to swap communication objects -
// for example you need to swap two push buttons on device

clear();

function swapCo(device, num1, num2) {
	let info = getDeviceInfo(