OH 4.0 Greenfield - Setup Tipps

Hi all,
Due to the 4.0 release I want to take the chance to build up my system on a green field.
I have proxmox in place with an docker instance running. My legacy openhab is running on an LXC ubuntu container.

My question is. How had you setup you environments regarding this questions:

  • LXC, Docker Container or VM?
  • How to access the config files? Samba share? Other ways?
  • How to edit the config files? Local Visual Studio? webbased visual studio?
  • How is your visual code configured? Any openhab related plugins?
  • How to view and access the logfiles?
  • Any other useful tools or self hosted web apps to setup and maintain openhab?

Have you additional tipps? Do you know some great tutorials (text or video) that cover some part of my questions?

I access the config file through a samba share.
I’ve found it to be the easiest solution and it allows to sync my local configuration copy in one go to the target system.
I’m using PyCharm (and sometimes Notepad++) to edit the config files, but that’s only because I’m writing my rules for HABApp and I’ve PyCharm open anyway.

On Windows I use LogExpert for the logfiles and I have yet to find a good log reader for linux that offers the same possibilities.

Proxmox (until recently ESXi) running an Ubuntu server VM running all my home automation services in Docker containers deployed and configured using Ansible and mounting local host folders as volumes.

I am using 99% managed configs so I access all that stuff through MainUI or the REST API. I do have some JS Scripting libraries which I develop locally and deploy using git, using VSCode Remote SSH to edit in them in place or just ssh to the machine and use vim.

Note that even my managed configs are git source controlled.

If I were still using file based configs, I’d use a local VS Code instance using the Remote Development (which comes with Remote SSH) extension pack. I have used the web based VSCode in the past and that works well too, but I eventually decided it was too much effort to keep it up and running with no benefits over the Remote SSH extension.

A terminal using ssh and multitail: see [multitail] color scheme for openhab logs. I’ve toyed with installing Frontail but have never had a situation where I’ve needed the logs in a browser page instead of a terminal. And I don’t like how I’d have to interleave the events.log and openhab.log files instead of seeing the two in separate panes like multitail provides (maybe that’s something that could be configured).

All my deployment and configuration stuff is done through Ansible. I never have to remember what I did or how I did something to configure the machine. It’s all captured in Ansible tasks.

I use Zabbix to monitor all my machines (virtual and physical) and send me emails when there’s a problem like too much swap space in use or unavailability. Home automation is not the only fun and interesting stuff I have going on in my network.

Looking at the features, multitail may come close, at least for the sorts of things you’ll find in openHAB logs. But it’s command line, not GUI.

1 Like

Proxmox LXC with debian bookworm minimal Image (i.e. only console) though I also have a LXC with docker for some docker containers. I’m using openHABian to setup, but I don’t use any of the additional stuff other than frontail and FireMotD

although samba is an option, available via openHABian, I simply linked the config directories to another dataset (I love zfs!) for easy rollback and frequent snapshots. The datasets are also readable from a samba LXC and therefor I can read (but not write) all configuration via cifs.

I’m using remote VisualStudio Code, i.e. the local VS Code opens a ssh connection to the remote machine and I can edit all files as if the VS Code editor were on the remote machine (in fact, parts of it are). Using the openhab user to login, so no complication because of permissions)

openHAB plugin * openHAB Alignment Tool * JSON Path Status Bar * Regex Previewer

via frontail and/or console (I’m familiar with the GNU/Linux shell…)

I’ve created a pair of keys for login to the Container via ssh, the private key is stored locally and setup in the connection for VS Code Remote Editing, also there is an additional connection directly to the karaf console via keypair, so after unlocking the key (pagent…) I don’t have to type any password to login to the openHAB Container console, the karaf console or the remote editor.

1 Like