-
Checklist
The problemSince updating to the lastest version homeassistant shows a migration error. here is the relevant log:
it seems that it tries to write to /.storage (which doesn't exist) What version of an integration has described problem?2024.04.1 What was the last working version of an integration?No response What vacuum model do you have problems with?two dreames Please firmware installed on your Vacuum.valtudo What type of platform you use?Intel NUC (or generic x86_64) What version of Home Assistant do you use?2024.4.0 What type of installation are you running?Home Assistant Core Camera's settings.No response Logs or Errors shown in the HA snapshots (please enable the Debug Mode)No response Additional informationNo response |
Beta Was this translation helpful? Give feedback.
Replies: 26 comments 17 replies
-
i just checked on my system hass is executed with / as PWD. |
Beta Was this translation helpful? Give feedback.
-
@ChrisOboe thanks a lot for this.. I will check why it didn't get the path automatically as it should. Probably the issue is that it can't create the folder without psw. |
Beta Was this translation helpful? Give feedback.
-
@ChrisOboe does the camera work after you created the folder with the proper password? If not would work on a patch for it. as you can see I'm looking for the current working dir of home assistant and honestly I do not catch how this failed to create the folder on your system. |
Beta Was this translation helpful? Give feedback.
-
@ChrisOboe I hope you could figure out a work around and once again thanks for highlight this issue. |
Beta Was this translation helpful? Give feedback.
-
same error. let me know if you need any logs/info from my system. I have HAAS running in a docker container. Can you also please provide a workaround ? |
Beta Was this translation helpful? Give feedback.
-
yes please can you provide the logs? I will try to fix this asap. |
Beta Was this translation helpful? Give feedback.
-
not just migration, new install is broken too. I removed old integration and tried to reinstall from scratch and got error.
|
Beta Was this translation helpful? Give feedback.
-
I figure out that the issue might be caused from os.path.join.
this lines 300 and 301 in init.py need to be replaced with:
can you give it a try and let me know if it works on yours @carefulcomputer and @ChrisOboe configs? |
Beta Was this translation helpful? Give feedback.
-
i edited the file, and restarted haas. still getting the error when trying to set the vaccum name in integrations.
|
Beta Was this translation helpful? Give feedback.
-
@carefulcomputer this is while editing options?? because it do not looks the startup sequence. Can you please download and instal the integration from the main repository, enable the logs for the camera and restart home assistant and provide me the startup sequence please? edit: hold on, please revert to the 2024.04.0 I think I got to review the way how to get the working directory, some issue with python 12. with os.getcwd probably. |
Beta Was this translation helpful? Give feedback.
-
thanks for looking into it! it is getting late for me. i will try tomorrow. |
Beta Was this translation helpful? Give feedback.
-
any luck ? |
Beta Was this translation helpful? Give feedback.
-
I'm working on it, in few minutes I will update the main repository. |
Beta Was this translation helpful? Give feedback.
-
@carefulcomputer can you please download the main distribution, I added some try to handle the errors and as well some additional logging and a counter measure in case of failure. It should work now if all goes as planned. |
Beta Was this translation helpful? Give feedback.
-
thank you for new update. must be something really weird. still getting error.
|
Beta Was this translation helpful? Give feedback.
-
Okay at this point please revert to the previous version and wait for next one. The camera will be released next week and I will ask to the core guys as per it looks there's some issues with the basic os function. It is anyhow strange that on 3 instances "supervised" I use on my tests I can't reproduce this issue. |
Beta Was this translation helpful? Give feedback.
-
can you please try on a container ? i have been using docker container and that has this problem. |
Beta Was this translation helpful? Give feedback.
-
@carefulcomputer my production environment is in a docker container (supervised) on a server running Debian. I normally test also on this the camera, HA 2024.04.02. No problem on it. In the PI4 running the OS I removed both cameras (integration therefore removed from home assistant) removed the folder and then reinstall the cameras. The folder was not created but the integration did setup both vacuums with no error (as it should be). Having although some strange snapshot issue with the rand256 vacuum currently after that but the other one running the original valetudo works as expected (no folder then store the data in .storage only). I do not catch fully why those error happens and also why the mkdir or makedirs of OS isn't working.. The if should avoid if the directory .storage "do not exist" to create the new folder over there (you can comment those lines and the initial config process must end without error in your case). I need to check again the python 12 docs probably something wrong on this.. this requires time.. so if you want please go back to the know working version in your case or.. simply create the folder in .storage so that this works also for you. |
Beta Was this translation helpful? Give feedback.
-
is .storage folder supposed to map to a physical folder in home assistant ? Here is what I did..
However the integration started working. so it may not be the issue with folder creation, but rather mapping ? |
Beta Was this translation helpful? Give feedback.
-
@carefulcomputer thanks for the update and your time on this. Interesting.. typically for HA contained is the root /config/.storage and core is /var/lib/hass/.storage in the file explorer you will not see it as it is a reserved folder for HA (os .folder is hidden). Both of you were running the camera so far I understand and there was no issue os.getcwd() function that is used to determinate the working dir of the HA instance (python wise) .. anyhow this is quite an interesting point too #115.. please have a look at it. Happy to know that both of you are up and running. I can add just some additional logging anyhow from coding point of view I do not see any "bug".. on the several tests I made as in #115 I noticed too some environmental changes during my test.. |
Beta Was this translation helpful? Give feedback.
-
when go inside the container and check /config, it is pointing to right volume mount (external folder where /config is mounted in container). But for some reason os.getcwd() is getting /run/s6-rc:s6-rc-init:gEioCK/servicedirs/ |
Beta Was this translation helpful? Give feedback.
-
@ChrisOboe and @carefulcomputer |
Beta Was this translation helpful? Give feedback.
-
Thank you ! works great now. appreciate you looking into this. |
Beta Was this translation helpful? Give feedback.
-
Hey, i just updated to Home Assistant 2024.5.1 (coming from 2024.4.2), updated all HACS integrations (can i somehow check which version i was coming from, because i'm pretty sure i've skipped at least 3-5 versions before updating Valetudo Vacuum Camera to 2024.05.0). Anyhow, i also seem to face a similar bug - at least, the error is referring to the migration - hence why i post it in here (i may, of course, open a separate issue if you tell me to):
I'd appreciate it if you could look into that :) |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
-
okay got it.. in the next version the migration should work as intended. Starting point v1.5.7.4
End Point: 2025.05. @phrozen77 as soon available please update the camera to 2025.05.1 :) |
Beta Was this translation helpful? Give feedback.
@ChrisOboe and @carefulcomputer
thanks once again for the help and hightailing this issue. The fix has been release on 2024.04.02. Hope you will enjoy the camera and if you wold like it, please star it ;)