{"id":187,"date":"2021-04-18T09:38:11","date_gmt":"2021-04-18T08:38:11","guid":{"rendered":"https:\/\/www.bolukan.nl\/?p=187"},"modified":"2021-04-18T09:38:11","modified_gmt":"2021-04-18T08:38:11","slug":"xiaomi-mijia-bluetooth-thermometer-en-hygrometer-setup","status":"publish","type":"post","link":"https:\/\/www.bolukan.nl\/?p=187","title":{"rendered":"Xiaomi Mijia Bluetooth Thermometer en Hygrometer &#8211; Setup"},"content":{"rendered":"\n<p>Purpose is to log the temperature and moisture of multiple rooms in our home to get insights into the performance and behaviour of systems and the residents. How quickly can a room get up to temperature, how humid are rooms, what conditions do residents find comfortable, etc.<\/p>\n\n\n\n<p>This article will include how to flash the Xiaomi Mijia&#8217;s &#8211; model LYWSD03MMC &#8211; with custom firmware, how to forward the bluetooth messages to mqtt, and how a Node-red workflow processes the data to a database.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Flash custom firmware<\/h3>\n\n\n\n<p>Aaron Christophel created custom firmware, posted a <a rel=\"noreferrer noopener\" href=\"https:\/\/youtu.be\/NXKzFG61lNs\" target=\"_blank\">video<\/a>, put his code on github <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/atc1441\/ATC_MiThermometer\" target=\"_blank\">atc1441\/ATC_MiThermometer<\/a> and supplied a <a rel=\"noreferrer noopener\" href=\"https:\/\/atc1441.github.io\/TelinkFlasher.html\" target=\"_blank\">webbased firmware flasher<\/a> based on <a rel=\"noreferrer noopener\" href=\"https:\/\/developer.mozilla.org\/en-US\/docs\/Web\/API\/Web_Bluetooth_API\" target=\"_blank\">Web Bluetooth<\/a>, which not all browsers support. So download the <a rel=\"noreferrer noopener\" href=\"https:\/\/github.com\/atc1441\/ATC_MiThermometer\/releases\" target=\"_blank\">latest release of the custom firmware<\/a> to a computer\/device with Bluetooth and open the flasher in a supported browser. I used a recent laptop and Chrome. Choose &#8220;Connect&#8221;, select the device, choose &#8220;Do Activation&#8221;, select the firmware file, and hit Start flashing. That&#8217;s all.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Forward bluetooth messages<\/h3>\n\n\n\n<p><a rel=\"noreferrer noopener\" href=\"https:\/\/docs.openmqttgateway.com\/\" target=\"_blank\">OpenMQTTGateway<\/a> installed on an ESP32 forwards bluetooth broadcasts to MQTT. It supports <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.openmqttgateway.com\/prerequisites\/devices.html\" target=\"_blank\">devices<\/a> like the XIAOMI Mi Jia 2 with custom firmware and can be flashed on a ESP32 <a rel=\"noreferrer noopener\" href=\"https:\/\/docs.openmqttgateway.com\/prerequisites\/board.html\" target=\"_blank\">board<\/a>.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Node-Red processing<\/h3>\n\n\n\n<p><em>Will be added<\/em><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Purpose is to log the temperature and moisture of multiple rooms in our home to get insights into the performance and behaviour of systems and the residents. How quickly can a room get up to temperature, how humid are rooms, what conditions do residents find comfortable, etc. This article will include how to flash the [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-187","post","type-post","status-publish","format-standard","hentry","category-esp8266"],"_links":{"self":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/187","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=187"}],"version-history":[{"count":5,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions"}],"predecessor-version":[{"id":192,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=\/wp\/v2\/posts\/187\/revisions\/192"}],"wp:attachment":[{"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=187"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=187"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.bolukan.nl\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=187"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}