JSON format
Visamic accepts one or more data values in a single input payload. The payload must be valid JSON, and the attribute names must match those configured for the Thing.
Format options
The examples below can be copied as a starting point. Replace the device identifier, attribute names, units, and values with your own data.
Simple value
The smallest payload contains an identifier and a value:
[
{
"id": "MyDevice1",
"v": 5.17
}
]
Here, MyDevice1 identifies the source and v contains the value. If no timestamp is included, Visamic assigns one when it receives the payload.
To send more than one simple value, include another object in the array:
[
{ "id": "MyDevice1", "v": 5.17 },
{ "id": "MyDevice2", "v": 2.27 }
]
When configuring the Thing, map the values you want to monitor and set a friendly name or unit when supported.
Named value
Use a named value when the payload itself should identify the attribute:
[
{
"Dist": [
{
"u": "km",
"v": 60
}
]
}
]
u is the unit and v is the value. Use a number for numeric data when possible.
Multiple values
Several named values can be combined in one payload. A value can include t (timestamp), u (unit), and v (value):
[
{
"A": [
{
"t": "2023-05-23T17:11:13.8470236+02:00",
"u": "km/h",
"v": 0.05
}
]
},
{
"B": [
{
"t": "2023-05-23T17:11:13.8470236+02:00",
"u": "°C",
"v": 11.9
}
]
},
{
"C": [
{
"t": "2023-05-23T17:11:13.8470236+02:00",
"u": "lum",
"v": 40.73
}
]
},
{
"D": [
{
"u": "Hz",
"v": 704
}
]
}
]
The whitespace and indentation are optional. The JSON structure and field names are not.
Map values
Map panels expect latitude and longitude attributes named LAT and LON:
[
{
"d": {
"LAT": [
{
"v": 50.7,
"u": "LAT"
}
],
"LON": [
{
"v": 9.05,
"u": "LON"
}
]
}
}
]
Use decimal degrees for both coordinates. Confirm the attribute names and map configuration in the current application before publishing production data.