Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Project and data are deleted after reboot, constantly #1138

Closed
MichalisVach opened this issue Mar 28, 2024 · 7 comments
Closed

Project and data are deleted after reboot, constantly #1138

MichalisVach opened this issue Mar 28, 2024 · 7 comments

Comments

@MichalisVach
Copy link

MichalisVach commented Mar 28, 2024

after HA reboot or plugin restart, the project is lost,

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'restart either plugin either HA'
  2. Click on 'web UI'
  3. Scroll down to '....'
  4. See error - No project there, everything is lost
@unocelli
Copy link
Member

try to be more clear!

@MichalisVach
Copy link
Author

try to be more clear!

im sorry,

im attaching you some pictures,
Pic No:01
image

this picture is as final project,

when i restart HA or restart FUXA then everything are deleted, like the project is as temporary and after restart everything are lost,

image

this is after restart,
as you can see its at default settings, empty template, empty project,

@unocelli
Copy link
Member

I suppose you are using docker, then you have to define the volume for _appdata:
docker run -d -p 1881:1881 -v fuxa_appdata:/usr/src/app/FUXA/server/_appdata -v fuxa_db:/usr/src/app/FUXA/server/_db -v fuxa_logs:/usr/src/app/FUXA/server/_logs -v fuxa_images:/usr/src/app/FUXA/server/_images frangoteam/fuxa:latest

@MattW2
Copy link

MattW2 commented Apr 1, 2024

Hi, @MichalisVach. Let me give you a few tips when posting a bug and try to point you in the right direction. Not trying to be critical just give you some pointers to getting the best answer.

  1. Don't use acronyms for software B when posting in a repository for software A. I happen to know HA is most likely Home Assistance but most won't.
  2. Use links to help people better understand what you are trying to to do. I assume you are using the addon from https://github.com/SmartLiving-Rocks/FUXA/ but there are many others and knowing your source let's people better help you
  3. If 2 is correct, posting in the bugs of that addon would actually be a better place as what I believe is happening is actually a bug in how the config.ymal is written.
  4. Home Assistant add-ons are just docker containers. Docker containers by themselves have no "memory" meaning every time they reset they start from scratch. This is solved by mapping files/folder.... From outside the container into the container. Docker calls this a "bind mount". Looking at the config.ymal in the above linked Add-on from SmartLiving-Rocks I see no "map:" section. Which is why anything you do gets cleared out after a reset. I suggest you reach out to @SmartLiving-Rocks and tell them this such that they can correct it.
  5. You can find more about Home Assistant add-on configuration by reading https://developers.home-assistant.io/docs/add-ons/configuration/

@MichalisVach
Copy link
Author

I suppose you are using docker, then you have to define the volume for _appdata: docker run -d -p 1881:1881 -v fuxa_appdata:/usr/src/app/FUXA/server/_appdata -v fuxa_db:/usr/src/app/FUXA/server/_db -v fuxa_logs:/usr/src/app/FUXA/server/_logs -v fuxa_images:/usr/src/app/FUXA/server/_images frangoteam/fuxa:latest

Hi there,

thank you for your reply,

My Home Assitant is running in a Virtual Machine ( VirtualBox ) over Windows 11

@SmartLiving-Rocks
Copy link

SmartLiving-Rocks commented Apr 1, 2024

Hello

I did the implementation of this absolutely amazing visualization tool for Home Assistant. This issue is not a fuxa related and I need to do some work on my site.

My Home Assitant is running in a Virtual Machine ( VirtualBox ) over Windows 11

You are runnig a Home Assistant Supervised. Supervised Home Assistant instances have an Add-On Store. Those Add-Ons are just Docker that looking a bit different.

I have included the map: section to my https://github.com/SmartLiving-Rocks/FUXA/blob/main/config.yamlsection as @MattW2 suggest. Thanks for the hint!

But that did not do the trick and after a restart of the add-on all files are gone.

define the volume for _appdata:

I think I need to do also some modifications to the https://github.com/SmartLiving-Rocks/FUXA/blob/main/Dockerfile and do the right mapping of the WORKDIR and defining the volume for _appdata:

My Docker skills still have some room for improvements. I am working on a fix but it may take a while.

Workaround

Of curse I have also lost some of my fuxa Work. So here is how I save my projects at the moment.

  1. I save the project with the Save project as option locally to my pc.
  2. After a restart of the add-on or the VM I use the Open Project file.
  3. The go to settings and Connections and insert your Username and Password in the MQTT section.
  4. Everything should be back and work normally.

@unocelli
Copy link
Member

I’m going to close this as resolved. let me know if you have any issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants