Custom widget
-
Yes, there is a change. You have to get resource by calling,
var temperatureSen = mcApi.uidTag().getByUid("my-sensor-1").getResource();
-
mmmh now I'm getting a new error....
-
I do get the readings now, when I run the script, the gauge.min.js is accessible, just the gauge does not want to work, with the error above... Please anyone? I'm out of ideas
-
Hi all,
This problem is driving me insane, does anyone please have some advice on where to look for this problem?
Regards -
@esawyja looks like there is wrong mapping on template.
Can you change thistemperatureSen.sensorVariable.value
totemperatureSen.value
? -
-
Could we not just add this as a widget type, when you add new widget, have a entry for gauge?
That would be awesome instead of adding all this code? -
@esawyja Sure, I will add some of new widgets, when I get time. Thanks for the feedback.
-
Thanks so much!!
-
@jkandasa said:
var temperatureSen = mcApi.uidTag().getByUid("my-sensor-1").getResource();
Also faced this issue when i imported my database on a different node.
had to change the scripts to use the new variable....Gauges work now after changing the variables..
For the rest no issues found, all work like a charm!!!!
Thank you for the great support!!!
-
is there any reason for this, once I add the library ?
-
@fsgrazzutti Can you forcefully refresh your browser?
or you may have some syntax error. -
I found a typo in your example : https://<mycontrollerip>:8334/mylib/gauge.min.js
Using https://<mycontrollerip>:8443/mylib/gauge.min.js it works !Congratulations for MyController !
-
@fsgrazzutti Great catch! Thanks.