02.10.2024, 08:40
For a single value use this script.
For multiple values grp.getvalue() can be used but the you need a separate topic entry and script for all values in the same payload:
Code:
return json.encode({
ts = os.time() * 1000,
values = {
key1 = value
}
})
For multiple values grp.getvalue() can be used but the you need a separate topic entry and script for all values in the same payload:
Code:
return json.encode({
ts = os.time() * 1000,
values = {
key1 = value,
key2 = grp.getvalue('0/0/3'),
}
})