IoT Agent for JSON

Configuration parameters

You can specify configurations for IoT Agent for JSON by editing the config.sh file.

Variable name Description Default value
IOTAGENT_JSON A sub-domain name of IoT Agent for JSON (empty)
IOTA_JSON_DEFAULT_RESOURCE The default path the IoT Agent for JSON uses listening for measures /iot/json
IOTA_JSON_TIMESTAMP Whether to supply timestamp information with each measurement received from attached devices. (true or false) true
IOTA_JSON_AUTOCAST Ensure JSON number values are read as numbers not strings. (true or false) true

IoT Agent for JSON over MQTT

Variable name Description Default value
MOSQUITTO A sub-domain name of Mosquitto (empty)
MQTT_1883 Use MQTT Port 1883. (true or false) false
MQTT_TLS Use MQTT TLS (Port 8883). (true or false) true

IoT Agent for JSON over HTTP

Variable name Description Default value
IOTAGENT_HTTP Set a sub-domain name to use IoT Agent over HTTP. (empty)
IOTA_HTTP_AUTH Authorization for IoT Agent over HTTP. (none, basic or bearer) bearer
IOTA_HTTP_BASIC_USER User for Basic authorization for IoT Agent over HTTP. fiware
IOTA_HTTP_BASIC_PASS Password for Basic authorization for IoT Agent over HTTP. (Automatically generated)

How to setup

IoT Agent for JSON over MQTT

To set up IoT Agent for JSON over MQTT, configure some environment variables in config.sh.

First, set a sub-domain name for IoT Agent to IOTAGENT_JSON= and MOSQUITTO= as shown:

IOTAGENT_JSON=iotagent-json
MOSQUITTO=mosquitto

To specify ports to use for the listener of Mosquitto, set MQTT_1883= and/or MQTT_TLS= to true. The default listener is 8883 port (TLS).

MQTT_1883=
MQTT_TLS=

IoT Agent for JSON over HTTP

To set up IoT Agent for JSON over HTTP, configure some environment variables in config.sh.

First, Set a sub-domain name for IoT Agent to IOTAGENT_JSON= and IOTAGENT_HTTP= as shown:

IOTAGENT_JSON=iotagent-json
IOTAGENT_HTTP=iotagent-http

The HTTP for southbound uses the port 443 (HTTPS).

To specify an authorization type, set IOTA_HTTP_AUTH to none, basic or bearer. The default value is bearer.

It is necessary to set a username and a password when using the basic authorization. If not specified, the default value be used. The default username is fiware. The default password is automatically generated.

IOTA_HTTP_BASIC_USER=
IOTA_HTTP_BASIC_PASS=