Finally got my LYWSD03MMC sensors (square ones with encryption key).
They can be swapped between Celsius/Fahrenheit on the display from the app!
Procedure I followed:
First, you MUST install HACS “Xiaomi passive BLE monitor sensor platform” to be able to read LYWSD03MMC sensor(s).
The default/built-in one will currently not work with this sensor. After installing, reboot your HA!
Second, prep the Stream-app on your iOS device:
Open Stream -> HTTPS Sniffing -> CA Install. Then you will be directed to browser to download a VPN profile.
Go to General -> Profile -> Stream Generated CA… -> Install the VPN profile.
After installing VPN profile:
Open Stream -> HTTPS Sniffing -> hit trust CA in settings.
General -> About -> Certificate Trust Settings -> tick green on Stream Generated CA…
Third, make sure you are logged in to MiHome (ensure it is logged-out of other devices and region chosen is mainland China) and open Stream.
Then go to Stream-app and hit “Sniff now”, and immediately go to MiHome, pull the plastic-tab to activate sensor, and add the LYWSD03MMC sensor.
Follow the wizard. Wait for the app to read Temperature and Humidity. (Optionally you can get the MAC-address here. Under the sensor -> settings (3 dots in upper right corner) -> “About”. This is also where you can swap between displaying Celsius/Fahrenheit.
Go back to Stream-app and click “Stop Sniffing“.
Now in stream-app go to sniff history and search for the keyword “bltbind”.
You will see a file “POST https://api.io.mi.com/app/device/bltbind”
(If you don’t see that file, go back to step 2 to check whether the CA was trusted or not.)
Click on that file -> Request -> “Preview Form” at bottom, then at the top hit -> Format -> Decode -> now you look for: find “bind_key”, “value”:
After finding the bind_key, then add it to your “- platform: mitemp_bt” Configuration.yaml together with the MAC-address.
The MAC-address can be found in MiHome under the sensor and settings (3 dots in upper right corner), and “About” if you did not get it earlier. You can change between Celsius and Fahrenheit for the display here also.
Repeat this step until all sensors are added.
Fourth, when done adding all sensors, power-off HA, then restart it.
Once you HA is fully back online, go to Configuration -> Entities -> search for “mitemp_bt” and you will see the 2 sensors for each thermostat (one for temp, one for humidity). Be patient, it can take time (less than 10 minutes) for HA to detect them.
LYWSD03MMC broadcasts temperature and humidity once about every 10 minutes and battery level once an hour.
If you get impatient, you can look for the from the terminal:
[email protected]:~# bluetoothctl
[bluetooth]# scan on
[CHG] Controller B8:27:EB:07:AA:AA Discovering: yes
[NEW] Device A4:C1:38:AF:BB:BB LYWSD03MMC
[NEW] Device A4:C1:38:42:CC:CC LYWSD03MMC
[NEW] Device A4:C1:38:42:DD:DD LYWSD03MMC
[NEW] Device A4:C1:38:F1:EE:EE LYWSD03MMC
[NEW] Device A4:C1:38:38:FF:FF LYWSD03MMC
[NEW] Device A4:C1:38:4D:11:11 LYWSD03MMC
[bluetooth]# scan off
Added class 1 Bluetooth dongle for better reception:
TRENDnet Low Energy Micro Bluetooth 4.0 Class 1 USB 2.0, TBW-106UB
Distance: up to 100Meters/330 Feet.
Battery indicator will show at the bottom if you click on the sensor.
- platform: mitemp_bt