MQTT Publish Format V1

MQTT Publish format V1 is the compressed format, useful for data constrained devices. Data remains in byte array and decoded in AlphaX cloud.

Best for Edge to Cloud transfers

Posting Data to AlphaX is a relatively simple process. The user must format his/her data in the correct format and simply publish it to the AlphaX Cloud MQTT service. The AlphaX system will automatically take care of the rest!

NOTE: The user must first enable Conduit using his/her user profile. Follow this article here for help: https://minnovation.com.au/knowledge-base/how-to-enable-conduit-for-a-user/

The user must also enable the MQTT checkbox on the Conduit feature.

The user can now Subscribe/Publish to the the MQTT service at mqtt.alphax.cloud using the credentials provided.

Publish Topic V1:

<token>/<device id>/pub/v1

token [REQUIRED]: The unique security token for each user. This is available from the User window in AlphaX. This parameter is required to access the conduit service, if confused about how to get token, please contact the Minnovation Team.

device id [REQUIRED]: The unique network ID that is used to register and track the device in the AlphaX system. This parameter is mandatory, if not defined, you will receive an error message.

Publish Message V1

payload[REQUIRED]: The byte array that contains the data for the publish. The data must assume the standard data format for AlphaX as documented here: https://minnovation.com.au/knowledge-base/payload/

Formatting the Data Object

In a V1 n-byte payload, the first 8 bytes are mandatory and always corresponds to device level data. Any bytes after these mandatory bytes corresponds to individual channel data.

The data object should be formatted as a byte array using the following structure.

data: 0A10010001000000A00FA00F0000

Mandatory Data (Device Data)

Device data is mandatory when using the v1 packet format. This data refers to the first 8 bytes of data in the bytearray string which are mapped to 4 reserved channels in the AlphaX system when it receives an uplink message.

Tip: If the data is not available for the data specified, or should the user wish to pass these values in alternative channels, you can pad any of the listed fields using 0000

Dynamic Data (Channel Data)

Following the mandatory fields, each channel specific values can be passed as a 4 byte integer. These integers will dynamically fill channels starting at channel 1 up to channel 32 for each 4 byte integer that is added to the end of the packet.

These values are divided by 1000 before being stored in the database to accomodate for floating point precisions.

Tip: If more than 3 decimal places are required, we suggest choosing a different data uplink format for ingestion eg. v2 or v3

Note: AlphaX has a limit of 16 data channels per device. Should additional channels be required, we suggest splitting the data over 2 seperate data sources.

Example Usage

Publish to mqtt.alphax.cloud

Topic

xxxxxxxxxxxxxxxxxx/mydevice1234/pub/v1

Message

0A10010001000000A00F0000

This would submit the data

Fixed Data Channels: 4106 1 1 0

Being default data of Battery Voltage, Message ID, RSSI and Error Code. If your device doesn’t output these values simply add a 0 to pad the data value out.

Dynamic Data Channels: 4000

Being dynamic data channel of 4000. Note this value is divided by 1000 to convert to a float on storage.

Dynamic channels can be registered in AlphaX using the following link: https://minnovation.com.au/knowledge-base/how-to-configure-channel-for-an-alphax-iot-device/

Last updated