Network
ethstatus.json
GET api/network/status/ethstatus.json.
Name | Data Type | Description |
---|---|---|
mac | String | 6 byte hex |
comm1 | Object | See object definition in the table below |
comm2 | Object | See object definition in the table below |
Comm Object Definition:
Name | Data Type | Description |
---|---|---|
link | Number | 0: No link 1: Link |
speed | Number | 0: 10 Mbit 1: 100 Mbit |
duplex | Number | 0: Half 1: Full |
JSON response example:
{ "mac": "003011FF0201", "comm1": { "link": 1, "speed": 1, "duplex": 1 }, "comm2": { "link": 1, "speed": 1, "duplex": 1 } }
ipstatus.json & ipconf.json
These two functions share the same data format. The function ipconf.json returns the configured IP settings, and ipstatus.json returns the actual values that are currently used. ipconf.json can also be used to alter the IP settings.
GET api/network/status/ipstatus.json
or
GET api/network/config/ipconf.json
Name | Data Type | Note |
---|---|---|
dhcp | Number | - |
addr | String | - |
subnet | String | - |
gateway | String | - |
dns1 | String | - |
dns2 | String | - |
hostname | String | - |
domainname | String | - |
{ "dhcp": 0, "addr": "192.168.0.55", "subnet": "255.255.255.0", "gateway": "192.168.0.1", "dns1": "10.10.55.1", "dns2": "10.10.55.2", "hostname": "abcc123", "domainname": "hms.se" }
To change IP settings, use network/ipconf.json. It accepts any number of arguments from the list above. Values should be in the same format.
Example:
GET api/network/config/ipconf.json?dhcp=0&addr=10.11.32.2 &hostname=abcc123&domainname=hms.se
ethconf.json
GET api/network/config/ethconf.json
Name | Data Type | Note |
---|---|---|
mac | String | - |
comm1 | Number | - |
comm2 | Number | Only present if two Ethernet ports are activated in the module. |
The values of “comm1” and “comm2” are read from the Network Configuration object, instances #7 and #8.
{ "mac": [00, 48, 17, 255, 2, 1], "comm1": 0, "comm2": 4 }
The parameters “comm1” and “comm2” are configurable by adding them as arguments to the GET request:
GET network/ethconf.json?comm1=0&comm2=4
The parameters “comm1” and “comm2” may hold an error object with Anybus error code if the module fails processing the request:
{ "mac": [00, 48, 17, 255, 2, 1], "comm1": 0, "comm2": { error: 14 }, }
The Anybus CompactCom error codes are used. Please see the Anybus CompactCom 40 Software Design Guide.
ifcounters.json
GET api/network/status/ifcounters.json?port=<port>
Valid values for the argument <port> are 0, 1, and 2.
Port number 0 option refers to the internal port (CPU port).
Port number 2 option is only valid if two Ethernet ports are activated in the module.
Name | Data Type | Description |
---|---|---|
inoctets | Number | IN: bytes |
inucast | Number | IN: unicast packets |
innucast | Number | IN: broadcast and multicast packets |
indiscards | Number | IN: discarded packets |
inerrors | Number | IN: errors |
inunknown | Number | IN: unsupported protocol type |
outoctets | Number | OUT: bytes |
outucast | Number | OUT: unicast packets |
outnucast | Number | OUT: broadcast and multicast packets |
outdiscards | Number | OUT: discarded packets |
outerrors | Number | OUT: errors |
mediacounters.json
GET api/network/status/mediacounters.json?port=<port>
The argument <port> is either 1 or 2.
Port number 2 option is only valid if two Ethernet ports are activated in the module.
Name | Data Type | Description |
---|---|---|
align | Number | Frames received that are not an integral number of octets in length |
fcs | Number | Frames received that do not pass the FCS check |
singlecoll | Number | Successfully transmitted frames which experienced exactly one collision |
multicoll | Number | Successfully transmitted frames which experienced more than one collision |
latecoll | Number | Number of collisions detected later than 512 bit times into the transmission of a packet |
excesscoll | Number | Frames for which transmissions fail due to excessive collisions |
sqetest | Number | Number of times SQE test error is generated |
deferredtrans | Number | Frames for which the first transmission attempt is delayed because the medium is busy |
macrecerr | Number | Frames for which reception fails due to an internal MAC sublayer receive error |
mactranserr | Number | Frames for which transmission fails due to an internal MAC sublayer transmit error |
cserr | Number | Times that the carrier sense was lost or never asserted when attempting to transmit a frame |
toolong | Number | Frames received that exceed the maximum permitted frame size |
nwstats.json
GET api/network/status/nwstats.json
This object lists available statistics data. The data available depends on the product.
Example output:
[] or [ { "identifier": "eipstats", "title": "EtherNet/IP Statistics" } ]
Get network specific statistics (<ID>
is an “identifier” value returned from the previous command):
GET api/network/status/nwstats.json?get=<ID>
“eipstats”
[ { "name": "Established Class1 Connections", "value": 0 }, { "name": "Established Class3 Connections", "value": 1 }, { "name": "Connection Open Request", "value": 0 }, { "name": "Connection Open Format Rejects", "value": 0 }, { "name": "Connection Open Resource Rejects", "value": 0 }, { "name": "Connection Open Other Rejects", "value": 0 }, { "name": "Connection Close Requests", "value": 0 }, { "name": "Connection Close Format Rejects", "value": 0 }, { "name": "Connection Other Rejects", "value": 0 }, { "name": "Connection Timeouts", "value": 0 }, ]
“eitstats”
[ { "name": "Modbus Connections", "value": 0 }, { "name": "Connection ACKs", "value": 1 }, { "name": "Connection NACKs", "value": 0 }, { "name": "Connection Timeouts", "value": 0 }, { "name": "Process Active Timeouts", "value": 0 }, { "name": "Processed messages", "value": 0 }, { "name": "Incorrect messages", "value": 0 }, ]
“bacnetipstats”
[ { "name": "Unconfirmed server requests received", "value": 0 }, { "name": "Unconfirmed server requests sent", "value": 1 }, { "name": "Unconfirmed client requests sent", "value": 0 }, ]
“bacnetaplserverstats”
[ { "name": "Active transactions", "value": 0 }, { "name": "Max Active transactions", "value": 1 }, { "name": "Tx segments sent", "value": 0 }, { "name": "Tx segment ACKs received", "value": 0 }, { "name": "Tx segment NAKs received", "value": 0 }, { "name": "Rx segments received", "value": 0 }, { "name": "Rx segment ACKs sent", "value": 0 }, { "name": "Duplicate Rx segment ACKs sent", "value": 0 }, { "name": "Rx segment NAKs sent", "value": 0 }, { "name": "Confirmed transactions sent", "value": 0 }, { "name": "Confirmed transactions received", "value": 0 }, { "name": "Tx segment timeouts", "value": 0 }, { "name": "Rx segment timeouts", "value": 0 }, { "name": "Implicit deletes", "value": 0 }, { "name": "Tx timeout deletes", "value": 0 }, { "name": "Rx timeout deletes", "value": 0 }, { "name": "Tx aborts received", "value": 0 }, { "name": "Rx aborts received", "value": 0 }, { "name": "Transaction aborts sent", "value": 0 }, { "name": "Transaction rejects sent", "value": 0 }, { "name": "Transaction errors sent", "value": 0 }, ]
“bacnetaplclientstats”
[ { "name": "Active transactions", "value": 0 }, { "name": "Max Active transactions", "value": 1 }, { "name": "Tx segments sent", "value": 0 }, { "name": "Tx segment ACKs received", "value": 0 }, { "name": "Tx segment NAKs received", "value": 0 }, { "name": "Rx segments received", "value": 0 }, { "name": "Rx segment ACKs sent", "value": 0 }, { "name": "Duplicate Rx segment ACKs sent", "value": 0 }, { "name": "Rx segment NAKs sent", "value": 0 }, { "name": "Confirmed transactions sent", "value": 0 }, { "name": "Confirmed transactions received", "value": 0 }, { "name": "Tx segment timeouts", "value": 0 }, { "name": "Rx segment timeouts", "value": 0 }, { "name": "Implicit deletes", "value": 0 }, { "name": "Tx timeout deletes", "value": 0 }, { "name": "Rx timeout deletes", "value": 0 }, { "name": "Tx aborts received", "value": 0 }, { "name": "Rx aborts received", "value": 0 }, { "name": "Transaction aborts sent", "value": 0 }, { "name": "Transaction rejects sent", "value": 0 }, { "name": "Transaction errors sent", "value": 0 }, ]
“bacnetalarmstats”
[ { "name": "COV Active subscriptions", "value": 0 }, { "name": "COV Max active subscriptions", "value": 1 }, { "name": "COV Lifetime subscriptions", "value": 0 }, { "name": "COV Confirmed resumes", "value": 0 }, { "name": "COV Unconfirmed resumes", "value": 0 }, { "name": "COV Confirmed notifications sent", "value": 0 }, { "name": "COV Unconfirmed notifications sent", "value": 0 }, { "name": "COV Confirmed notification errors", "value": 0 }, { "name": "AE Active events", "value": 0 }, { "name": "AE Active NC recipients", "value": 0 }, { "name": "AE Confirmed resumes", "value": 0 }, { "name": "AE UnConfirmed resumes", "value": 0 }, { "name": "AE Confirmed notifications sent", "value": 0 }, { "name": "AE UnConfirmed notifications sent", "value": 0 }, { "name": "AE Confirmed notification errors", "value": 0 }, { "name": "AE DAB lookup errors", "value": 0 }, ]
“eplifcounters”
[ { "name": "In Octets", "value": 22967 }, { "name": "In Ucast Packets", "value": 121 }, { "name": "In NUcast Packets", "value": 31 }, { "name": "In Discards", "value": 0 }, { "name": "In Errors", "value": 0 }, { "name": "In Unknown Protos", "value": 0 }, { "name": "Out Octets", "value": 169323 }, { "name": "Out Ucast Packets", "value": 168 }, { "name": "Out NUcast Packets", "value": 16 }, { "name": "Out Discards", "value": 0 }, { "name": "Out Errors", "value": 0 }, ]
“ectstats”
[ { "name": "Logical EoE port link", "value": "Yes" }, { "name": "Invalid frame counter IN port", "value": 1 }, { "name": "Rx error counter IN port", "value": 1 }, { "name": "Forwarded error counter IN port", "value": 1 }, { "name": "Lost link counter IN port", "value": 1 }, { "name": "Invalid frame counter OUT port", "value": 1 }, { "name": "Rx error counter OUT port", "value": 1 }, { "name": "Forwarded error counter OUT port", "value": 1 }, { "name": "Lost link counter OUT port", "value": 1 }, ]
“eoeifcounters”
[ { "name": "In Octets", "value": 22967 }, { "name": "In Ucast Packets", "value": 121 }, { "name": "In NUcast Packets", "value": 31 }, { "name": "In Discards", "value": 0 }, { "name": "In Errors", "value": 0 }, { "name": "In Unknown Protos", "value": 0 }, { "name": "Out Octets", "value": 169323 }, { "name": "Out Ucast Packets", "value": 168 }, { "name": "Out NUcast Packets", "value": 16 }, { "name": "Out Discards", "value": 0 }, { "name": "Out Errors", "value": 0 }, ]
“pnpof”
[ { "name" : "Port 1 Temperature (C)", "value" : "41.37" }, { "name" : "Port 1 Power Budget (dB)", "value" : "23.0" }, { "name" : "Port 1 Power Budget Status", "value" : "OK" }, { "name" : "Port 2 Temperature (C)", "value" : "40.57" }, { "name" : "Port 2 Power Budget (dB)", "value" : "0.0" }, { "name" : "Port 2 Power Budget Status", "value" : "OK" } ]
nwconf.json
GET api/network/config/nwconf.json
This is a product specific JSON function that can provide network specific configurations. The function lists available configuration options.
Response:
The response is a list with identifiers and titles of possible network specific configuration groups.
Example when product does not support any network specific configuration:
[]
Example when product supports OPC UA configurations:
[[ { "identifier": "opcua", "title": "OPC UA Configuration" } ]
Example when product supports OPC UA and FOO configurations:
[ { "identifier": "opcua", "title": "OPC UA Configuration" }, { "identifier": "foo", "title": "FOO Configuration" }, ]
To get current configuration for a specific configuration group use:
GET network/nwconf.json?get=[identifier]
The response is a list of current configurations of “identifier” containing:
name | Name of configuration parameter, used to identify the parameter on set requests |
value | Configuration value |
min | Optional: Min value to accept |
max | Optional: Max value to accept |
type | Optional: Indicate the HTML input type preferred to show the value |
maxlength | Optional: Indicates the max length of value.enumstrings |
enumstrings | Optional: For enum settings. A list of selectable value strings |
Example to get an OPC UA configuration:
GET network/nwconf.json?get=opcua [ { "name" : "TCP port", "value" : 4840 }, { "name" : "Discovery server URL", "value" : "", "type" : "text" } ]
Example to get an MQTT configuration:
GET network/nwconf.json?get=mqtt [ {"name":"Broker URL","value":"","type":"text","maxlength":64},, {"name":"Client identifier","value":"","type":"text","maxlength":23}, {"name":"Keep alive time (s)","value":60,"type":"number","min":0, "max":65535}, {"name":"Broker username","value":"","type":"text","maxlength":16}, {"name":"Broker password","value":"","type":"password", "maxlength":32}, {"name":"Base topic","value":"","type":"text","maxlength":128}, {"name":"Quality of service","value":0,"enumstrings": ["QoS 0","QoS 1","QoS 2"]} ]
To set current configuration for a specific configuration group use:
GET network/nwconf.json?set=[identifier]¶m1=value1¶m2=value2…
The response contains:
result | The result code is a standard ABCC (ABP) error code (0=Success). |
message | Optional; Indicates a response message to the user. |
Example to set OPC UA TCP Port:
GET network/nwconf.json?set=opcua&TCP port=4841 { "result" : 0 }