Installation Instructions
1. Publisher: swittons/
2. Subscriber: swittons/DEVICE_ID (where DEVICE_ID is mac address for WiFi, IMEI
number for GSM)
3. Edge device behaviour for topics vs messages
The edge device should execute certain actions if a specific message is received on the topic
mentioned in point (2.2).
Message: ERR
Action: Light up RED LED in a blinking pattern for 2 times. (on-off, on-off) with a delay of
200 ms between on and offs
Message: OK
Action: Light up GREEN LED in a blinking pattern for 3 times. (on-off, on-off) with a delay
of 200 ms between on and offs
4. Edge device message description for orders
The edge device should send a message to the following topic when connected to the MQTT
broker
Topic: swittons/device
Message: {“device_id”:” DEVICE_ID”,”button”:”01”}
Description: 01 can be 01,02,03 or 04 depending on the button pressed. DEVICE_ID is mac
address for WiFi, IMEI number for GSM
The edge device should send a message along with button press information to the
following topic
Topic: swittons/order
Message: {“device_id”:” DEVICE_ID”,”button”:”01”}
Description: 01 can be 01,02,03 or 04 depending on the button pressed. DEVICE_ID is mac
address for WiFi, IMEI number for GSM
Note: The client ID for the edge device should be unique and in no
way similar to one another. The message format as mentioned in
point 4 should always be a valid JSON STRING.