HomeGenie Forum
Automation Program Plugins and Wizard Scripting => Help => Topic started by: dani on May 23, 2015, 01:08:37 PM
-
Hello,
1 - Calibration :
With Fibaro FGRM-222 it's possible to ask the calibration of the roller by setting Parameter 29 to 1.
For that I add a button in the widget, but is somebody know the parameter of :
HG.Control.Modules.ServiceCall("??????", module.Domain, module.Address, "29/1"l, function (data) { }); in .js file ?
2 Pause :
In Fibaro HC2 it's possible to stop the roller in action, I Find the way :
- Send Basic.Get which returns the current position between 0 and 99.
- Send Basc.Set with the received value then the shutter stop.
So I add a button in the widget for that but same question How we do to send Basic.Get and Basic.Set from UI with HG.Control.Modules.ServiceCall() ?
Cheers
Dani
-
Auto answers :
1 - For force FGRM-222 calibration you have to use that code in .js file at the click of the button (for exemple calibration) :
// Calibrationp button action
widget.find('[data-ui-field=calibration]').on('click', function () {
HG.Control.Modules.ServiceCall("Config.ParameterSet", module.Domain, module.Address, "29/1", function (data) { });
});
2 - For pause, I am in time to solve the issue, I can get the instant basic value, but when I read it, even with a timeout; the value is not yet set in the parameter module :
// Stop button action
widget.find('[data-ui-field=stop]').on('click', function () {
HG.Control.Modules.ServiceCall("Basic.Get", module.Domain, module.Address, null, function (data) { });
setTimeout( function() {
var getBasic = HG.WebApp.Utility.GetModulePropertyByName(module, "ZWaveNodeBasic");
var newBasic = 0;
newBasic = getLevel.Value.replace(',','.') ;
HG.Control.Modules.ServiceCall("Basic.Set", module.Domain, module.Address, newBasic, function (data) { });
},400) ;
});