![YDOC ML 17 Series Скачать руководство пользователя страница 117](http://html1.mh-extra.com/html/ydoc/ml-17-series/ml-17-series_manual_3232609117.webp)
ML-x17 DATA LOGGER MANUAL
Manufacturers of low power instruments
page 117
4.46 Configuration snippets
A data logger can be configured manually through the terminal interface or by loading a file containing a
complete configuration in binary format. For fast deployment you could build up a list of configuration files
for your different classes of monitoring stations (e.g. soil moisture, weather, hydrology, etc.) where each
different class uses the same type of sensors/devices. However the need could arise to make little
changes afterwards, changes like setting a level offset or an alarm limit and preferable automated from
your own application server. Updating these changes could be done by uploading a complete binary
config fil
e, but it’s a bit cumbersome to maintain many varieties of various classes of configuration on your
server or to patch changes in a complex binary configuration file.
As of FW 4.6B1 it becomes possible to make small changes to the configuration of a data logger by
uploading
“configuration snippets”. Snippets are expressed in JSON and can be transferred to a data
logger in the same way as a regular configuration, but its content/payload being a tiny readable JSON
object rather than a vast unreadable binary structure.
E.g. a snippet to change the data log & alarm interval to one hour resp. one quarter is just a few bytes.
{“gs”:{“
n
i”:3600,”ai”:900}}
4.46.1 Payload format
The contents/payload should contain valid formatted JSON and the very first byte should be an opening
brace
{
else the data logger will not interpret the payload as JSON and report an error.
Objects or members unknow to the data logger will be ignored. Supplying invalid values for known
members will be ignored as well, but an error will be reported and stored in the data log.
To keep the payload as small as possible, to support payload constrained media, names of objects,
arrays and members are expressed in short abbreviated notation.
The following root objects and arrays can be included in the payload:
•
“gs”
an object { } containing Global system Settings, like system name and data log interval.
•
“ds”
an array [ ] with Driver Setting objects, like send intervals and warm-up times.
•
“ps”
an array [ ] with Parameter Setting objects, like parameter offset and alarm limits.
4.46.1.1
Global system Settings
The following members can be included in the global settings object:
•
“dn”
a “string” of max 31 tokens providing the device/station name.
•
“ni”
a number providing the normal data log interval in seconds.
ni
can’t be any arbitrary value, it
should be in discrete divisors of 60 seconds, 60 minutes or 24 hours
(e.g. “ni”:11 is invalid, while
“ni”:12 is not.
•
“ai”
a number providing the alarm data log interval in seconds.
ai
should be equal or lower than
ni
and
should be in discrete divisors of
ni
(e.g. “ai”:17 is invalid when “ni”:60 is provided).
Specifying 0 will make
ai
equal to
ni
.
•
“tz”
a number in the range of -12 to +13 in steps of 0.25 to provide the time zone.
•
“dt”
a “string” formatted as “(yy)yymmdd hh:mm:ss” to set the deployment time, the data logger
will go in deep sleep until the deployment time is reached. This feature could come in handy
when the end of a monitoring season and you want to start it at the beginning of the next season.