Even more pita was the deployment using pscp from commandline to copy the files to my Raspberry Pi (/home/pi) and then via putty/ssh moving the files to the correct directory (e.g. /etc/openhab2/items).
Backup is another issue, some items/things are in the openHAB database and not in the config files, the widgets for HabPanel are another place…
As I’m used to it, I could use eclipse IDE. Any recommendations?
Another alternative to git, or as I use it, in addition to git, is VSCode has a remote SSH extension that lets you open folders on another machine (i.e. the one running openHAB) through ssh. This has been a game changer for be at least.
Prior to that extension, most people shared their config and userdata folders using samba or NFS and mounted them to their local machine to edit. openHABian still comes configured to enable this.
But I still use got on my home servers to back up and keep a history on my changes to my oh config. I backup everything in the conf folder and everything in userdata except for cache, temp, and the jsondb backups folder. It’s all text so very git friendly.
And to help with HABPanel, it gets saved to userdata/config/org/openHAB/HABPanel.config I believe.
If you are used to eclipse, you can figure out VSCode easily enough. And you will probably be like me and surprised at how much it does with so little overhead.
I use a server called Gogs which is pretty nice. You can also run your own insurance if GitLab and Bitbucket I think. It if you don’t care if you have the nice weather based UI, there are tons of tutorials for how to set up a simple git server.
Follow my link posted above - if you have a look at my git setup you will see that you can push your changes via git from inside VS Code to your openHAB server - and you will find a link to a very good git tutorial / online ebook which I was using as source for getting started with git
Git is also working with eclipse, so I don’t yet see a benefit of using Visual Studio.
Questions on git:
Where to host the repository? Of course, if having a server hardware it should go there, but my system is development PC + Raspberry Pi.
Initial check-in, from which copy to make my initial commit.
Any other pitfalls?
Yes, the standard git setup would be to host a repo to which your raspi and your PC would sync.
I’m not doing that - I’m using the raspi as server repo and push my changes from my PC / Mac directly to my raspi.