<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Chatuporn Rungcharoesrichai on Medium]]></title>
        <description><![CDATA[Stories by Chatuporn Rungcharoesrichai on Medium]]></description>
        <link>https://medium.com/@chatupornrungcharoesrichai?source=rss-e3d233c48b------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*kDlS_m29JehVvbzuRu7Z-Q.jpeg</url>
            <title>Stories by Chatuporn Rungcharoesrichai on Medium</title>
            <link>https://medium.com/@chatupornrungcharoesrichai?source=rss-e3d233c48b------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 03 Dec 2026 15:25:34 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@chatupornrungcharoesrichai/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[How to configure Thingsboard to receiving sensor data.]]></title>
            <link>https://medium.com/@chatupornrungcharoesrichai/how-to-configure-thingsboard-to-receiving-sensor-data-20afc8a40bdb?source=rss-e3d233c48b------2</link>
            <guid isPermaLink="false">https://medium.com/p/20afc8a40bdb</guid>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Chatuporn Rungcharoesrichai]]></dc:creator>
            <pubDate>Mon, 09 Dec 2019 16:50:56 GMT</pubDate>
            <atom:updated>2019-12-09T17:11:51.356Z</atom:updated>
            <content:encoded><![CDATA[<p>Thingsboard — IOT Dashboard</p><p>Previously from this post <a href="https://medium.com/@chatupornrungcharoesrichai/use-esp32-to-collect-temperature-and-humidity-from-xiaomi-sensor-via-bluetooth-73362ac74cf6">https://medium.com/@chatupornrungcharoesrichai/use-esp32-to-collect-temperature-and-humidity-from-xiaomi-sensor-via-bluetooth-73362ac74cf6</a></p><p>I will show how to configure Thingsboard. If you haven’t installed Thingsboard yet. You can register to use free demo thingsboard at <a href="https://demo.thingsboard.io/">https://demo.thingsboard.io</a></p><ol><li>Login to Thingsboard as tenant admin.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/586/1*0SkJlSUXOyP-vnMipE7ulg.png" /></figure><p>2. Create new device by choosing Devices → + at the right bottom of screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6aEwPxjFR5tF1OnplQnJsg.png" /></figure><p>3. Add device</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/288/1*szqvnjm1ARidzDoqhbj_Wg.png" /></figure><p>4. Click “Copy Access Token” to copy Token. The token is the “username:” that we used to configure on the MQTT section in .YAML file previously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/722/1*tmBQ6N1Ph8ICGq_Z23W8kQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/438/1*jaPAp2F4GAbUeFExVvuBog.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>5. After ESP32 device sent data sensor to Thingsboard, you will see data in “LAST TELEMETRY”. If you wouldn’t see any data here, it mean that the data hadn’t come or incorrect format.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/716/1*nMi7bB_IZdPZ1TKtc7R-kw.png" /></figure><p>6. Create new dashboard by choosing DASHBOARDS → “+” → Create a new dashboard and then input your dashboard name (Title).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zGrJK7SzdkXWsbG19_pt_w.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/260/1*DsXixQGYtwxH__MjzUpGcQ.png" /></figure><p>7. Click on your Dashboard and click edit at the right bottom of the screen. And then click “Entity Aliases” at the top centre of the screen.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6vNcQHYXkaIPuG4FxLf3fQ.png" /></figure><p>7.1 Click “ADD ALIAS” to add devices into the dashboard. Alias name it mean alias name of your devices, you can use the same name as your device. and then “Save”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/702/1*NVLBiqYs5yz9oXopVRj0IA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/599/1*UOrwXBNBB2HHgaJeYGtaMA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/699/1*y_G5NfgzDwVROuusbIY5rA.png" /></figure><p>7.2 Add new widget.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*m1ETWdx5vui4PY6ERz6hsw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/727/1*YDaXHNfU8Gnvy1MTuIeLjQ.png" /></figure><p>select “Chart” → “Time Series”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/718/1*DydvmEhQnWw2QaEqA_KgXA.png" /></figure><p>Then configure “Data Source” for the Xioami Sensor#1 (t01 and h01).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/826/1*47xEHtPoFSb4jwMQHbXrnA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gTFvPFZWDgNyCSFLu99OlQ.png" /></figure><p>7.3 Configure for Xioami Sensor#2 (t02 and h02). Just by right click on the 1st chart then choose “Copy” and “Paste”. And then edit the “Data Source”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/762/1*DD2BnourW_GRpI8_z3ZeRg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/834/1*vFBX-0sb3rC9LWxOUlgrIQ.png" /><figcaption>Don’t forget to change your Data Source properly.</figcaption></figure><p>Now you get 2 widgets/charts for 2 Sensors.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*T83dBkg1MqN-_ae_i5JMyQ.png" /></figure><p>7.4 I want a table of data also then I choose a widget card “Time series”.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/719/1*45zc9AihWhO63n2Zbn8zHA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*Qa0PhGpAL14Y7VGKcgGG4Q.png" /></figure><p>Now I got 2 graph and 1 table. and then don’t forget to click “Apply” at the right bottom. ** Unless you will lost your widgets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yzeQXQIUYRYy3Msw6mJW9A.png" /></figure><p>8. Successfully now you finished to create your Dashboard.</p><p>9. Finally if you want to share your Dashboard you need to click “Public” for your Device and Dashboard. You will get Link.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*kmBzru5ENb2QuRCeysogwQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/336/1*Lrq-UbUVIFCZ0igxyK8ryw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*j33OlrpkA83KWOkKuKM7lQ.png" /></figure><p>Hopefully it’s helpful. Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=20afc8a40bdb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Use ESP32 to collect Temperature and Humidity from Xiaomi Sensor via Bluetooth]]></title>
            <link>https://medium.com/@chatupornrungcharoesrichai/use-esp32-to-collect-temperature-and-humidity-from-xiaomi-sensor-via-bluetooth-73362ac74cf6?source=rss-e3d233c48b------2</link>
            <guid isPermaLink="false">https://medium.com/p/73362ac74cf6</guid>
            <category><![CDATA[iot]]></category>
            <dc:creator><![CDATA[Chatuporn Rungcharoesrichai]]></dc:creator>
            <pubDate>Mon, 09 Dec 2019 14:50:00 GMT</pubDate>
            <atom:updated>2019-12-09T17:16:01.736Z</atom:updated>
            <content:encoded><![CDATA[<p>Previously I did try to create a temperature &amp; humidity sensor in ESP32 together but I found that there are several problems I need to handle e.g. Cable Wiring, Battery of ESP32, Covering box, … and so on. These problems have been gone when I found this Xiaomi Devices.</p><p>Xioami Clock with Temperature and Humidity Sensor E-Ink Bluetooth devices</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/439/1*-6N9VVGx-HMaMCc4-e4Bnw.jpeg" /><figcaption>Xioami LYSWD02</figcaption></figure><p>You can buy it from <a href="https://www.lazada.co.th/products/xiaomi-mijia-bluetooth-temperature-humidity-sensor-e-link-lcd-screen-digital-thermometer-moisture-meter-smart-linkage-mi-app-i314984019-s578890697.html?spm=a2o4m.searchlist.list.5.676c2277fij9vY&amp;search=1">https://www.lazada.co.th/products/xiaomi-mijia-bluetooth-temperature-humidity-sensor-e-link-lcd-screen-digital-thermometer-moisture-meter-smart-linkage-mi-app-i314984019-s578890697.html?spm=a2o4m.searchlist.list.5.676c2277fij9vY&amp;search=1</a></p><p>I use ESPHOME the tool for programming ESP32 device to collect the sensor data from Xioami sensor devices (model LYWSD02) via bluetooth. This tool is very helpful it reduce time to coding with C or Python language and also reduce time to find the right bluetooth library to use.</p><p>My architecture like this, Xioami Sensor — &gt; ESP32 → Thingsboard</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*cfiE_amlSWe8NMcbjQyF7Q.png" /><figcaption>Overview Architecture</figcaption></figure><p>I use ESPHOME on Linux (it also support in Docker) so just install ESPHOME as below command.</p><p># pip install esphome</p><p>then you create your configuration file (.YAML) for control your ESP32 device.</p><p># vi esphome02.yaml</p><p>The First Part is basic configuration about node information e.g. nodename, type of ESP32 board, user&amp;password and Wifi. I need to remove “Home Assistant API” due to document said that if I use MQTT, I need to disable Home Assistant API. Otherwise the ESP32 node will restart every 5 mintues.</p><figure><img alt="Basic Node Section" src="https://cdn-images-1.medium.com/max/753/1*Dq8XOkMFsyM_SISS41WTgQ.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>The Second Part is the MQTT server, I send sensor data to Thingsboards to monitor and nicely display. You need to generate your username in thingsboard web also and then configure it here.</p><figure><img alt="MQTT Section" src="https://cdn-images-1.medium.com/max/723/1*7IjZcZxtp48aThEZE9Ha0g.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>The Third Part is about BLE (Bluetooth Low Energy). Due to you need to know the MAC Address of your Xioami sensor Device. You have 2 ways to find it at least. 1. You see in MI Home App (Application of Xioami itself) 2. You can use ESP32 to scan it. At here I will mention about no.2 only.</p><p>Put this line for Enable BLE and also it will scan bluetooth devices automatically.</p><figure><img alt="esp32_ble_tracker Section" src="https://cdn-images-1.medium.com/max/724/1*1dVvVwXHr9LPbql92YtXaw.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>Then save the file, connect your ESP32 device to your linux by USB. And then run command “esphome &lt;your .YAML file&gt; compile” for compile code and run “esphome &lt;your .YAML file&gt; upload”. Moreover you can use “esphome &lt;.YAML file&gt; run” instead to compile, upload and monitor logs in single command.</p><figure><img alt="esphome compile (1)" src="https://cdn-images-1.medium.com/max/752/1*XQfclefC6aQLFloRIZ_uvQ.png" /><figcaption>Linux console</figcaption></figure><figure><img alt="esphome compile (2)" src="https://cdn-images-1.medium.com/max/753/1*Nx_atdPk1FPbv9xOdg2qkQ.png" /><figcaption>Linux console</figcaption></figure><p>For upload, you can choose upload via USB or Wifi. But at the first time you need to choose USB only. Because for Wifi uploading your ESP32 need to be coded for partitioning the memory, enable Wifi and supporting OTA.</p><figure><img alt="esphome upload (1)" src="https://cdn-images-1.medium.com/max/753/1*eBmEVUO7_FU_LpL0cqUXlg.png" /><figcaption>Linux console</figcaption></figure><figure><img alt="esphome upload (2)" src="https://cdn-images-1.medium.com/max/755/1*ye-mZHC4Z8Xqw2C1YLbQ0w.png" /><figcaption>Linux console</figcaption></figure><figure><img alt="esphome upload (3)" src="https://cdn-images-1.medium.com/max/753/1*WdqzqsUjQkLssJqkWT78uQ.png" /><figcaption>Linux console</figcaption></figure><figure><img alt="esphome upload (4)" src="https://cdn-images-1.medium.com/max/752/1*VRmRCDX37x00HlIegGML_g.png" /><figcaption>Linux console</figcaption></figure><p>Then Monitor ESP32 Logs by using “esphome &lt;.YAML file&gt; logs”. You can see MAC address in logs. For my case, I have 2 Xioami Sensor Devices.</p><figure><img alt="esphome logs" src="https://cdn-images-1.medium.com/max/746/1*ur73uf5b7SvmnQqpUsGBNQ.png" /><figcaption>Linux console</figcaption></figure><p>The Fourth Part, configure the sensor devices MAC Address. However you still need the line “esp32_ble_tracker” for enable BLE, although you won’t want to know its address anymore.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/753/1*31m2YCJ2iMMJ1jkK6gWGSg.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>The Fifth Part, to configure how often you send sensor data to MQTT server (Thingsboard). For my case, every 10 seconds send Temperature &amp; Humidity from Xioami Sensor#1 (t0, h01) and from Xioami Sensor#2 (t02, h02).</p><figure><img alt="time Section" src="https://cdn-images-1.medium.com/max/748/1*VR2wJulo-7gn2vLGu4AMPw.png" /><figcaption>File: esphome02.yaml</figcaption></figure><p>Then you compile and upload code into ESP32. Finally you will see the data come to Thingsboard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*7OGcK805PpOD8T9SJWE0cw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uBpzWWyUsEfmVjnSHvAunQ.png" /></figure><p>You can see how to configure Thingsboard for receiving sensor data to display in my next post.</p><p><a href="https://medium.com/@chatupornrungcharoesrichai/how-to-configure-thingsboard-to-receiving-sensor-data-20afc8a40bdb">https://medium.com/@chatupornrungcharoesrichai/how-to-configure-thingsboard-to-receiving-sensor-data-20afc8a40bdb</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=73362ac74cf6" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>