Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
en:mervis-scada:82-iot-api [2019/05/17 13:37] m.chlupac |
en:mervis-scada:82-iot-api [2021/04/08 13:04] (current) |
||
---|---|---|---|
Line 1: | Line 1: | ||
====== IoT API ====== | ====== IoT API ====== | ||
+ | |||
+ | You can send measured data to Mervis via several APIs. The IoT API is the most flexible one - you can define custom Levels and Tags to be used for later data processing and Mervis SCADA project generation. | ||
+ | |||
+ | ===== Simple Example ===== | ||
<code javascript> | <code javascript> | ||
Line 8: | Line 12: | ||
" | " | ||
" | " | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | }, { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ], | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | ] | ||
+ | } | ||
+ | </ | ||
+ | |||
+ | * Use always UTC form of the timestamp. Otherwise a default conversion will occurr. Default conversion can depend on many factors and is not reliable. Even if it works right now for your time zone it can change in the future as we upgrade/ | ||
+ | * Available data types: | ||
+ | * float64 | ||
+ | * string | ||
+ | * int64 | ||
+ | * uint64 | ||
+ | * bool | ||
+ | * datetime | ||
+ | |||
+ | |||
+ | ===== Full Example ===== | ||
+ | |||
+ | |||
+ | <code javascript> | ||
+ | { | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
+ | " | ||
}, { | }, { | ||
" | " | ||
Line 19: | Line 78: | ||
} | } | ||
], | ], | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
" | " | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, { | }, { | ||
" | " | ||
Line 33: | Line 92: | ||
} | } | ||
], | ], | ||
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
- | " | + | " |
}, { | }, { | ||
" | " | ||
Line 55: | Line 114: | ||
} | } | ||
</ | </ | ||
+ | |||
+ | |||