This forum uses cookies
This forum makes use of cookies to store your login information if you are registered, and your last visit if you are not. Cookies are small text documents stored on your computer; the cookies set by this forum can only be used on this website and pose no security risk. Cookies on this forum also track the specific topics you have read and when you last read them. Please confirm that you accept these cookies being set.

javascript group read
#6
(04.02.2022, 08:42)admin Wrote: You are probably calling it before localbus is connected.
Try this:
Code:
$(localbus).on('connect', function() {
  console.log('connected');
  var req = { action: 'read', address: '1/1/1' };
  localbus.ws.send(JSON.stringify(req));
});

Ok, now it works!
Thanks!
Reply


Messages In This Thread
javascript group read - by jmir - 03.02.2022, 14:08
RE: javascript group read - by admin - 03.02.2022, 14:28
RE: javascript group read - by jmir - 03.02.2022, 14:29
RE: javascript group read - by jmir - 03.02.2022, 16:44
RE: javascript group read - by admin - 04.02.2022, 08:42
RE: javascript group read - by jmir - 04.02.2022, 10:33

Forum Jump: