Skip to content

Commit

Permalink
New software title: OpenHab
Browse files Browse the repository at this point in the history
  • Loading branch information
igorpecovnik committed Nov 6, 2024
1 parent ff6280a commit b705b45
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/HA001.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ENABLED=true
CONDITION="[ -f /lib/systemd/system/openhab.service ]"
Binary file added tools/include/images/HA001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions tools/include/markdown/HA001-footer.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
=== "Access to the web interface"

The web interface is accessible via port **8444**:

- URL: `https://<your.IP>:8444`
- Username/Password: Are set at first web interface login

=== "Directories"

- Install directory: `/usr/share/openhab`
- Site configuration directory: `/etc/openhab`
- Config file: `/etc/default/openhab`
- Data directory: `/var/lib/openhab`

See also [openHAB file locations](https://www.openhab.org/docs/installation/linux.html#file-locations).

=== "View logs"

```sh
journalctl -u openhab
```
26 changes: 26 additions & 0 deletions tools/json/config.software.json
Original file line number Diff line number Diff line change
Expand Up @@ -381,6 +381,32 @@
}
]
},
{
"id": "HomeAutomation",
"description": "Home Automation",
"sub": [
{
"id": "HA001",
"description": "Install openHAB",
"command": [
"openhab install"
],
"status": "Stable",
"author": "@armbian",
"condition": "! check_if_installed openhab"
},
{
"id": "HA002",
"description": "Remove openHAB",
"command": [
"openhab uninstall"
],
"status": "Stable",
"author": "@armbian",
"condition": "check_if_installed openhab"
}
]
},
{
"id": "Benchy",
"description": "System benchmaking and diagnostics",
Expand Down
45 changes: 45 additions & 0 deletions tools/modules/software/install_openhab.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@

module_options+=(
["openhab,author"]="@igorpecovnik"
["openhab,ref_link"]=""
["openhab,feature"]="install_openhab"
["openhab,desc"]="Install openhab from a repo using apt"
["openhab,example"]="install_openhab"
["openhab,status"]="Active"
)
#
# Install openHAB from repo using apt
#
openhab() {

case "$1" in
install)

# keys
wget -qO - https://repos.azul.com/azul-repo.key | gpg --dearmor > "/usr/share/keyrings/azul.gpg"
wget -qO - https://openhab.jfrog.io/artifactory/api/gpg/key/public | gpg --dearmor > "/usr/share/keyrings/openhab.gpg"
# repos
echo "deb [signed-by=/usr/share/keyrings/azul.gpg] https://repos.azul.com/zulu/deb stable main" > "/etc/apt/sources.list.d/zulu.list"
echo "deb [signed-by=/usr/share/keyrings/openhab.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main" > "/etc/apt/sources.list.d/openhab.list"

apt_install_wrapper apt-get update

# Optional preinstall top 10 tools
apt_install_wrapper apt-get -y install zulu17-jdk
apt_install_wrapper apt-get -y install openhab openhab-addons
systemctl daemon-reload
systemctl enable openhab.service
systemctl start openhab.service

;;

uninstall)

apt_install_wrapper apt-get -y remove zulu17-jdk openhab openhab-addons
systemctl disable openhab.service
rm -f /usr/share/keyrings/openhab.gpg /usr/share/keyrings/azul.gpg
rm -f /etc/apt/sources.list.d/zulu.list /etc/apt/sources.list.d/openhab.list

;;
esac
}

0 comments on commit b705b45

Please sign in to comment.