HomeGenie Forum

Automation Program Plugins and Wizard Scripting => Help => Topic started by: dani on January 02, 2015, 07:51:43 PM

Title: Getting general parameter from widget.json Module
Post by: dani on January 02, 2015, 07:51:43 PM
I need to get a general parameter of HG.
In C# from a scene modules of HG I call :
string tableTH = Settings.Parameter( "Table.Therm.0" ).Value ;
But from .JSON Widget of a module how to make that ?
For a module parameter I code :
var thermTH = HG.WebApp.Utility.GetModulePropertyByName(module, 'ConfigurationOptions.Table.W');
But for general parameter I need Help. In that case module is my local object. For general object what is the syntax ?

Thank's for Help.
Dani
Title: Re: Getting general parameter from widget.json Module
Post by: Gene on January 02, 2015, 08:58:50 PM
It is not possible to access system settings structure from javascript (client-side).
As a work-around you can store these settings into a Virtual Module so you can access it both from js and automation engine.
Is that ok for your purpose?

g.

Title: Re: Getting general parameter from widget.json Module
Post by: dani on January 02, 2015, 11:45:04 PM
Thank's for your answer.
The data are already stored in one virtual module. It's the data from my hour table widget.
So what is the JSON syntax to access to another module from the current widget module ?
Title: Re: Getting general parameter from widget.json Module
Post by: Gene on January 02, 2015, 11:49:08 PM
var myModule = HG.WebApp.Utility.GetModuleByDomainAddress(domain, address);

g.
Title: Re: Getting general parameter from widget.json Module
Post by: dani on January 02, 2015, 11:57:00 PM
Thank's GĂȘne.
Also I saw the R453.  I will update and make some tests.

Nice night
Dani