2023.2: How can I Assist?

I also postpone the update from 2023.1.7 to 2023.2.3 because of information on using MariaDB >=10.5.17 because of significant performance issue (like others https://www.reddit.com/r/homeassistant/comments/10ua2we/updating_mariadb_on_raspberry_pi_following_20232/?xpromo_edp=enabled)

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 :frowning:
(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 )

Just received some HLK-LD2410B and, after adding 5V only to the board, it’s detected in HA and works great

1 Like

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?

No, no counters, there’s lots of disabled sensors, I have no idea what they do

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!

Distance could be used to turn on a LED strip based on how far along the strip.
Or stairway lights.

Energy, dim the lights/turn off lights when you fall asleep. (If it detects that)

See my post here.

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:

  1. it was just discovered
  2. 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

1 Like

Hi there,

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).

Pedro.

Thanks for the info and explanation.

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

Difficult decision :frowning:

Fixed itself! … took some time to update this time!

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…

Unfortunately, I went back to version 2023.1.7 because the Modbus module was constantly delivering errors:

Modbus Error: [Input/Output] Modbus Error: [Invalid Message] No response received, expected at least 8 bytes (0 received)

Sensors were suddenly not available, reported back after a few seconds, but other sensors were not available.

No changes were made in my modbus.yaml; After restoring to the old version, everything is stable again.

I think there is a problem with pymodbus here.

Best regards
Michael

Github issue time then :slight_smile:

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.

1 Like

It wasn’t a question. Just an observation that the average user does not know what database they are using which could lead to confusion.

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 :slight_smile: