SmartSwarm 300 Series
:
97
If there are no Input Registers, Discrete Inputs, or Coils defined for the slave, then there will be place-holders in the
published JSON data schema to show where the data for those register values would be, if they existed.
If there has not been any actual data seen on Modbus for a slave register it will not appear in the payload.
Here’s an example payload, where there are only holding registers defined (and observed) for the Slave:
{
"model": {
"state": {
"
CS
": [],
"
HR
": [{
"value_from": "RESPONSE",
"published_on": "HI\/ON",
"name": "HR_1",
"min": 0,
"address_offset": 0,
"max": 100,
"zero_value": 0,
"
num_value
": 113.000000,
"scaling": 1,
"alias": "Water Temperature",
"state": "VALIDATED",
"var_pct": 31.000000,
"at": "2016-07-14T19:36:29.127Z",
"address": 1,
"units": "Deg C",
"new_value": true,
"new_read": true
}, {
"value_from": "RESPONSE",
"published_on": "HI\/ON",
"name": "HR_2",
"min": -10,
"address_offset": 0,
"max": 40,
"zero_value": 0,
"
num_value
": 23104.000000,
"scaling": 1,
"alias": "Air Temperature",
"state": "VALIDATED",
"var_pct": 0,
"at": "2016-07-14T19:36:29.127Z",
"address": 2,
"units": "Deg C",
"new_value": false,
"new_read": true
}, {
"value_from": "RESPONSE",
"published_on": "HI\/ON",
"name": "HR_3",
"min": 0,
"address_offset": 0,
"max": 90,
"zero_value": 0,
"
num_value
": 0.000000,
"scaling": 1,
"alias": "Humidity",
"state": "VALIDATED",
"var_pct": 0,
"at": "2016-07-14T19:36:29.127Z",
"address": 3,
"units": "%",
"new_value": false,
"new_read": true