ATC_MiThermometer icon indicating copy to clipboard operation
ATC_MiThermometer copied to clipboard

Question: is there a possibility to display data from different/external sensor?

Open msperl opened this issue 4 years ago • 5 comments

Is there a was to Display data from an external sensor (so data received not transmitted)?

Use case would be an external temperature sensor.

i understand it is about battery life, so maybe a ping pong would be possible: *send the internal sensor data over BT (just one)

  • if there is a response (of some sort) instead in a short time window, than present that data
  • possibly alter the presentation showing the internal and alternative sensor data for x seconds at a time

this obviously requires an external device to transmit the data (I.e a Raspberry Pi or similar)

Just wondering if that is possible/feasible/realistic with the limited battery that the device has.

msperl avatar Apr 09 '21 18:04 msperl

In connection mode, all thermometers with the current firmware consume less. In connection mode, there are 2 options for display interface.

pvvx avatar Apr 12 '21 07:04 pvvx

I'm interested in this kind of use as well. My use case is I would like to use a device in my bathroom to record temperature and humidity, but have it display water usage which comes from another source.

There would probably be around 100 updates per day, I don't know if that matters much for the battery.

In the README I see function "0x60 | Get/Set LCD buffer", is this what I should use? Along with 0x22 maybe, although I don't see an option to "set LCD ext data".

seeschloss avatar Mar 24 '22 15:03 seeschloss

Different models of thermometers have different display buffers. Depends on the type of controller and screen.

0x60 For Xiaomi LYWSD03MMC B1.4 there is an example of clock output: function lcd_clock() Xiaomi LYWSD03MMC B1.4 Buffer Description: https://github.com/pvvx/ATC_MiThermometer/blob/master/BoardPinout/Mi_LCD_Segments.jpeg Sample: image The battery symbol will be displayed. The data size is arbitrary. If one byte is specified, only the first byte will be changed in the buffer. The data size exceeding the buffer size will be truncated in the thermometer program itself. The display is made after a given interval: image After sending the 0x60 command, the internal display functions are disabled until the connection is closed. Command '6100' restores typical display functionality.

For other types of thermometers, a description can be found here: https://github.com/pvvx/pvvx.github.io

0x22 A unified output for different types of displays and their controllers is presented in the TelinkMiFlasher.html interface itself. image function sendExt()

  • Due to the strong differences in screen segments, not all additional icons may be displayed.

pvvx avatar Mar 24 '22 21:03 pvvx

There would probably be around 100 updates per day, I don't know if that matters much for the battery.

Create a permanent connection and get the temperature and humidity and control the display. The highest consumption occurs at the beginning of the connection, during the handshake. Another increased consumption occurs if you drop the connection without sending a close command.

pvvx avatar Mar 24 '22 22:03 pvvx

Thank you very much for your help, I was able to write an ESPHome display component that displays on my lydwsd03mmc some value it gets from elsewhere using the 0x60 function so I can also write a few letters if necessary (a shame that the top segment for the unit isn't independent! I'm displaying litres so a "L" there would have been nice).

seeschloss avatar Apr 15 '22 12:04 seeschloss

Would it be possible to show only the readings from the external sensor, or does that require a fundamental change in the firmware?

njbuch avatar Jan 30 '24 19:01 njbuch