more G-Labs products

Author Topic: Sensor widget don't show Sensor. parameters  (Read 661 times)

December 13, 2016, 07:34:53 PM
Read 661 times

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi!

In HG r525 the Sersor widget don't show all Sensor. parameter with web UI. Android plus app show...The web UI show the default parameters, like temperature, humidity....but don't show unique parameters.
What changed in widgets?

December 18, 2016, 08:17:50 AM
Reply #1

nolio

  • *****
  • Information
  • Global Moderator
  • Posts: 544
Hi,

In the javascript code of the widget "homegenie/generic/sensor", there ctx.isUnknown that filter which parameter to show :
Code: [Select]
var ctx = $$.ui.GetParameterContext($$.module, parameter.Name, parameter.Value);
if (!ctx.isUnknown) {
I try to comment this check, but there is a lot of parameters in a module that are not interesting, but you can add parameter you want with something like this :
Code: [Select]
if (!ctx.isUnknown || parameter.Name == "Betti") {
Are you sure it was previously working ?

December 19, 2016, 10:21:52 AM
Reply #2

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi,

In the javascript code of the widget "homegenie/generic/sensor", there ctx.isUnknown that filter which parameter to show :
Code: [Select]
var ctx = $$.ui.GetParameterContext($$.module, parameter.Name, parameter.Value);
if (!ctx.isUnknown) {
I try to comment this check, but there is a lot of parameters in a module that are not interesting, but you can add parameter you want with something like this :
Code: [Select]
if (!ctx.isUnknown || parameter.Name == "Betti") {
Are you sure it was previously working ?


Hi!

Yes, it was previously working. This is the program: http://www.homegenie.it/forum/index.php?topic=1174.msg7407#msg7407
You can see, the program was show the parameters with the previously widget version.

I will try your suggestions today.

Thanks your help!

December 20, 2016, 09:59:16 PM
Reply #3

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi,

In the javascript code of the widget "homegenie/generic/sensor", there ctx.isUnknown that filter which parameter to show :
Code: [Select]
var ctx = $$.ui.GetParameterContext($$.module, parameter.Name, parameter.Value);
if (!ctx.isUnknown) {
I try to comment this check, but there is a lot of parameters in a module that are not interesting, but you can add parameter you want with something like this :
Code: [Select]
if (!ctx.isUnknown || parameter.Name == "Betti") {
Are you sure it was previously working ?

Hi!

I try this, but nothing change.

December 20, 2016, 10:06:55 PM
Reply #4

KaZe

  • ****
  • Information
  • Sr. Member
  • Posts: 219
Hi!

It's work, with other parameter.

Code: [Select]
if (!ctx.isUnknown || parameter.Name == "Sensor.Betti") {
Thanks!