genielabs / HomeGenie

HomeGenie, the programmable automation intelligence
https://homegenie.it
GNU General Public License v3.0
387 stars 154 forks source link

Restoring setup in v1.3-stable.19 results in garbage settings[BUG] #423

Closed bkenobi closed 3 years ago

bkenobi commented 3 years ago

Version Which HomeGenie version/OS/.NET framework version are you using. (REQUIRED) Debian v1.3-stable.19 on RPi3

Describe the bug A clear and concise description of what the bug is. I installed a fresh image of Buster on my RPi this week. I installed the following version: https://github.com/genielabs/HomeGenie/releases/download/v1.3-stable.5/homegenie_1.3-stable.5.tgz I then updated from the web interface to v1.3-stable.19. I used the web interface to restore a previous setup from v1.1r501. The interface looked right initially as it has all of my modules. However, the programs all appear to have encoded (base64) strings. I tried decoding them, but that didn't seem to help.

As an example, the Advanced Smart Lights code I wrote saves a path for the log file which should be "/home/pi/log" but it shows up as "ROM+SY+aiAjoE8fm4eYEkw==". I checked the backup file in modules.xml and this matches the encoded line: `ConfigureOptions.Adv_SmartLight.EnableLog

ROM+SY+aiAjoE8fm4eYEkw==` **Code to Reproduce** Write a small snippet to isolate your bug and could be possible to our team test. **(REQUIRED)** None needed **Expected behavior** A clear and concise description of what you expected to happen. When importing a backed up settings file, HG should have settings restored as originally saved. **Screenshots/Stacktrace** If applicable, add screenshots/stacktrace **Additional context** Add any other context about the problem here. My previous intsallation crashed so I cannot go back and compare to a previous version. I do have a backup of the SD card, so I can find the modules.xml or other files potentially should that help, but they should match the backup file. I can provide a portion of that file if it would help. If I need to manually decode and enter the data into the new installation, please let me know the proper encoding so I can proceed.
bkenobi commented 3 years ago

Upon further investigation, all of my scheduled events are gone. It also appears that I will have to go to each program and recompile it prior to HG detecting that the program is available for settings in a module. The program shows up as a green light but it does not work until I enter the program and either compile or make a change that results in the save dialog displaying on exit.

It appears that the modules are imported with type, name, and kept in appropriate groups. It appears that program code has been imported correctly. It appears that all other settings are not restored correctly.

bkenobi commented 3 years ago

This seems to be an issue caused by the updated backup system and my password protected backup file. I restored to an older version,disabled password, reserved, and then restored to a newer version.