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
tom_l
June 16, 2020, 7:14pm
8
Yeah the MariaDB addon is definitely worth considering.
MarkB1
(Mark Booth)
June 16, 2020, 7:56pm
9
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?
tom_l
June 16, 2020, 8:08pm
10
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
MarkB1
(Mark Booth)
June 16, 2020, 8:31pm
11
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
MarkB1
(Mark Booth)
June 17, 2020, 9:40am
12
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
bschatzow
(Bill Schatzow)
June 17, 2020, 3:46pm
13
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.
tom_l
June 17, 2020, 4:00pm
14
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.
MarkB1
(Mark Booth)
June 17, 2020, 8:14pm
15
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
bschatzow
(Bill Schatzow)
June 18, 2020, 12:51am
16
Thanks. I’ll start working on it.
bschatzow
(Bill Schatzow)
June 18, 2020, 3:39pm
17
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.
bschatzow
(Bill Schatzow)
June 24, 2020, 9:06am
18
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?
MarkB1
(Mark Booth)
June 24, 2020, 9:36am
19
I do not know, have looked before but it must be stored on another partition?
bschatzow
(Bill Schatzow)
June 24, 2020, 9:45am
20
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.
bschatzow
(Bill Schatzow)
June 24, 2020, 10:35am
22
Addons doesn’t show in Samba. In SSH it shows empty.
francisp
(Francis)
June 24, 2020, 10:37am
23
Using thé samba add-on ? Use whitelist external dies.
MarkB1
(Mark Booth)
June 24, 2020, 11:11am
24
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
bschatzow
(Bill Schatzow)
June 25, 2020, 12:17am
25
Mine looks very close to yours I have no idea where to look.
francisp
(Francis)
June 25, 2020, 4:26am
26
Did you try in configuration.yaml :
homeassistant:
whitelist_external_dirs:
- /share
- /addons