No video

ESP32 gets data from Xiaomi Thermometers using BLE

  Рет қаралды 12,930

Volos Projects

Volos Projects

Күн бұрын

BLE, or Bluetooth Low Energy protocol, is widely used today for communication among various devices such as phones, smartwatches, smart home sensors, and home devices. The ESP32 also supports BLE, and in this video, I will demonstrate how your ESP board can communicate with Xiaomi Mijia 2 sensors. These popular sensors are affordable and accurate, and you don't need to worry about the battery.
Here is my code folder:github.com/Vol...
DEVICES:
M5StickC Plus2: shop.m5stack.c...
TTGO T-Display: www.lilygo.cc/...
☕️ Support me on:
KO-FI ko-fi.com/volo...
PATREON: / volosprojects
THANK YOU!

Пікірлер: 116
@Meowxhehe
@Meowxhehe 7 ай бұрын
All the video's you make are so unique and educative. Your video's have improved quite a lot which is truly amazing. Keep the good work up man!
@VolosProjects
@VolosProjects 7 ай бұрын
thank you :)
@toddbu-WK7L
@toddbu-WK7L 7 ай бұрын
I always watch your entire video. Otherwise I don’t know how you plan to get rich this week. 🤣 I really like that you’re putting yourself on camera. I really enjoy seeing the face behind the channel.
@VolosProjects
@VolosProjects 7 ай бұрын
I appreciate that! hahah, nothing works my friend, still poor :)
@Link-channel
@Link-channel 7 ай бұрын
This video format rocks! 🥇 You're improving a lot! 👍
@VolosProjects
@VolosProjects 7 ай бұрын
Glad you think so!Tnx :)
@TekGeekDad
@TekGeekDad 7 ай бұрын
Always watch your whole video! And often am rewatching. The most beneficial are the ones where you go through the whole set up as many of these projects are sensitive to the steps in the setup. Especially the ttgo t-display s3 I have found. If you dont do the right steps with the right libraries and versions there are major issues. Fighting some right now with the display not showing or not able to connect via usb. Bought you coffee and will buy you some more. Appreciate all the help and example. Playing with the t-display long right now and definitely having challenges.
@VolosProjects
@VolosProjects 7 ай бұрын
Tnx man, can i help with problems you have now, what board you are fighting with now?
@VolosProjects
@VolosProjects 7 ай бұрын
oh, t-display long. Did you watch my video about that board?
@arlo4051
@arlo4051 7 ай бұрын
I found bluetooth to be a lot of effort with little reward using it on an arduino and never really attempted it with the ESP. The ESP NOW does look promising though . Thanks for showing what is possible though, best to family.
@aburfitt
@aburfitt 2 ай бұрын
I watched the whole video. You do Great job. Thanks for Sharing
@chrysophlax2007
@chrysophlax2007 7 ай бұрын
Thank you Volos. It was a great video.
@VolosProjects
@VolosProjects 7 ай бұрын
Thank you
@thehappycoder3760
@thehappycoder3760 7 ай бұрын
Thanks, I did watch it right through, there seems to be a bewildering number of ESP32s. I want to explore Bluetooth but it does seem to be a bit challenging, so thank you for this video tutorial it gives me an idea where to start with something that works.
@osmanbulut6120
@osmanbulut6120 5 ай бұрын
First of all, thank you for your effort. The part I do not understand is how to obtain the service and characteristic codes.
@VolosProjects
@VolosProjects 5 ай бұрын
Thank you, i found service in some existing code, you can use phone app to check services of specific device, than you can read raw data and try to get something useful from it.
@AerialWaviator
@AerialWaviator 7 ай бұрын
A handy tip for telling multiple BLE devices apart is to look at the RSSI value (when dis. It will vary with the square of distance, so has larger change in value when near, and less resolution further away. Using RSSI value could be used to display the closest device(s) and not display data from further away devices, or indicate location such as which device/room is nearest.
@sandrarocha2436
@sandrarocha2436 4 ай бұрын
Woow.. I started to follow you with the TTGO Board when we made a system to monitor and record the temperature of vaccines. And this video as the others is amazing. I would like to have one of this BLE Xiaomi thermometers, but I think we could use the monitor we did 3 years ago. Something that I miss from the TTGO in the ESP32-S3 is the DAC pin. By the way I watched you wholes videos and I love them.
@mohammadrostamvand4315
@mohammadrostamvand4315 7 ай бұрын
Your Video has been improved a lot, it is really appreciated. I watched the whole video.
@tgoregon
@tgoregon 7 ай бұрын
All 11:38 were quite good. Great topic, fantastic video. I’ve been wanting to build a couple good esp based wireless outdoor temperature sensors to put about 30m from house in shady locations. Power and range are both challenging. Perhaps I should look into esp-now.
@JohnTarbox
@JohnTarbox 6 ай бұрын
Great project presented very well. I thoroughly enjoyed it.
@VolosProjects
@VolosProjects 6 ай бұрын
Glad you enjoyed it!
@TBoy58_405
@TBoy58_405 7 ай бұрын
Hi again. I have your code working on a T-Display S3. I only have one Xiaomi Sensor, but I’m getting readings on the display. I’m assuming you’re not getting any serial output with the S3. This maybe because of the ide settings in tools. It needs to be in CDC mode for the C3 and S3 boards. Set USB CDC On Boot “Enabled”, USB Mode: “Hardware CDC and JTAG”, Upload Mode: “UART0 / Hardware CDC”. That should do it. Let me know if it works for you. Take it easy 👍🏾🤓
@VolosProjects
@VolosProjects 7 ай бұрын
Hello Pete, thank yoi, yes it seem my cide work when there is only one sensor, more people reported me that also. So probably fix is in few lines of code. Thank you for your support an coffee.
@cbartley100
@cbartley100 6 ай бұрын
Code seems to work OK on ESP32-S3 with up to 3 x thermometers. for me - the 4th one is ignored - even though it shows up on nRF Connect OK. but not seen in BLESerial or BLEttgo, can only see a max of 3 units
@TBoy58_405
@TBoy58_405 6 ай бұрын
I’ve got four thermometers working with the T-Display S3, even with them in different rooms. The connections are unstable though, so sometimes two or three will connect, but sometimes four. It’s the same with the thermometers next to the display. It’s great when it’s working properly. More investigation needed 👍🏾🤓
@Jindraxx20
@Jindraxx20 7 ай бұрын
Thank you for an other great video yet again !
@altitude1039
@altitude1039 7 ай бұрын
This is so kewl! Now I want to get some BLE sensors to try it out. I'm wondering if I can do this with my CanAirIO devices as well. Thanks for sharing 😊
@amtsgedicht
@amtsgedicht 7 ай бұрын
thank you! I'm always enjoying your videos! do you take lightning payments/tips?
@reinholdu9909
@reinholdu9909 7 ай бұрын
Yeah 1st time I have parts at hand ... *(^_^)* ...so pls continue to use TTGO _Thanks for the 6 days & vid_
@pi_
@pi_ 7 ай бұрын
I watched and enjoyed every second of this video, very cool project
@VolosProjects
@VolosProjects 7 ай бұрын
thank you!
@temyraverdana6421
@temyraverdana6421 7 ай бұрын
Wow, an amazing lesson very useful. Thanks a lot
@VolosProjects
@VolosProjects 7 ай бұрын
Glad to hear that!tnx
@csabalenart7699
@csabalenart7699 7 ай бұрын
Great video. I'm really happy to find your channel and I'm getting a lot of UI inspiration from your videos. (I watched the whole video...twice). But there is one thing I'm not really sure why you're not using in your projects which is the flash in the ESP32. I mean you could easily save these settings (e.g. the BLE ID - device name pairs in your current example) to files on esp device instead of hardcoding them to the code. I think there can be a lot of potential (in addition to the config files) in using flash memory. For example in my current project I'm using it to store temperature/humidity/pressure data from a BME280 sensor and it would be super to show them in a nice chart/graph on a small screen like TTGO (I'm using Heltec ESP32 LoRa for this, that is an amoled, but the base idea I think will be the same), but of course it could be challenging because there are much more data stored in flash than I could display, so maybe just display a smaller portion or maybe scale down and get an avarage or something. I did not figure it out yet, because I'm concentrating on finishing the project and then I can work on the display part. Anyway I couldn't find good tutorial in charts/graphs with ESP32 and I think it would be super interesting to see your solution/idea to deal with a lot of data which obviously can't fit in memory at once nor to the display.
@nikthefix8918
@nikthefix8918 7 ай бұрын
Word of warning to those wishing to write non-volatile data to the flash programmatically: The relatively poor write endurance of flash could lead to problems if you accidentally code a write / erase loop which flashes tonnes of data continually. 10k - 100k cycles is quoted. Even with wear-levelling you could render a partition useless after just a few hours or even minutes. For development I prefer to use external FRAM which is fast and indestructible - 10 trillion (10^13) cycles - just so I can afford to make mistakes when experimenting. I also watched the whole video twice. :)
@VolosProjects
@VolosProjects 7 ай бұрын
thank you, both of you , for watching video twice... reason why i never use flash is simple, i still need to learn alot. Now i have new task to play with. Thank you! I will keep in mind what Nick sayed.
@MPElectronique
@MPElectronique 7 ай бұрын
Hi. Where did you find : ebe0ccb0-7a0a-4b0c-8a1a-6ff2997da3a6 ? Thanks. Marc.
@SteveT_IoW_UK
@SteveT_IoW_UK 5 ай бұрын
As always, Excellent video & Code. I learnt how to use the Lilygo t-Display S3 and boosted Lilygo sales because of you. I've just spent weeks trying to get a T-Display S3 to use a BLE client (nimble and bluedroid libs) to display data from a JK BMS..works sometimes but highly unreliable and crashes. Did you conclude or have ideas why it doesnt work??. Im still working on it and just ordered and ESP32 Wroom to try on that. Im wondering if its problems with BLE on S3, or Display lib conflict? Ram usage? ..I fear im operating well beyond my intelligence level ! Cheers Steve
@georgzimmer4627
@georgzimmer4627 6 ай бұрын
Whole video! loved it
@gyorgybalassy
@gyorgybalassy 6 ай бұрын
Great project, thanks for sharing it! Normally these sensors connect to a Xiaomi Smart Home Hub via BLE, so they can be remotely monitored with the Mi Home phone app. Can that work side-by-side with your solution, or BLE allows them to connect to only one other device, either the Hub or the ESP board at a time?
@dejanantolic1191
@dejanantolic1191 7 ай бұрын
Thank you for this tutorial, it is really helpful. I have two questions for you: - Did you change the original firmware in the Xiaomi devices? - How often temperature and humidity are updated? Thanks in advance 🖖
@VolosProjects
@VolosProjects 7 ай бұрын
Ne, bas sam htio da ne mjenjam firmware, za esp home potrwbno ga je mjenjati. Moji senzori su tvornicki. Senzor salje podatke svakih 6 sekundi, al se u mom projektu ekran updejta svake sekunde.
@dejanantolic1191
@dejanantolic1191 7 ай бұрын
@@VolosProjects Hvala na brzom odgovoru 😘
@62f100
@62f100 7 ай бұрын
Cool project.
@MrTubertub
@MrTubertub 7 ай бұрын
Great content. Thank you. How many Xiaomi thermometers can you add or is the max 4 per ESP32? What is the distance between floors/rooms that it can communicate? What about historical data? Ist it possible to monitor/log by day and time?
@groveh1
@groveh1 7 ай бұрын
To the end... Thanks!
@TheTriangle2012
@TheTriangle2012 7 ай бұрын
Nice project and design as always. However , I doubt that BT connection is the right choise for reliable connection inside house, having walls and even sometime different levels. I think that using ESPNOW will be much more efficient, or for example LoRa. I realize, that in this particular project it is not possible to implement other types of connection, but it will be very interesting if you concentrate your attention on completely custom project ( I mean , including the temperature sensors, not standar ones).
@VolosProjects
@VolosProjects 7 ай бұрын
Yes , i needed to find good position for sensors and for esp32. But it works now. Esp now is great, but in that case i need 5 boards ,4 sensors and what is worst power suply for them. Thank you. I think i will make espnow tutorial next week.
@danielkukua1708
@danielkukua1708 7 ай бұрын
@VolosProjects I'm not a c programmer but ifndef means if it's not defined and you can define the number of ble devices in your arduino sketch (I think it has to be before the import of the library, but my knowledge of c is zero) - this will override the library value. No need to modify the library every time.
@VolosProjects
@VolosProjects 7 ай бұрын
thank you, yes you are right , ther is no need to edit library.
@vitalysacred
@vitalysacred 7 ай бұрын
I works because these board w/ BL V4.2 (maybe) I use the same board for my project w/ battery because other just doesn’t work w/ 4.2
@vitalysacred
@vitalysacred 7 ай бұрын
99% it’s about 4.2 version
@richpeacock
@richpeacock 7 ай бұрын
Thanks! Another beautiful video but I can't even get VS Code (Platform IO) to edit the TFT_eSPI - User_Setup_Select.h headers from your old video 😭 I think I may not be destined for any success as a coder. 😩 happy to buy you cofeeees
@VolosProjects
@VolosProjects 7 ай бұрын
Why you use platform io, belive me, you dont need ut. Use Arduino ide if you arr begginer.And just falliw my instruczions fir that vidro. You can use even nitepad to edit header files.
@droganPaul
@droganPaul 7 ай бұрын
Always all the way to the end
@VolosProjects
@VolosProjects 7 ай бұрын
Thank you Paul :)
@KjartanAndersen
@KjartanAndersen 7 ай бұрын
Nice project! How long do this sensor work between battery-changes? And what is the range?
@VolosProjects
@VolosProjects 7 ай бұрын
between one and two years, it depends on battery.
@reinholdu9909
@reinholdu9909 7 ай бұрын
my experience: _Battery:_ at least MORE than 22month - _Range:_ up to "through 4 concrete walls" without problems (different receiver thou)
@muctop17
@muctop17 7 ай бұрын
I still have problems configuring that weird TFT library. Isn't there a pre configurated or easy configurable version for T-Display availible? There' so much other products and versions and possibilities inside I always get confused and messed up with ! 🙄
@0miker0
@0miker0 7 ай бұрын
Excellent video and monitoring temperature in different locations is very handy. Do you have any idea why it will not work on the ESP32-S3 boards yet? Possibly a different BLE type?
@VolosProjects
@VolosProjects 7 ай бұрын
Tnx mike, no, i tried and tried but i can find solution. I am waiting maybe someone will helo me.
@0miker0
@0miker0 7 ай бұрын
@@VolosProjects I see the T-Display uses BLE 4.2 and the S3 Pro board uses BLE 5.0. Will dig deeper...
@Yakroo108
@Yakroo108 7 ай бұрын
Nice project 👍👍👍
@ooooooooo164
@ooooooooo164 7 ай бұрын
Very interesting video and very good explanation 👍 Is it possible to Use a lilygo esp32 s3 module with tuya app or smart home app ? I have a tuya water sensor that I want to be displayed on the small lilygo esp32 s3 module. If you can help this will be amazing. I want to use dedicated small t3 displays for different tuya sensors. Like temp and humidity on one lilygo s3 display module and tuya water level sensor on another lilygo s3 module.
@SuperEuro
@SuperEuro 7 ай бұрын
Great job, I hope the corporation doesn't decide to sue you, like Haier #boycotthaier
@maggot008
@maggot008 7 ай бұрын
Excelent project
@zyghom
@zyghom 7 ай бұрын
I watched full ;-)
@VolosProjects
@VolosProjects 7 ай бұрын
Thank you!
@ivovass195
@ivovass195 7 ай бұрын
Great use, I want to do something similar and mainly standalone without depending on a hub/server or phone. Im curios about the range, can I have the ttgo in the living room and have the sensor is separate rooms and still get the readings? Thanks for sharing your projects
@ivovass195
@ivovass195 7 ай бұрын
I wonder if it would work with the t-pico C3 I have . Either way I know what to add to my next AliExpress order. PS yes watch till the end, 10min video are great
@ivovass195
@ivovass195 7 ай бұрын
If range is short maybe set an esp32 with 2 sensors sending data to tdispay
@madwilliamflint
@madwilliamflint 7 ай бұрын
Nice little project! I'm going to have to pick up a couple of these thermometers. Any idea how long the batteries last in them?
@VolosProjects
@VolosProjects 7 ай бұрын
Around 1.5 year. Thank you
@madwilliamflint
@madwilliamflint 7 ай бұрын
@@VolosProjects Oh wow! Yeah. I need some of these.
@bengtkarlsson9747
@bengtkarlsson9747 7 ай бұрын
Ofcourse i watch whole video 🙂
@clebsoncorreia1427
@clebsoncorreia1427 7 ай бұрын
Hello from brazil
@ZoomtronicBlogspot
@ZoomtronicBlogspot 7 ай бұрын
whole video! pozdrav
@cerulyse
@cerulyse 7 ай бұрын
These are good but the app app doesn't let you save a history that's the only thing annoying really, if you leave it constantly running it will run the battery down won't it? I think the thermometer keeps a history of temperatures itself somehow
@d.s.5515
@d.s.5515 7 ай бұрын
@Volos: How accurate are the sensors? And is there much difference after a few hours at the same location? I really like them but go nuts of sensors that are not accurate enough. PS: watch most of your videos to the end and love the short concept. Just enough info and not filling the 30 minute yt algorithm with blablablabla.
@VolosProjects
@VolosProjects 7 ай бұрын
After couple hours, diference can be up to 0.2 .. couple of years ago i was in search for good accurate sensor for tem, i tried many of them...i never finded goid ones with same readings. Most of them need calibration .
@DIYsensors
@DIYsensors 7 ай бұрын
4 Xiomi thermometers and 4 different temperatures, from 21.4 to 22.8. Did they lay there for a while or did you just collect them from different rooms?
@VolosProjects
@VolosProjects 7 ай бұрын
They were in diferent rooms, and in my hands, so readings are diferent
@classicryda120908
@classicryda120908 7 ай бұрын
im curious, lets say i want to build a desk clock using m5 screen module, if it runs on an AA or AAA battery, how long will it last?
@VolosProjects
@VolosProjects 7 ай бұрын
First it will not work on single battery, you will need 3 of them, lipo batteries are better choice. But if you want to use 3 Aa beteries and you want simple clock that shows only time, you will need to put board to sleep and update time once per minute. And this way you will get maybe few days of runtime. Boards with screens need lot of power just for backlight led
@carlitosjrmx1
@carlitosjrmx1 7 ай бұрын
Could someone say me how contact to Volos for a Project Requirement.?
@VolosProjects
@VolosProjects 7 ай бұрын
Right now i dont have time for nothing big, if you need small project then we can talk. What you had in mind?
@carlitosjrmx1
@carlitosjrmx1 7 ай бұрын
Its a small Project...I am a Kofi supporter my alias is MEXICAN. Thanks in Advanced. Best Regards.
@VolosProjects
@VolosProjects 7 ай бұрын
@@carlitosjrmx1 my mail is arduino.2016@gmail.com
@djokinac
@djokinac 7 ай бұрын
odgledano do kraja i nema potrebe da te hvalim uobrazices se posle zezam se malo pozdrav
@VolosProjects
@VolosProjects 7 ай бұрын
Hvala, neka neka, fali zezancije ljudima 😀 .. uzivaj u vikendu sa svojima😀
@djokinac
@djokinac 7 ай бұрын
@@VolosProjects takodje i vama
@Darkk6969
@Darkk6969 7 ай бұрын
Where you get those sensors? I don't see the link in the description.
@VolosProjects
@VolosProjects 7 ай бұрын
They can be found evrywhere, just google xiaomi mija 2 termometer
@tma1818
@tma1818 7 ай бұрын
lily go?
@jasonchambers3197
@jasonchambers3197 7 ай бұрын
Can you use the esp32 with those thermometers to provide data to home assistant?
@VolosProjects
@VolosProjects 7 ай бұрын
yes , people use them with home assistent
@szanolli
@szanolli 7 ай бұрын
Hi Thank you for such an interesting implementation! Could you please kindly confirm the libraries you're using? I am using these and the nice display came up only for a brief moment once and now it doesn't anymore... Using library NimBLE-Arduino at version 1.4.1 in folder: C:\Users\AAAA\Documents\Arduino\libraries\NimBLE-Arduino Using library TFT_eSPI at version 2.5.34 in folder: C:\Users\AAAA\Documents\Arduino\libraries\TFT_eSPI Using library SPI at version 2.0.0 in folder: C:\Users\AAAA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\SPI Using library FS at version 2.0.0 in folder: C:\Users\AAAA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\FS Using library SPIFFS at version 2.0.0 in folder: C:\Users\AAAA\AppData\Local\Arduino15\packages\esp32\hardware\esp32\2.0.14\libraries\SPIFFS
@VolosProjects
@VolosProjects 7 ай бұрын
Did you install m5stick cplus2 board in ide and did you instal stick cplus2 library. Other libraries seems ok
@szanolli
@szanolli 7 ай бұрын
Oh thanks so much for your quick reply ​ @VolosProjects !! I am using the TTGO T-display - The serial port is showing that the modules are well dtected and data is read, but no image yet 😢
@szanolli
@szanolli 7 ай бұрын
@@VolosProjects only once briefly the image came up and then never again
@VolosProjects
@VolosProjects 7 ай бұрын
@@szanolli oh, sorry, than you just need setup tft espi library. Find my video how to setup or install ttgo t-display in arduino ide
@szanolli
@szanolli 7 ай бұрын
@@VolosProjects I will check thanks!!!
@marcm4895
@marcm4895 7 ай бұрын
I think I saw a gray hair.
@VolosProjects
@VolosProjects 7 ай бұрын
Hahah, there are many of them, years😀
@RichardNobel
@RichardNobel 7 ай бұрын
🧓🏻 I also have gray hairs growing on my head. 😱 Do you think it might somehow be related to electronics maker-projects? 😜
@nikthefix8918
@nikthefix8918 7 ай бұрын
@@RichardNobel That's why ElectroBOOM will never show grey. His head is always covered by a layer of soot!
@pillowanalyst
@pillowanalyst 7 ай бұрын
💥❤
T-Display S3 PRO - great ESP32 device for remote controlling
12:30
Volos Projects
Рет қаралды 73 М.
All about Cardputer from @M5Stack
15:40
techiesms
Рет қаралды 39 М.
Before VS during the CONCERT 🔥 "Aliby" | Andra Gogan
00:13
Andra Gogan
Рет қаралды 10 МЛН
PEDRO PEDRO INSIDEOUT
00:10
MOOMOO STUDIO [무무 스튜디오]
Рет қаралды 12 МЛН
а ты любишь париться?
00:41
KATYA KLON LIFE
Рет қаралды 3,5 МЛН
LilyGO Sent Me a Mysterious Package - New Boards by LilyGO
13:37
Volos Projects
Рет қаралды 22 М.
Customize Your ESP32 LCD with Any Font Imaginable
14:49
Volos Projects
Рет қаралды 18 М.
M5Launcher --- How to use
14:37
Bernardo Morcelli
Рет қаралды 8 М.
Connecting ZigBee devices using zigbee2mqtt
32:15
Электроника в объективе
Рет қаралды 127 М.
ESP32-S3-BOX - A good Google, Alexa and Siri replacement?
6:41
Elektor TV
Рет қаралды 3,3 М.
I Tried Hacking a Bluetooth Speaker... (and failed...)
11:12
Grant Collins
Рет қаралды 243 М.
How To Reverse Engineer A Bluetooth Device
11:53
Hacking Modern Life
Рет қаралды 45 М.
4$ Xiaomi thermometer custom firmware LYWSD03MMC BLE TLSR8251
16:24
Aaron Christophel
Рет қаралды 192 М.