16.12.2020, 08:25
You might be calling it before the object list is loaded. You can also use grp.listen and check for init state to get the initial object value:
These grp functions are available from JS:
Code:
$(function() {
grp.listen('1/1/1', function(object, state) {
if (state == 'init') {
console.log(object.value);
}
});
});
These grp functions are available from JS:
- grp.all()
- grp.find(alias)
- grp.gettags(alias)
- grp.getvalue(alias)
- grp.listen(alias, callback, all)
- grp.tag(tags, mode)
- grp.taglisten(tag, callback, all)
- grp.update(alias, value)
- grp.write(alias, value)