I am trying to export the data from a device into another app. the target app can only take input every 5 mins, and I want to send it the current last_value of 6 variables from the same device.
I have set up a conditional event and added code to the payload, but it only send the last value of the “last” variable in the conditional stack.
I am using this code in the payload with the event conditional on temperature>=0 or tilt>=0 (so constantly sending every 5 min)
{“temperature”: " [variable] ", “tilt”: " [variable] ", “battery”: " [variable] ", “interval”: " [variable] ", “gravity”: " [variable] ", “rssi”: " [variable] " }
The output sent is…
“payload”: “{"temperature": "{‘name’: ‘tilt’, ‘id’: ‘67c1a9c10f65563694d4c8d2’, ‘properties’: {}, ‘last_value’: 36.59605, ‘timestamp’: 1741097268589, ‘last_value_context’: {}} ", "tilt": "36.59605 ", "battery": "36.59605 ", "interval": "36.59605 ", "gravity": "36.59605 ", "rssi": "36.59605 " }”
How can I get the event payload to send all 6 variable’s last value in one hit?