-
Notifications
You must be signed in to change notification settings - Fork 402
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
🐛 | gpio_settings.ini moved without notice or doc update #1096
Comments
I think I encountered the same issue. (fresh buster insallation; 2.1.1 with Spotify and GPIO control) In file /components/gpio_control/gpio_control.py I changed the following line to the exact path of the settings.ini and now buttons are working as they should: What is still not working is the rotary encoder; I think it is the same issue than #1095 |
Sorry for the unnecessary confusion. When we integrated GPIO control, there was a lengthy discussion about where to put the settings file. In the long run we want to move all configs out of Phoniebox‘s dir to make upgrades easier (see #797), but I think that should be done at once for all configs. So for now I adapted in the develop branch all wrong paths to the usual settings dir. @veloxidSchweiz, @MiczFlor, I hope that’s ok for now. |
I just tried a fresh install of the develop branch with on line installer and the scripts stops on line 1162 with the message, that the gpio script was not found. I would wait for a fix. But as git-noob I was not able to use a previously working (for example v2.0.0): I am working with buster-lite, where I was not able to get gpio running. I have two more phonieboxes running perfectly with v2.0 1b6bc25 develop. |
Yes, that's ok.
Because files that can be changed and might be changed by the user after installation should not be part of the git code base. What do you think @s-martin @veloxidSchweiz |
is there a need to additionally configure /boot/config.txt in regards to using a rotary encoder? |
Not that I’m aware of. |
@MiczFlor, from my point of view the file will change after installation, because the user will edit the GPIO pins and edit or remove „devices“ in the settings file, depending on the used hardware. So I agree we should go with the sample mechanism. |
Hi, |
.sample is kind of a convention in Phoniebox for sample files, which are copied during installation and then edited by the user. |
MiczFlor#1106: Skip WINS configuration in install script when installing Samba MiczFlor#1104: Media directory is not adjusted in Mopidy, when changed in install script MiczFlor#1096: gpio_settings.ini moved without notice or doc update
Isn't this something easy to fix in the master? It's just a path that had to be adjusted in a file. I used '../../settings/gpio_settings.ini' in my fork to test this. It's all fine than. I don't understand the problem at all: The installation script checks, if the file exists. If it's not there, than the sample file is copied. If it is there, than the file is untouched. The new installscript now ignores the existing file, because it's in the old directory. Breaking all installations out there. That does not make sense in any way... |
It's already fixed in the develop branch. We just have some discussions (see above) how to improve the UX more. We will release (i.e. merge develop to master) this soon. |
What config files are moved to I'm currently working on a (private) deployment for many non technic affine people to get a phoniebox. This config update is a disaster for this scenario. I'll have to repair many configurations just after delivery. |
This is still an ongoing discussion, so nothing decided yet. Of course, if we take this road, we need a clear migration path, so this won't break existing installations. |
So the |
Yes
If somebody will implement it :) |
I was struggling to figure out why my buttons wouldn't work. |
I really think, the migration process should be implemented, before this is changed in master. This had to be in one step. Just my thoughts. ;) |
* don't version the used gpio_settings.ini file in git * follow Phoniebox conventions for settings files and store it in misc/sampleconfigs * Improve documentation
So I added PR #1116 to fix all current issues. @Huseriato and others: a |
For your information: There are currently many people in Raspberry PI and other forums, that are all struggeling about the same gpio settings bug. Some are not able to get a fresh installation and many of them failed after update. So please offer a migration path for this people. Renaming the file in git can do the trick (gpio_settings.ini -> gpio_settings.ini.sample). The python script can than look for the file and automatically copy the renamed SAMPLE-file to the desired target location. |
Currently Phoniebox has no real recommended upgrade path for all users. Experienced users may use I'm really not sure, how to proceed here. On one hand we cannot do anything (like backing up the working copy) before a user may On the other hand I'm a little reluctant to keep a gpio_settings.ini.sample or .bak under git version control, because a) this may not be the current configuration the user had edited locally anyway and b) how many years are we supposed to keep it under git version control, because there still may be an old installation out there where one could Thoughts, other ideas? |
I just thought about it and think even without deleting gpio_settings.ini from repo a Either That’s the main reason why @MiczFlor suggested not to version the file. Considering that keeping the file under version control and removing it could both destroy an existing local configuration I would suggest to remove it now from version control, so at least future installations won’t have this issue. @Huseriato and others, what do you think? |
I think the old gpio_settings.ini should be moved - using git - to the sample folder. So a local file (with modifications) is moved to the sample folder. The gpio script can than check, if the target file in the settings/ or ~/.config/phoniebox directory exists or not. If not, than it copies the version from the sample directory to this location. So a modified version of the file is kept and the sample file is also used, if there is no configuration. |
That’s what PR #1116 does |
Bug
This commit: f419fb4
Cost me two evenings. Someone moved the gpio_settings.ini and did not update the documentation or added a info on install.sh
What happened
coping and changing gpio_settings.ini in the previous and documented path does not effect anything.
I expected this to happen
Update Doc or add statement to install.sh where to find the config file. or both.
Further information that might help
-->
The text was updated successfully, but these errors were encountered: