You are on page 1of 6

HMS eWON Flexy integration to AWS

How send data using the MQTT protocol to Amazon webservices from a HMS
eWON Flexy

Pre-Requisites
1. Make sure that the port 8883 is open in your firewall.
2. HMS eWON Flexy 20x Series with firmware version 12.2s1PR or above.
3. Amazon webservice account.
This document does not describe on how the AWS services work or any of these services.

Setting up your AWS details.


Go to https://aws.amazon.com/
Login into your amazon AWS Account.

Select AWS IoT

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017
Change the location of your device – Select Ireland (EU-West-1)

Select Linux/OSX as platform and Node.js as the AWS IoT Device SDK.

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017
Press the download button, this will contain the private key and the certificate that needs to be uploaded in the
Flexy.

Figure 1 Files included in downloaded zip file

This part is NOT required.

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017
Here a list of the devices will be displayed…

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017
Setting up the HMS eWON Flexy
1. Log in to the HMS eWON Flexy.
2. Create two Tags named “tag1”, “tag2” and “DO” (Can be MEM Tags or any other of types of Tags)
3. Copy the basic script from the post https://techforum.ewon.biz/thread-474.html

Connect to the Flexy using FTP.


1. In the flexy, create in the user directory a folder named aws.
2. Extract the files previously downloaded from Amazon.
3. Upload the files
a. MyeWONDeviceName.cert.pem
b. MyeWONDeviceName.private.key
c. root-CA.crt attached with this documention.
In the script change the following highlighted sections to suit your settings.

Run your basic program in the flexy.

View the data in AWS.


1. Go the menu Manage Things
2. Select the your device (MyeWONDeviceName)
3. Select the menu Activity
4. Select MQTT client
5. Type in “ewon_data” as the topic, press the subscribe button.

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017
Data should be displayed.

Send command to the Flexy from AWS.

To send a command to the Flexy, type the topic “ewon_read” into the textbox next to the “Publish to topic”
button. Write then the message you want to send to the Flexy in the black text aera and click “Publish to topic”.
You should see the topic and the message used displayed into the Console window of the Flexy BASIC IDE.
Moreover, if you simply send the message “test”, the “DO” Tag must be set to 1.

HMS eWON Flexy integration to AWS.docx (version: 0.1)


20 December 2017

You might also like