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.

Json virtual object
#13
event.dstraw is an integer value of group address. You can easily convert to a 0..499 range like this:
Code:
id = event.dstraw

if 66049 <= id and id <= 66290 then
  id = id - 66049
elseif 66305 <= id and id <= 66554 then
  id = id - 66305 + 250
else
  return
end

value = event.getvalue()
bacnet.write(127001, 'analog value', id, value)
Reply


Messages In This Thread
Json virtual object - by Evens - 08.08.2018, 07:01
RE: Json virtual object - by admin - 08.08.2018, 07:16
RE: Json virtual object - by Evens - 08.08.2018, 07:25
RE: Json virtual object - by admin - 08.08.2018, 07:49
RE: Json virtual object - by Evens - 08.08.2018, 07:54
RE: Json virtual object - by Evens - 08.08.2018, 10:33
RE: Json virtual object - by admin - 08.08.2018, 10:49
RE: Json virtual object - by Evens - 08.08.2018, 10:54
RE: Json virtual object - by admin - 08.08.2018, 11:00
RE: Json virtual object - by Evens - 08.08.2018, 11:36
RE: Json virtual object - by Evens - 09.08.2018, 13:29
RE: Json virtual object - by Daniel - 09.08.2018, 16:41
RE: Json virtual object - by admin - 10.08.2018, 06:30
RE: Json virtual object - by Evens - 10.08.2018, 08:37
RE: Json virtual object - by admin - 10.08.2018, 08:40
RE: Json virtual object - by Evens - 10.08.2018, 08:52
RE: Json virtual object - by admin - 10.08.2018, 09:28
RE: Json virtual object - by Evens - 13.08.2018, 06:10

Forum Jump: