I'm trying to write module that scheldue thermostat, but it doesnt work
In index.js I have
var aDev = this.controller.devices.get(this.config.thermostat);
aDev.instances[0].ThermostatSetPoint.Set(1,6);
I also tried
this.controller.devices[9].instances[0].ThermostatSetPoint.Set(1,6);
What am I doing wrong? How set temperature in script?
set termostat value in module
set termostat value in module
Z-Way 1.7.2; Raspberry Pi B+
Re: set termostat value in module
You're mixing two different API levels.
Accessing devices[x].instances[y].ThermostatSetPoint is applicable only to Z-Wave binding, which is exported into global object zway. Note that global zway object may change or disappear, so your module should be ready to handle that.
If you're going with this.controller.devices, it returns virtual device that can be operated with metrics. This is a higher level of abstraction.
Accessing devices[x].instances[y].ThermostatSetPoint is applicable only to Z-Wave binding, which is exported into global object zway. Note that global zway object may change or disappear, so your module should be ready to handle that.
If you're going with this.controller.devices, it returns virtual device that can be operated with metrics. This is a higher level of abstraction.
Re: set termostat value in module
Does this mean that I can throw away the whole 1.7 Z-Way developers manual ?pofs wrote: Note that global zway object may change or disappear
Since 29-12-2016 I am no longer a moderator for this forum
Re: set termostat value in module
No, why? I mean it may be re-created/removed in 2.0 when you reconfigure/disable Z-Wave Binding module, so you should design your modules having that in mind and don't keep global references to the objects that may become invalid.pz1 wrote:Does this mean that I can throw away the whole 1.7 Z-Way developers manual ?pofs wrote: Note that global zway object may change or disappear
Re: set termostat value in module
OK thanks, now (I think) I understand the context.
Since 29-12-2016 I am no longer a moderator for this forum
Re: set termostat value in module
Thank for reply. Now I have in script
but it still doesn't work
in log file:
ZWayVDev_8:0:Thermostat:T performCommand processing: {"0":"exact","1":{"level":16}}
but nothing happens, temperature setpoint remains unchanged.
Code: Select all
var aDev = self.controller.devices.get(self.config.thermostat);
aDev.performCommand("exact", { level : 16 });
in log file:
ZWayVDev_8:0:Thermostat:T performCommand processing: {"0":"exact","1":{"level":16}}
but nothing happens, temperature setpoint remains unchanged.
Z-Way 1.7.2; Raspberry Pi B+
Re: set termostat value in module
It seems that metrics doesn't work with object thermostat neither on v1.7.2 nor 2.0.0rc17.
There is also some problem with widget, witch doesn't display at all.
This worked for me. Maybe someone find it usefull
There is also some problem with widget, witch doesn't display at all.
This worked for me. Maybe someone find it usefull
Code: Select all
var setTemp = parseInt ( self.config.temperature,10);
zway.devices[9].instancds[0].ThermostatSetPoint.Set(1,setTemp) ;
Z-Way 1.7.2; Raspberry Pi B+
Re: set termostat value in module
Hi Guys,
I can control my lights using http request very well. I am searching the http request to setup temperature. Can somebody show me an url example to be able to setup the temperature for my Danfoss Thermostat?
Thanks
I can control my lights using http request very well. I am searching the http request to setup temperature. Can somebody show me an url example to be able to setup the temperature for my Danfoss Thermostat?
Thanks
Re: set termostat value in module
I used
http://192.168.178.46:8083/ZWaveAPI/Run ... .Set(1,23)
-> 23Grad
http://192.168.178.46:8083/ZWaveAPI/Run ... et(1,10.5)
-> 10.5Grad
for my Danfoss Thermostat (Id 4).
Uwe
http://192.168.178.46:8083/ZWaveAPI/Run ... .Set(1,23)
-> 23Grad
http://192.168.178.46:8083/ZWaveAPI/Run ... et(1,10.5)
-> 10.5Grad
for my Danfoss Thermostat (Id 4).
Uwe
Z-Way v2.0.1-rc18 on Raspberry Pi