Device Configuration #
To be able to communicate with the FMS, some requirements about the topics and the payload of the messages should be followed. The following sections explain the requirements for the messages sent by the devices.
Topics #
The root level of all connected devices is meili/iot
. After this, the topic should be structured as follows:
meili/iot/{Identifier}/{message_type}
{Identifier}
: The identifier of the device. This should be the same as the identifier entered when adding the device to the map.{message_type}
: The type of the message. This can be one of the following:status
: The status of the device. This message should be sent periodically by the device.order
: The order sent to the device. This message will be sent by the FMS to the device, indicating the new status that the device should reach.
For example, if the device identifier is light
, the topics should be as follows:
meili/iot/light/status
meili/iot/light/order
**Note** The exact name of the {message_type} can be configured in the device's fleet configuration. The default values are `status` and `order`.
Payload #
The payload should be a simple message containing the status of the device as configured when creating the device. For example, in case that the status is represented by an integer, the payload can be as follows:
1
In case it is a string, the payload can be as follows:
ON
The received messages will have the same format as the sent messages.