Table of Contents

MQTT

Basic properties and requirements

General behavior of the clients

Connect

Publish/Subscribe

Supported formats

Wago compatible format

Registration of available variables

Example

{
	"FormatId": "TagConfiguration",
	"ApiVersion": 1,
	"Complete": true,
	"Collections": [{
		"Id": 1,
		"CollectionName": "Building 1",
		"SampleRate": 60000,
		"PublishInterval": 60000,
		"TagData": [{
			"Tag": "Temperature1",
			"Unit": "ºC",
			"ValueType": "real"
		},
		{
			"Tag": "Humidity",
			"Unit": "%",
			"ValueType": "word"
		}]
	},
	{
		"Id": 2,
		"CollectionName": "Building 2",
		"SampleRate": 120000,
		"PublishInterval": 240000,
		"TagData": [{
			"Tag": "Water flow",
			"Unit": "m3/h",
			"ValueType": "byte"
		},
		{
			"Tag": "Current phase L1",
			"Unit": "A",
			"ValueType": "lreal"
		}]
	}]
}

Variable values

Example

{
	"FormatId": "TagValues",
	"ApiVersion": 1,
	"CollectionId": 1,
	"TagData": [{
		"Time": "2018-03-27T17:19:23.720+02:00",
		"Values": {
			"Temperature1": 15.52,
			"Humidity": 21
		}
	}]
}

Weintek compatible format

Variable values

Example

{
    "d" : {
        "name:MyHomeTemperature, type:generic_sint64, unit:°C" : [ 0 ],
        "number C" : [ 0 ],
        "Bit" : [ false ],
        "My array" : [ 0, 10, 20 ]
    },
    "ts" : "2020-08-27T07:10:24.360316"
}

Command registration

{
    "d" : {
        "id:change_temperature, name:change temperature in house ,params:[{name: temperature, type:generic_float64, unit:°C}, {name: date, type:generic_datetime, unit:UTC}]" : false
    },
    "ts" : "2020-08-27T07:10:11.356013"
}

choose/create $deviceId/mervis/cmd_reg/ set general tab by screenshot add commands

Our supported types

Create a subcribe topic for executing command