<?xml version="1.0" encoding="UTF-8"?>

<rss version="2.0"
 xmlns:blogChannel="http://backend.userland.com/blogChannelModule"
>

<channel>
<title><![CDATA[Dobrica Pavlinušić's random unstructured stuff: Xiaomi Mijia Bluetooth Thermometer]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?xiaomi_mijia_bluetooth_thermometer</link>
<description></description>
<pubDate>Fri, 15 Nov 2024 15:57:51 -0000</pubDate>
<webMaster>root@saturn.ffzg.hr</webMaster>
<generator>Socialtext Workspace v2.19.0.2</generator>

<item>
<title><![CDATA[Xiaomi Mijia Bluetooth Thermometer]]></title>
<link>https://saturn.ffzg.hr/rot13/index.cgi?xiaomi_mijia_bluetooth_thermometer</link>
<description><![CDATA[<div>Creator: Dobrica Pavlinušić</div><hr/><div class="wiki">
<div class="nlw_phrase"><table class="wafl_container">
  <tr>
    <td>
      <div class="wafl_box">
        
          <div class="wafl_titlebox">
            <div class="wafl_title">
              
                Contents: [Dobrica Pavlinušić's random unstructured stuff]
              
            </div>
          </div>
          <div class="wafl_items">
            
              <div class="wiki">
<ul>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#info">Dobrica Pavlinušić's random unstructured stuff (info)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] info} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#decode_using_gatttool">Dobrica Pavlinušić's random unstructured stuff (decode using gatttool)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] decode using gatttool} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#open_source_firmware">Dobrica Pavlinušić's random unstructured stuff (open source firmware)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] open source firmware} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#simple_shell_to_send_reading_to_influx">Dobrica Pavlinušić's random unstructured stuff (simple shell to send reading to influx)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] simple shell to send reading to influx} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#home_assistant">Dobrica Pavlinušić's random unstructured stuff (Home Assistant)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] Home Assistant} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#flashing_serial_port">Dobrica Pavlinušić's random unstructured stuff (flashing serial port)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] flashing serial port} --></span></li>
<li><span class="nlw_phrase"><a title="section link" href="https://saturn.ffzg.hr/rot13/index.cgi?dobrica_pavlinu%C5%A1i%C4%87_s_random_unstructured_stuff#reed_switch">Dobrica Pavlinušić's random unstructured stuff (reed switch)</a><!-- wiki: {link: [Dobrica Pavlinušić's random unstructured stuff] reed switch} --></span></li>
</ul>
</div>

            
            
          </div>
        
      </div>
    </td>
  </tr>
</table>
<!-- wiki: {toc: }
--></div><br /><br /><h1 id="info">info</h1>
<p>
<a target="_blank" title="(external link)" href="https://hackaday.com/2020/12/08/exploring-custom-firmware-on-xiaomi-thermometers/">https://hackaday.com/2020/12/08/exploring-custom-firmware-on-xiaomi-thermometers/</a></p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/atc1441/ATC_MiThermometer">https://github.com/atc1441/ATC_MiThermometer</a></p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/pvvx/ATC_MiThermometer">https://github.com/pvvx/ATC_MiThermometer</a></p>
<p>
&nbsp;Xiaomi Smart LCD Screen Digital Thermometer 2 Mijia Bluetooth Temperature Humidity Sensor Moisture Meter Mijia App</p>
<p>
<a target="_blank" title="(external link)" href="https://www.aliexpress.com/item/1005002401046796.html">https://www.aliexpress.com/item/1005002401046796.html</a></p>
<p>
LYWSD03MMC</p>
<h1 id="decode_using_gatttool">decode using gatttool</h1>
<p>
<a target="_blank" title="(external link)" href="https://ndimension.design.blog/2021/12/16/reading-data-from-xiaomi-mi-temperature-and-humidity-monitor-2-lywsd03mmc/">https://ndimension.design.blog/2021/12/16/reading-data-from-xiaomi-mi-temperature-and-humidity-monitor-2-lywsd03mmc/</a></p>
<pre>
root@rpi2:/home/pi# sudo hcitool lescan
LE Scan ...
A4:C1:38:D8:3F:9C ATC_D83F9C

</pre>
<br /><h1 id="open_source_firmware">open source firmware</h1>
<p>
<a target="_blank" title="(external link)" href="https://github.com/bentolor/xiaomi-mijia-bluetooth-firmware">https://github.com/bentolor/xiaomi-mijia-bluetooth-firmware</a></p>
<h1 id="simple_shell_to_send_reading_to_influx">simple shell to send reading to influx</h1>
<p>
<a target="_blank" title="(external link)" href="https://github.com/dpavlin/air-quality/blob/master/ble-mijia.sh">https://github.com/dpavlin/air-quality/blob/master/ble-mijia.sh</a></p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/dpavlin/air-quality/blob/master/system/ble-mijia%40.service">https://github.com/dpavlin/air-quality/blob/master/system/ble-mijia%40.service</a></p>
<p>
<a target="_blank" title="(external link)" href="https://www.youtube.com/watch?v=NXKzFG61lNs">https://www.youtube.com/watch?v=NXKzFG61lNs</a></p>
<h1 id="home_assistant"><a href="https://saturn.ffzg.hr/rot13/index.cgi?home_assistant" title="(32 months)  TV power button .pre show_name true show_icon true type button tap_action action call-service servi...">Home Assistant</a></h1>
<p>
connected to home assistant using <a target="_blank" title="(external link)" href="https://esphome.github.io/bluetooth-proxies/">https://esphome.github.io/bluetooth-proxies/</a></p>
<p>
get bindkey using <a target="_blank" title="(external link)" href="https://atc1441.github.io/TelinkFlasher.html">https://atc1441.github.io/TelinkFlasher.html</a></p>
<p>
<a target="_blank" title="(external link)" href="https://esphome.io/components/sensor/xiaomi_ble.html?highlight=xiaomi_ble#obtaining-the-bindkey">https://esphome.io/components/sensor/xiaomi_ble.html?highlight=xiaomi_ble#obtaining-the-bindkey</a></p>
<pre>
[core-ssh ~]$ tail -18 config/.storage/core.config_entries
      {
        &quot;entry_id&quot;: &quot;574243c45c4485523ec174e18cfcf1ad&quot;,
        &quot;version&quot;: 1,
        &quot;domain&quot;: &quot;xiaomi_ble&quot;,
        &quot;title&quot;: &quot;Temperature/Humidity Sensor DC63 (LYWSD03MMC)&quot;,
        &quot;data&quot;: {
          &quot;bindkey&quot;: &quot;a6da0c1d99200efe9c9afb8fd9a534ef&quot;
        },
        &quot;options&quot;: {},
        &quot;pref_disable_new_entities&quot;: false,
        &quot;pref_disable_polling&quot;: false,
        &quot;source&quot;: &quot;bluetooth&quot;,
        &quot;unique_id&quot;: &quot;A4:C1:38:90:DC:63&quot;,
        &quot;disabled_by&quot;: null
      }
    ]
  }
</pre>
<br /><p>
flash new firmware to sensor <a target="_blank" title="(external link)" href="https://github.com/pvvx/ATC_MiThermometer">https://github.com/pvvx/ATC_MiThermometer</a></p>
<p>
open in chrome on android to flash firmware,<br />
change announcement to BTHome,<br />
set time,<br />
disconnect to start sending data to home assistant</p>
<h1 id="flashing_serial_port">flashing serial port</h1>
<p>
pinout <img alt="https://github.com/atc1441/ATC_MiThermometer/blob/master/Mi_SWS_Connection.jpg" src="https://github.com/atc1441/ATC_MiThermometer/blob/master/Mi_SWS_Connection.jpg" border="0" /></p>
<p>
DTR - 3V3 (so that reset works)<br />
GND - GND<br />
TX - P14 - SWS</p>
<p>
<a target="_blank" title="(external link)" href="https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html">https://pvvx.github.io/ATC_MiThermometer/USBCOMFlashTx.html</a></p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/pvvx/TlsrComSwireWriter">https://github.com/pvvx/TlsrComSwireWriter</a></p>
<p>
<a target="_blank" title="(external link)" href="https://github.com/pvvx/ATC_MiThermometer?tab=readme-ov-file#the-usb-com-adapter-writes-the-firmware-in-explorer-web-version">https://github.com/pvvx/ATC_MiThermometer?tab=readme-ov-file#the-usb-com-adapter-writes-the-firmware-in-explorer-web-version</a></p>
<h1 id="reed_switch">reed switch</h1>
<p>
<a target="_blank" title="(external link)" href="https://github.com/pvvx/ATC_MiThermometer?tab=readme-ov-file#reed-switch-or-button-functions">https://github.com/pvvx/ATC_MiThermometer?tab=readme-ov-file#reed-switch-or-button-functions</a></p>
<p>
It is possible to solder a reed switch on the LYWSD03MMC board to the pins marked &quot;P8&quot; (GPIO PA6) and GND.</p>
</div>
]]></description>
<author>Dobrica Pavlinu&#x161;i&#x107;</author>
<category></category>
<guid isPermaLink="true">https://saturn.ffzg.hr/rot13/index.cgi?xiaomi_mijia_bluetooth_thermometer</guid>
<pubDate>Fri, 15 Nov 2024 15:57:51 -0000</pubDate>
</item>
</channel>
</rss>