HomeGenie Forum
General Category => Troubleshooting and Support => Topic started by: emerich on January 28, 2016, 06:48:39 PM
-
Hi,
I'm trying to set the value of a self generated module property from a widget
"Name": "HomeGenie.ZWaveThermoWakeUpInterval",
"Description": "",
"Value": "",
"UpdateTime": "2016-01-28 13:53:36Z"
I tried several things but the Value didn't change.
Can you please give me a hint how to proceed?
Thanks Christian
-
Hi,
is there no way to set Module properties from a widget?
I tried several methods without a warning during code save, but also no success in changing the values.
I can set and change them from a programm but not from a widget.
Can someone tell me how to set or change the Value of the following Module property from a widget?
"Name": "HomeGenie.ZWaveThermoWakeUpInterval",
"Description": "",
"Value": "",
"UpdateTime": "2016-01-28 13:53:36Z"
[code]
Thanks for any suggestions!
br. Christian
-
An exemple with parameter saved in modules.xml file :
// Get the parameter properties
param=HG.WebApp.Utility.GetModulePropertyByName(module,"ParameterName");
// Set the parameter value
param.NeedsUpdate='true';
HG.WebApp.Utility.SetModulePropertyByName(module,param.Name,newValue);
HG.WebApp.GroupModules.UpdateModule(module);
Cheers
Dani
-
Thanks Dani,
shame on me! I forgot to set Update and the update module call!
br. Christian
-
Best way would be using this:
https://github.com/genielabs/HomeGenie/blob/master/BaseFiles/Common/html/js/api/homegenie.configure.js#L277
-
Thanks Gene!