A Handy Script for Updating openHAB Instances

Hey everyone, I wanted to share something that might be useful for those of you running openHAB on Windows! I recently wrote a script to automate the update process for my openHAB 2.0 instance. It’s still a work in progress, but I thought I’d share it in case it helps someone or contributes to the documentation.

My setup is a bit different from the standard Unix-based update script. I’m using an Intel NUC28xx with Windows 10 on an SSD, and my folder structure is organized in a way that makes backups and updates easier. Here’s a quick overview of how it works:

  1. Download and Unzip the Snapshot: Place the new version in the designated folder.
  2. Backup and Clean Up: The script handles creating backups and temporary files during the update process.
  3. Batch File Execution: I created a batch file called openHABupdate.bat that automates the entire process.
  4. Stopping openHAB: The script ensures openHAB is stopped before proceeding with the update.

I included error handling and logging to make troubleshooting easier. The script is designed to be user-friendly, with clear prompts and instructions throughout the process. I hope this can save someone time or provide a starting point for their own automation!

If anyone has suggestions or improvements, I’d love to hear them. Happy automating! :blush: