Yes but the point I was making, is that HA has given the mysql server instructions to carry out on the database. HA then does nothing until the database server has finished with that instruction.
In the meantime WHILE the database server was altering the structure of the database, you have come along and edited the content of the database, and then trashed the database altogether.
There is every chance that something of that database still exists as far as mysql is concerned, because it was busy altering the structure of it.
The only way to be certain that mysql has definitely given up doing things with the database, whether it exists or not, is to restart mysql.
Mysql is not expecting a database it is doing work on, to be trashed, and I’d expect a lot of that work goes on in memory and probably with a temporary database that it copies the existing data to while it works on the on-disk database.
Maybe? I can’t say for sure as I ditched Life360 about a month ago as their location API was not responding quick enough and it was screwing up all my automations.
My point has been in my comment that Life360 is really a waste anyways as the Mobile App does a better job, and most users will have that on their phone anyways.
I didn’t say databases cannot process multiple commands at once. Actually I don’t know one which cannot do that (excl sqllite and some ancient databases from '70/80s)
I said it in the context of the database migration executed during subjected HA update. Hence I believe it is executed command by command therefore it will not profit from databases which sport parallel command execution.
and it doesn’t meen db must have connection pooler. it’s pretty different stuff.
btw some databases can spool more parallel processes to speed up single query, for example for table scans, aggregations etc. But if installed on small computers like pi or nuc, IOs will likely be a bottleneck.so again: no gain.
depending on “trivial” definition. If you mean that new copy of db must catch all data comming during migration - then ok - a bit more complex but not impossible. But as option we could agree with this X hours hole in data, guaranteed very short outage. And this aproach shouldn’t be harder to program then current solution.
Saying that, current approach is completely ok in case of hobby stuff. But is not acceptable in real production. Even today some wifes might be angry if you turn off automations they used to for a day long.
and for the Life360: my experience is rather positive I have to say, and never misses a beat in my experience.
Mobile app is fine too, though tends to be less reliable when their phones aren’t up to date/battery is down. Or simply not configured with all permissions set… somewhat more intrusive than Life360, the app gets turned -off more frequently than needed for being a reliable tracker.
Having said all that, I mostly want to see who’s home or not, (not wanting to follow my kids every mile they take) and the ping should and did that most simply. home/not_home.
I suggest to check if ha is properly stopped when migration starts. I don’t know how migration is executed, but if it copies db files before ensuring that there is no db activity (incl database built-in activities) itmay damage database. Actually it’s the case when executing online backups - db restored from such backup is often broken
Isn’t Life360 probably not reliable either if the app is not updated OR what app actually can report location when it is dead?
I’d rather setup all the permissions, and send all the data back to HA vs Life360, their cloud storage and whatever they are doing with that data. That is the basic premise of HA, and the most important thing for me.
In addition, Life360 you can literally watch someone travel down a road. I have yet to see that feature in HA Mobile. It is borderline stalkerish to me. I just need to know when they are home; I don’t need to be big brother. My kids have the same right to make the dumb ass mistakes I did at their age.
No biggie though, offering up my 2 cents. Each to their own on what works for them.
"Setup timed out for stage 2" & "Setup timed out for bootstrap"
Upgrading from 3.4 to any of the 4.x versions (I tried 4, 4.1, 4.2), after the upgrade, I see " Home Assistant is starting, not everything will be available until it is finished." for a very long time (10 minutes). Eventually, in the log I see “Setup timed out for stage 2 - moving forward” and then, after several more minutes, the log shows “Setup timed out for bootstrap - moving forward”.
Finally, the UI shows that HA has started, but from then on, I am unable to restart Core from the UI (nothing happens when I attempt to, and nothing is shown in the log). My only course of action has been to revert to a 3.4 snapshot in each case.
EDIT: The culprit was a custom component in the configuration.yaml. Through trial and error I managed to isolate and then remove it.
There is a “generate a UUID” extension in VSCode that you can install. In fact, there are several; I am using the one by netcorext for instance. Perhaps the Home Assistant extension include one that’s similar; I was hoping for a macro or other auto-completion thing to avoid going to the command box, but even if you need to, still fast than copy/paste from a terminal window where you ran a uuidgen command (or similar.)
I had an automation setting a scene but the scene id was not correct. I was expecting the automation debug feature to point that out, but it seems to just say everything ran fine. Am I not understanding that feature properly?
I too do this for simple cases and if I may quickly ask you about this: With devices typically going to sleep the ping will often fail. Do you have any tricks up your sleeve? When you ping, what’s your count, interval and criteria before considering a device not home? I’ve found that I need a 20-30min window (1min intervals to ping) and then still at night when one sleeps, mobile phones will show away.
As my database is still migrating (22 hrs) and I have no access to HA … I am starting to thing about fresh installation, but is there any way how to recover “old database”?
RPi 3B, SSD 128GB and MariaDB runs on Synology NAS. Both RPi and NAS are on ethernet.
I checked the NAS, there is a pending MariaDB update from 10.3.21 to 10.3.24 .
Might it be a reason?