Connect Arduino Yun to QNAP NAS-Lesson 3

Lesson 3 Connect your device to QIoT Suite Lite using MQTTS

In Lesson 2 , we complete deploy sample code to your device .In this lesson, you will learn how yo use sample code to connect to QIoT Suite Lite

And there are two parts:

A: Run Sample Code

B:Another protocol

Part A :Run Sample Code

  • Open Terminal application (e.g., PuTTY) on your PC.Connect to your device by SSH and enter the folder where put sample code (e.g., /home/root/bundle).
    arduino
  • Install sample code dependency,enter command as following

  • Run sample code

  • device will send message to topic “temp” or that you defined ,as below image.
    arduino_run_python

Part B :Another protocol

  • Click “Connection a device” button
  • You can choose another protocol you would like to use

12_another_protocol

  • SSH to your device , and input command as following.

  • In next Lesson ,we will integrate Power BI to visualize senser data . Lesson 4 Integrate Power BI

Please visit QNAP github for QIoT Suite Lite sample code

QNAP-Github

Related posts

One thought on “Connect Arduino Yun to QNAP NAS-Lesson 3

  1. Stefano

    I followed the tutorial but “python mqtt.py” on Arduino Yun doesn’t work, linino return this error:

    root@arduino:/home/root/bundle# python mqtt.py
    new mqtt protocal
    CLIENT_CERT path :/home/root/bundle/ssl/6420172017-08-29_20-18-19_certificate.pem
    PRIVATE_CERT exists or not :True
    Traceback (most recent call last):
    File “mqtt.py”, line 32, in
    connection.connect(connection_options)
    File “/home/root/bundle/lib/mqtt_connect.py”, line 104, in connect
    self.mqtt_client.tls_set(self.mqtt_options[“ca”], self.mqtt_options[“cert”], self.mqtt_options[“key”])
    File “/usr/lib/python2.7/site-packages/paho/mqtt/client.py”, line 679, in tls_set
    raise ValueError(‘Python 2.7.9 and 3.2 are the minimum supported versions for TLS.’)
    ValueError: Python 2.7.9 and 3.2 are the minimum supported versions for TLS.

    How do I upgrade python or downgrade paho on Arduino? I’m using QIot with TS-253A

    thanks! Stefano

Leave a Reply