I ran on Raspberry Pi 4 / Raspian Bullseye (armv7): - HA in Docker container - MariaDB on RPi OS (10.5.15) - my DataBase size is ~4GiB (not biggest but higher than 2GiB)
Unfortunatelly there isn’t a newer version for MariaDB so far
(mariadb-server is already the newest version (1:10.5.15-0+deb11u1))
I thought that more users are using the RPi and MariaDB in above constellation and had the same problem?
Do you think I can do the update already without getting problems?
Experiences from others? How have you proceeded?
(So far I want to prevent moving the MariaDB to container as well - is not only hosting for HA, I think there isn’t a official docker image as well )
Great to know! I hope they work as well as the DFRobot one I’ve got which is quite a bit bigger in size and requires a microcontroller. Just waiting for mine to eventually arrive from China, hopefully this month.
They seem to work well but I have nothing to compare them with. A neat thing is there is an energy sensor that is 100 when room is occupied. If you sit still it is around 80-100, and if hold your breathe if falls to like 10, pretty cool
I’ve found with the DFRobot one it can’t quite cover our whole living room, despite it falling within the “range” of the sensor so hopefully a couple of these across the room will solve it for me.
I see the Aqara FP1/FP2 mmwave sensors can count how many people are in an area too - although I’ve not got one so have no idea if it’s actually accurate or not. Not sure if you need a 60GHz sensor for that though or if the 24 can handle it, anything like that out the box?
I can’t really think of any uses for anything but the “Occupancy” sensor but maybe someone more creative than me can think of something with the energy/distances!
In short - even if you don’t update you are still affected by this issue.
It is an identified issue with older Mariadb versions. And HAs usage of Mariadb can trigger it in all existing versions of HA.
The reason the recommendation to upgrade is in these release notes is:
it was just discovered
theres a schema migration in this release which has an increased likelihood of hitting the issue
But even if you don’t update HA, you may still run into it if you don’t upgrade MariaDB
EDIT: You may want to consider running MariaDB in docker rather then on the host. Then you aren’t limited by what’s in the package manager you’re using. The official Mariadb image is well beyond the recommended version
Never had a problems with updates but in the last 2023.02 i can’t restart HA because the database is upgrading… after mores than one hour. Is that normal? (graphs are not loading, or loading without the last values, etc).
(using the default DB config, not MariaDB).
I am thinking of moving for Mariadb to Docker, but unfortunatelly - for armv7:
user@raspberrypi:~# docker pull mariadb
Using default tag: latest
latest: Pulling from library/mariadb
no matching manifest for linux/arm/v7 in the manifest list entries
But there is e.g., (but also inofficial):
tobi312/rpi-mariadb:10.6-debian
migrating a database to a new schema can take some time.
How long? That depends on the size of the database, the cpu / memory the host can use, maybe disk storage and other factors.
Also, it might depend on the database version, as given in the information of this release, it might be, that you hit a bug in MariaDB during the migration IF you are using a specific version.
That can also lead to a longer migration process…
Agree. Now I’m not an average user (i use mariadb) but what we can learn from Steve’s question that sometimes there is some ambiguity that could be prevented with a short clarification such as “does not affect default installation” or similar.
Has anyone had any issues with Smart IR after updating to 2023.2.3? I use it with my Broadlink RM3 Pro to control both my AC and tower fan. After updating, I can no longer control anything via my Broadlink. Rolled back to 1.7 and the issue goes away.
I can’t really think of any uses for anything but the “Occupancy” sensor but maybe someone more creative than me can think of something with the energy/distances!
I think this are the raw values used if you config sensitivity using energie/distance (gate)
I can imagine to feed them into an AI to find patterns and deviations of usual routines to act in such cases, fe. in elderly care (fall detection and such things).
Finally got some time and followed your advise. So I installed 10.9.5 in docker and used HeidiSQL to migrate data. Since docker version is running on native to MariaDB port 3306 it was even possible to copy data directly between databases, without intermediate step of creating SQL dump. Some observations:
it is possible to create data folder outside of container, so this gives full controll over placement and allows to directly observe size of database.
initially I placed database on spinning drives (10 x WD Reds on SHR2) and performance of DB was terrible! Filling in history view for ~50 entities for 1 day took about 20 seconds (from ~2s previously) and displaying chart for 1 month of history took over 3 minutes (30 seconds previously). After that I moved all data files (was easy due to data being exposed outside docker) to 2 disks RAID 1 volume and timings are now maybe 50% slower than originally (1 day history ~3 seconds, 1 month history ~45 seconds). This shows how big influence is on IOPS of underlying disks. Small performance hit might be due to version of MariaDB, docker installation, keeping data files outside of container or any combination of these. But this decrease is acceptable.
data migration itself took ~1 hour for ~18M rows (~4GB database size). Probably if I would do migration not to spinnig disks but to SSD instantly, it would be way faster.
and one more side effect (can’t really explain); data write rate to disk reduced from ~6mbps I had previously to ~800kbps (measured on volume level). So additional benefit of extending life expectancy of SSD