Recorder errors

That is very strange. Searching the forums a bit I turned up this post with some thoughts. Did you use the sqlite3 command to dig into the db by any chance? Sounds like that was the root cause of the issue there.

Also alternatively have you considered using the mariadb addon instead? I switched a while ago and it got rid of a lot of start-up performance warnings for me so it might be a win-win to just take this opportunity to switch.

1 Like

Yeah the MariaDB addon is definitely worth considering.

Thanks for the feedback.

I have InfluxDB installed for Grafana and MariaDB installed as a prerequisite for NGINX proxy manager.

What are the advantages of Using the MariaDB, I know logbook and History take so long to load that they are next to useless?

MariaDB seems to use more memory to cache, producing a more responsive database. I noticed a significant improvement when I was using a pi3.

Also far less prone to corruption.

1 Like

So how do I go about it, any special configuration? like I said it is already running.for the NGINX proxy manager.

Is it just

recorder:
  db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8

in the config.yaml?

recorder:
  purge_keep_days: 1
  exclude:
    domains:
      - automation
      - updater
    entities:
      - sun.sun # Don't record sun data

Well what can I say, switched to MariaDB and the difference is like night and day.

logbook, History load much faster and even my wall mounted tablet is far more responsive AND no more errors.

Thanks,

3 Likes

What directions did you follow to switch to mariadb? I know how to install the Maria add-on. Not sure how to turn the SQL off and what is recommended other than the default settings for Mariadb.

It’s just a matter of changing your recorder URL. Look in the MariaDB addon, at the bottom of the documentation page it gives an example.

Just default config in MariaDB

databases:
  - homeassistant
logins:
  - username: homeassistant
    password: password
rights:
  - username: homeassistant
    database: homeassistant

and configuration.yaml

recorder:
  db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8

  purge_keep_days: 1
  exclude:
    domains:

      - updater
      - media_player

    entities:
      - sun.sun # Don't record sun data

Regards,

1 Like

Thanks. I’ll start working on it. :worried:

It worked, very easy. I need to understand the excludes, includes? For some reason none of my Wyze sensors are showing in the logbook. Then I can follow Tom_I guide on how to reduce size and extend life of SD card.

I set up my DB using your recorder statement:

recorder:
  db_url: mysql://homeassistant:password@core-mariadb/homeassistant?charset=utf8

Where is the database stored?

I do not know, have looked before but it must be stored on another partition?

Looking with both SSH and Samba I can’t find it.Maybe someone else can help? I wanted to see the size compared to the SQLlite I was using.

I guess under /addons

Addons doesn’t show in Samba. In SSH it shows empty.

Using thé samba add-on ? Use whitelist external dies.

How? In the SAMBA config?

This is my working configuration as of now.

workgroup: WORKGROUP
username: redacted
password: redacted
interface: eth0
allow_hosts:
  - 10.0.0.0/8
  - 172.16.0.0/12
  - 192.168.0.0/16
veto_files:
  - ._*
  - .DS_Store
  - Thumbs.db
  - .Trashes
compatibility_mode: false

Mine looks very close to yours I have no idea where to look.

Did you try in configuration.yaml :

homeassistant:
  whitelist_external_dirs:
    - /share
    - /addons