From 70a604d8bbf4d0db9f91e6b88761b44d1ff6c540 Mon Sep 17 00:00:00 2001 From: MichaIng <micha@dietpi.com> Date: Sun, 23 Apr 2023 17:53:24 +0200 Subject: [PATCH] v8.17 - openHAB | This long requested vendor and technology agnostic FLOSS home automation software has been finally added to DietPi. Many thanks to @just-jason and many others for requesting it and @MDAR for providing install instructions and valuable information: https://github.com/MichaIng/DietPi/issues/3857 --- .meta/dietpi-survey_report | 1 + CHANGELOG.txt | 3 +-- README.md | 1 + dietpi/dietpi-services | 1 + dietpi/dietpi-software | 32 ++++++++++++++++++++++++++++++++ 5 files changed, 36 insertions(+), 2 deletions(-) diff --git a/.meta/dietpi-survey_report b/.meta/dietpi-survey_report index ce668c6233..b6f6fa9367 100755 --- a/.meta/dietpi-survey_report +++ b/.meta/dietpi-survey_report @@ -658,6 +658,7 @@ shopt -s extglob do aSOFTWARE_NAME8_17[$i]=${aSOFTWARE_NAME8_16[$i]} done + aSOFTWARE_NAME8_17[206]='openHAB' # Pre-create software counter array so that we can see also software (available in newest version) with 0 installs for i in "${aSOFTWARE_NAME8_17[@]}" diff --git a/CHANGELOG.txt b/CHANGELOG.txt index ccd51af384..b97bf82094 100644 --- a/CHANGELOG.txt +++ b/CHANGELOG.txt @@ -1,9 +1,8 @@ v8.17 (2023-05-06) -New images: - New software: +- openHAB | This long requested vendor and technology agnostic FLOSS home automation software has been finally added to DietPi. Many thanks to @just-jason and many others for requesting it and @MDAR for providing install instructions and valuable information: https://github.com/MichaIng/DietPi/issues/3857 Enhancements: - NanoPi R series | Updated udev rules for the Ethernet LEDs to not lid the LEDs of disabled Ethernet devices. If an Ethernet device has been detected by the kernel/udev already and an LED is configured to light on link (connected cable), it lights until the interface is set up and no link is detected. So for disabled interfaces, some LEDs remained lit. The udev rules have now been changed to quickly set up and down the interfaces for the LEDs to remain off until an interface has been successfully configured. diff --git a/README.md b/README.md index 6b915c604d..f85308bff5 100644 --- a/README.md +++ b/README.md @@ -332,6 +332,7 @@ Links to hardware and software manufacturers, sources and build instructions use - [Homer](https://github.com/bastienwirtz/homer) - [microblog.pub](https://git.sr.ht/~tsileo/microblog.pub) - [Nukkit](https://github.com/CloudburstMC/Nukkit) +- [openHAB](https://github.com/openhab) --- diff --git a/dietpi/dietpi-services b/dietpi/dietpi-services index 411f0e82c1..e2a3a6802a 100755 --- a/dietpi/dietpi-services +++ b/dietpi/dietpi-services @@ -245,6 +245,7 @@ _EOF_ # - Home Automation 'home-assistant' 'domoticz' + 'openhab' # - Network 'noip2' diff --git a/dietpi/dietpi-software b/dietpi/dietpi-software index 2b84c1131e..4906a9cdca 100755 --- a/dietpi/dietpi-software +++ b/dietpi/dietpi-software @@ -1490,6 +1490,12 @@ Available commands: aSOFTWARE_CATX[$software_id]=17 aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/home_automation/#tasmoadmin' aSOFTWARE_DEPS[$software_id]='89 webserver' + #------------------ + software_id=206 + aSOFTWARE_NAME[$software_id]='openHAB' + aSOFTWARE_DESC[$software_id]='Vendor and technology agnostic FLOSS home automation software' + aSOFTWARE_CATX[$software_id]=17 + aSOFTWARE_DOCS[$software_id]='https://dietpi.com/docs/software/home_automation/#openhab' # Printing #-------------------------------------------------------------------------------- @@ -11192,6 +11198,25 @@ _EOF_ fi fi + if To_Install 206 openhab # openHAB + then + # APT key + local url='https://openhab.jfrog.io/artifactory/api/gpg/key/public' + G_CHECK_URL "$url" + G_EXEC eval "curl -sSfL '$url' | gpg --dearmor -o /etc/apt/trusted.gpg.d/dietpi-openhab.gpg --yes" + + # APT list + G_EXEC eval 'echo '\''deb https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main'\'' > /etc/apt/sources.list.d/dietpi-openhab.list' + G_AGUP + + # APT package + G_AGI openhab + G_EXEC systemctl stop openhab + + # Change TCP port to avoid conflict with SABnzbd and Airsonic-Advanced + G_CONFIG_INJECT 'OPENHAB_HTTP_PORT=' 'OPENHAB_HTTP_PORT=8089' /etc/default/openhab + fi + if To_Install 157 home-assistant # Home Assistant then local ha_user='homeassistant' @@ -12201,6 +12226,13 @@ If no WireGuard (auto)start is included, but you require it, please do the follo [[ -f '/etc/lighttpd/conf-available/99-dietpi-tasmoadmin.conf' ]] && G_EXEC rm /etc/lighttpd/conf-available/99-dietpi-tasmoadmin.conf fi + if To_Uninstall 206 # openHAB + then + G_AGP openhab + [[ -f '/etc/apt/sources.list.d/dietpi-openhab.list' ]] && G_EXEC rm /etc/apt/sources.list.d/dietpi-openhab.list + [[ -f '/etc/apt/trusted.gpg.d/dietpi-openhab.gpg' ]] && G_EXEC rm /etc/apt/trusted.gpg.d/dietpi-openhab.gpg + fi + if To_Uninstall 83 # Apache then Remove_Service apache2