{"id":3029,"date":"2021-09-26T20:48:27","date_gmt":"2021-09-26T20:48:27","guid":{"rendered":"https:\/\/davra.com\/?p=3029"},"modified":"2021-10-04T13:29:17","modified_gmt":"2021-10-04T13:29:17","slug":"zerynth-device-setup","status":"publish","type":"post","link":"https:\/\/davra.com\/zerynth-device-setup\/","title":{"rendered":"Zerynth Device Setup"},"content":{"rendered":"
In this demo, we will publish data using the ZM1-EVA Evaluation board, create and enable a Davra integration and send the data to a Davra dashboard.<\/p>\n
In this tutorial, we will be using:<\/p>\n
1. Zerynth SDK<\/a> – this includes VSCode with the VSCode Zerynth extension<\/a>, which is our default development environment. Download and install Visual Studio Code: https:\/\/code.visualstudio.com<\/a><\/p>\n Download the Zerynth SDK for your computing platform: https:\/\/www.zerynth.com\/zsdk<\/a><\/p>\n Connect the sensor to the EVAL BOARD like in the following picture:<\/p>\n <\/p>\n <\/p>\n Connect the ZM1-EVA to the PC with a micro-usb cable then clone this GitHub repository<\/a> into a well-known directory. (we will need it later) Install and open the Zerynth SDK, press Ctrl+Shift+P<\/em> and search for Zerynth: Login<\/em>; then login to the Zerynth Cloud or create a new account if you don’t have one.<\/p>\n To open the project, click on File -> Open<\/em> from the top menu and select the path of the downloaded GitHub project<\/p>\n The project will open and a picture like the one below should appear:<\/p>\n <\/p>\n <\/p>\n To be sure that the ZM1-EVA device support is enabled, press Ctrl+Shift+P<\/em> and search for Preferences Open User Settings<\/em>. This will open a dialog with two tabs (User<\/strong> and Workspace<\/strong>). Click on the Extensi<\/strong>on<\/strong> menu item under the “User” tab, you will see a new menu. Click on the “Zerynth” item. Ensure that the ZM1-EVA board is enabled.<\/p>\n <\/p>\n <\/p>\n You only need to provision your device once<\/span> for the lifetime of the device.<\/p>\n Just click Provisioning<\/em> on the Zerynth Control Panel<\/em>, you will be asked to create a cloud device, give it a name like my-iot-davra-device<\/em> and accept the confirmation dialog and wait for a little.<\/p>\n NOTE: don\u2019t worry if you get several \u201cfatal error\u201d messages, it\u2019s ok the system is auto-calibrating the serial connection speed. At the end of the process you should see something like this in the VSCode console.<\/p>\n <\/p>\n After provisioning, in the control panel, You’ll find the cloud device is now assigned an ID.<\/p>\n <\/p>\n Open the main.py file in the project folder, and edit the rows 49<\/strong> and 50<\/strong> typing your WiFi SSID and password.<\/p>\n At this point, you are ready to click on the Run<\/strong> button! Your device will be automatically configured and it will start publishing data to the Zerynth Cloud. The last step to receive the data published from the device to your Davra dashboard is to create a Davra Integration<\/strong>.<\/p>\n 1. Open the Zerynth Cloud<\/a> and select the workspace containing the device you configured before (probably the “default” one).<\/p>\n 2. Click on the Integrations<\/strong> button from the navbar on the left.<\/p>\n 3. Click on the + New<\/strong> button on the top right, then select Davra<\/strong> from the dialog.<\/p>\n 4. Davra integration dialog.<\/p>\n <\/p>\n 5. Choose a name for your integration, check the URL, type your personal Davra token and that’s all! Your data will be automatically forwarded to your Davra dashboard.<\/p>\n
\n2. Zerynth Device Manager (ZDM)<\/a> – it helps you register, organize, monitor, and remotely manage Zerynth IoT devices at scale.
\n3. ZM1-EVA – Evaluation Board<\/a>
\n4. Your tenant on the DAVRA Platform here<\/strong> http:\/\/italy.davra.picode.it<\/a><\/p>\n1. Import the Davra project<\/strong><\/h2>\n
\nThis repo contains a Zerynth project that configures the ZM1-EVA Evaluation board for sending humidity and temperature readings from an attached DHT11 sensor to the Zerynth Cloud.<\/p>\n2. Enable the device and configure it to send data<\/strong><\/h2>\n
Provision and configure the Device<\/strong><\/h2>\n
<\/h2>\n
Run the project<\/strong><\/h2>\n
\nIf you open the device page from the Zerynth Cloud<\/a>, you will see real-time data sent from your device!<\/p>\nCreate Davra integration<\/h2>\n