What specifically are you doing with Scripting?
I would say the Javascript Bridge was one of Haiku Helper's greatest achievements. Just about every aspect of the OmniPro is scriptable as well as providing some limited integration abilities with other ip/http devices. (Amazon Alexa / ha-bridge depends on it right now too)
Some of my code examples- (I'm no javascript expert btw so please excuse any noob coding grammar) To all- feel free to copy + reuse if it helps in your setup. I can pm the complete script too as these are just snippets.
Logging, logging and more logging
// Zone Not Ready Function
function onZoneNotReady(zone) {
var ds = dateStamp();
if (zone.number == 58) {
helper.logToExternalFile('Driveway.log', ds + " - " + zone.bestDescription + " Sensor Tripped");
helper.sendNotification(controller, " Vehicle Detected in Driveway");
} else if (zone.number == 24) {
helper.logToExternalFile('Leak.log', ds + " - " + zone.bestDescription + " Sensor Tripped");
helper.sendNotification(controller, " Leak Detected in Basement");
} else if (zone.kind == 1) {
helper.logToExternalFile('Window.log', ds + " - " + zone.bestDescription + " Open");
zState();
}
}
Lighting Macro Buttons (saves lots of code in PC-Access and allows me to define custom buttons). This is only one piece of the switch statement.
function onButtonActivate(button) {
var ds = dateStamp();
switch (button.name) {
case 'Main OFF':
helper.logToExternalFile('Lighting.log', ds + " - " + " [ Main Lighting Off ]");
var iUnits = Array(2,4,7,8,10,11,12,13,14,15,16,18);
for (var i = 0, l = iUnits.length; i < l ; i++) {
var n = iUnits;
var intLight = controller.unitWithNumber(n);
if (intLight.isOn == true) {
helper.logToExternalFile('Lighting.log', ds + " - " + intLight.bestDescription + " On, Turning it Off");
intLight.off()
}
}
break;
Some code to talk to an Autellis Jandy Pool Controller
function onSocketBytesAvailable(socket) {
var ds = dateStamp();
var ares = socket.read();
helper.logToExternalFile('Pool.log', ds + " - " + "Autelis Response: " + ares + '');
socket.close();
poolVar(ares);
}
function eqToggle(device) {
var socket = helper.openSocket(controller, '192.168.5.8', 6000);
socket.write('#' + device + '\r');
}
function eqControl(device, command) {
var socket = helper.openSocket(controller, '192.168.5.8', 6000);
socket.write('#' + device + '=' + command + '\r');
}
function getHeater() {
var ds = dateStamp();
var xhr = new XMLHttpRequest();
var url = 'http://192.168.5.8/status.xml';
xhr.open('GET', url, true, 'username', 'password');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var res = xhr.responseText;
var etag = res.match(new RegExp('<' + 'poolht' + '>(.+?)', 'g'));
var estat = etag.toString().replace(/<.*?>/, "");
if (estat == '1') {
helper.logToExternalFile('Pool.log', ds + " - " + "Device Heater: Enabled" + '\r\n');
} else if (estat =='2') {
helper.logToExternalFile('Pool.log', ds + " - " + "Device Heater: On" + '\r\n');
} else if (estat =='0') {
helper.logToExternalFile('Pool.log', ds + " - " + "Device Heater: Off" + '\r\n');
}
}
}
}
xhr.send(null);
}
function setEquip(device, state) {
var xhr = new XMLHttpRequest();
var url = 'http://192.168.5.8/set.cgi?name=' + device + '&value=' + state;
xhr.open('GET', url, true, 'username', 'password');
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
if (xhr.status === 200) {
var res = xhr.responseText;
var ds = dateStamp();
helper.logToExternalFile('Pool.log', ds + " - " + "Autelis Response: " + res + '\r\n');
}
}
}
xhr.send(null);
}
Integration with OSX Indigo Domotics
// Execute Indigo Action Group function
function exeAct(actgroup) {
var xhr = new XMLHttpRequest();
var ac1flag = controller.unitWithNumber(439);
var ac2flag = controller.unitWithNumber(440);
switch (actgroup) {
case 'AC1on':
var agName = 'AC1%20Startup';
var url = "http://127.0.0.1:8176/actions/" + agName + "?_method=execute";
ac1flag.on();
break;
case 'AC1off':
var agName = 'AC1%20Shutdown';
var url = "http://127.0.0.1:8176/actions/" + agName + "?_method=execute";
ac1flag.off();
break;
case 'AC2on':
var agName = 'AC2%20Startup';
var url = "http://127.0.0.1:8176/actions/" + agName + "?_method=execute";
ac2flag.on();
break;
case 'AC2off':
var agName = 'AC2%20Shutdown';
var url = "http://127.0.0.1:8176/actions/" + agName + "?_method=execute";
ac2flag.off();
break;
default:
break;
}
xhr.open("GET", url, true);
xhr.onreadystatechange = function() {
if (xhr.readyState !=4) { return; }
if (xhr.status != 200) {
helper.logToExternalFile('Indigo.log', ds + " - " + "Update error: " + xhr.status);
return;
}
}
xhr.send();
//console.log(xhr.status);
}
So yes, for me scripting is a super feature and I would definitely miss it in a new product.