Binding to Domoticz
Binding to Domoticz
Binding to Domoticz Home automation system based on Gorans Fibaro Binding code.
Creates and updates user variables in Domoticz which can be used further to give indication of alarm status or drive the events based system.
https://github.com/fergalom/node-spc-domoticz-binding
Creates and updates user variables in Domoticz which can be used further to give indication of alarm status or drive the events based system.
https://github.com/fergalom/node-spc-domoticz-binding
Re: Binding to Domoticz
Excellent! Just what I was looking for!
Does SPC Web Gateway works with the OS that´s bundled with the Domoticz PI-image?
https://www.domoticz.com/wiki/Domoticz_ ... i_SD_Image
Does SPC Web Gateway works with the OS that´s bundled with the Domoticz PI-image?
https://www.domoticz.com/wiki/Domoticz_ ... i_SD_Image
Re: Binding to Domoticz
yes this is what I am using.
Re: Binding to Domoticz
Hi, i have some problems installing the SPC Web GW -Domoticz Binding.
i have istalled the SPC Web Gateway and the Domoticz Server on the same Raspberry!
The SPC Web GW works fine and i can send and receive commands to the SPC-Alarm-System.
The Domoticz Web_Interface works fine also, i have configured the Temp Sensor of my Raspi to test the system.
By installing the SPC Binding the command "nmp install" doesnt work. I have got an error log (see att)
Can anyone help me?
Thanks in advance
i have istalled the SPC Web Gateway and the Domoticz Server on the same Raspberry!
The SPC Web GW works fine and i can send and receive commands to the SPC-Alarm-System.
The Domoticz Web_Interface works fine also, i have configured the Temp Sensor of my Raspi to test the system.
By installing the SPC Binding the command "nmp install" doesnt work. I have got an error log (see att)
Can anyone help me?
Thanks in advance
Re: Binding to Domoticz
think you need to update node.
I have v0.12.1
I have v0.12.1
Re: Binding to Domoticz
Hi,
Have SPC Web Gateway installed and working, but getting some mixed results on this binding to Domoticz
See logs:
I'm then getting some variables through to Domoticz, but not all, and only on first run, not getting any updates.
Is there any limit on zones? I've got 12, but it only seems to load 9.
Running Ubuntu 12.04, Node v0.10.37, Domoticz v2.3552.
Any help appreciated, will take another look tomorrow night to see which calls exactly are failing.
Have SPC Web Gateway installed and working, but getting some mixed results on this binding to Domoticz
See logs:
Code: Select all
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Failed to parse reply, expected JSON
Error: socket hang up
Error: socket hang up
Error: socket hang up
Error: socket hang up
Error: socket hang up
{
"status" : "ERR"
}
{
"status" : "OK",
"title" : "UpdateUserVariable"
}
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Failed to parse reply, expected JSON
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
Failed to parse reply, expected JSON
{
"status" : "OK",
"title" : "UpdateUserVariable"
}
{
"status" : "OK",
"title" : "UpdateUserVariable"
}
{
"status" : "OK",
"title" : "UpdateUserVariable"
}
Error: socket hang up
Error: socket hang up
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
<html><head><title>Bad Request</title></head><body><h1>400 Bad Request</h1></body></html>
{
"status" : "OK",
"title" : "SaveUserVariable"
}
{
"status" : "OK",
"title" : "SaveUserVariable"
Is there any limit on zones? I've got 12, but it only seems to load 9.
Running Ubuntu 12.04, Node v0.10.37, Domoticz v2.3552.
Any help appreciated, will take another look tomorrow night to see which calls exactly are failing.
Re: Binding to Domoticz
So, I've commented out
//getSpcStatus('zone', handleSpcZoneData);
and it works fine.
Also tried only putting 2-3 Zones through (not the 12 on my system), and this works also, soon as I increase this to 4/5/6 zones I get 400 errors.
So looks like problem is this is pushing too many API calls to Domoticz, quicker than it can handle - in which case some sleep time / delay (or some nice exponential back-off / retry logic) might help.
//getSpcStatus('zone', handleSpcZoneData);
and it works fine.
Also tried only putting 2-3 Zones through (not the 12 on my system), and this works also, soon as I increase this to 4/5/6 zones I get 400 errors.
So looks like problem is this is pushing too many API calls to Domoticz, quicker than it can handle - in which case some sleep time / delay (or some nice exponential back-off / retry logic) might help.
Re: Binding to Domoticz
Have it working with some modification
if (res.statusCode == 400) { /* Create variable if not found */
console.log('400 Error, aborting, waiting and retrying');
setTimeout(function(){
setDomoticzVariable(globalVariableHC2, value)
}, 1000);
req.abort();
return;
}
May not be 100% accurate, but seems to work, I'm new to JS, and this async programming has my head melted.
But now loading 26 variables from SPC Gateway, and updating nicely ..
if (res.statusCode == 400) { /* Create variable if not found */
console.log('400 Error, aborting, waiting and retrying');
setTimeout(function(){
setDomoticzVariable(globalVariableHC2, value)
}, 1000);
req.abort();
return;
}
May not be 100% accurate, but seems to work, I'm new to JS, and this async programming has my head melted.
But now loading 26 variables from SPC Gateway, and updating nicely ..
Re: Binding to Domoticz
@thos
Yes, it seems that the Domoticz web server has problem to manage all updates in parallell. Another solution would be to wait for the reply for each update request before sending next request.
Maybee I can help you with an example. But that will be tomorrow.
Yes, it seems that the Domoticz web server has problem to manage all updates in parallell. Another solution would be to wait for the reply for each update request before sending next request.
Maybee I can help you with an example. But that will be tomorrow.