Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New software title: OpenHab #230

Merged
merged 1 commit into from
Nov 6, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
}
Loading