Xiaomi temperature sensor has no history

Hi!
I’ve been struggeling a lot getting my Xiaomi Aqara temp&humid sensor display history. I get a reading, and it updates when the temperature changes, however there is no history. This article might be of help to me, but I want it to work regularly in stead of this. It did work before, and suddenly stopped working. The state info looks like this:
image

I’ve tried resetting my database and waiting for new data… Didn’t work. I’ve tried switching my entire database to MariaDB; didn’t work. I’ve also tried:

recorder:
  db_url: !secret mariadb_connection_url
  include:
    entities:
      - sensor.temperature_158d0002253007

With no luck.

The history data from the sensor is available in the Xiaomi Home app.

My only error log is like this:

2020-03-15 12:45:19 ERROR (MainThread) [homeassistant.core] Error doing job: SSL error in data received
Traceback (most recent call last):
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 526, in data_received
    ssldata, appdata = self._sslpipe.feed_ssldata(data)
  File "/usr/lib/python3.7/asyncio/sslproto.py", line 207, in feed_ssldata
    self._sslobj.unwrap()
  File "/usr/lib/python3.7/ssl.py", line 767, in unwrap
    return self._sslobj.shutdown()
ssl.SSLError: [SSL: KRB5_S_INIT] application data after close notify (_ssl.c:2609)

Also: Other sensors (Like raspberry pi CPU temp) works flawlessly with history.
You can also see my HA github repo here: https://github.com/amundmr/HomeAssistant which has two screenshots of the non-working Xiaomi temp sensor and the working RPi CPU temp sensor in the lovelace ui using mini-graph-card.

Does anyone know what I can try?
Best regards.

I’m having the same issue. Anyone know what causes this?

I am also noticing this on two home assistant setups. The currently using deCONZ 6.5.0 with ConBee II as the Zigbee hub on both.

Checking the logs:

Logger: homeassistant.components.recorder
Source: components/recorder/init.py:509
Integration: Recorder (documentation, issues)
First occurred: 7:08:55 PM (405 occurrences)
Last logged: 8:39:54 PM

Error saving events: (sqlite3.DatabaseError) database disk image is malformed
Background on this error at: http://sqlalche.me/e/13/4xp6

Update: this lead me to a good thread:

In short: ssh in, delete the db (yes, along with it all history) and then restart HA.

1 Like