linux  RPi  smarthome

openHAB - installation

                          _   _     _     ____
   ___   ___   ___   ___ | | | |   / \   | __ )
  / _ \ / _ \ / _ \ / _ \| |_| |  / _ \  |  _ \
 | (_) | (_) |  __/| | | |  _  | / ___ \ | |_) )
  \___/|  __/ \___/|_| |_|_| |_|/_/   \_\|____/
       |_|

Installation

wget -qO- https://openhab.jfrog.io/artifactory/api/gpg/key/public | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/openhab-keyring.gpg >/dev/null
sudo sh -c "echo 'deb [signed-by=/etc/apt/trusted.gpg.d/openhab-keyring.gpg] https://openhab.jfrog.io/artifactory/openhab-linuxpkg stable main' > /etc/apt/sources.list.d/openhab.list"
update
install openhab openjdk-17-jre

sudo systemctl daemon-reload
sudo systemctl enable openhab
sudo systemctl start openhab

ufw 

Falls  von anderem Host erreichbar sein soll, sonst über reverse proxy.

# openHAB HTTP
sudo ufw allow 8080

reverse proxy

Klappert irgendwie noch nicht...

sudo nano /etc/apache2/sites-available/000-default-ssl.conf

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName openhab.l337.l11

        SSLProxyEngine On
        SSLProxyVerify none
        SSLProxyCheckPeerCN off
        SSLProxyCheckPeerName off
        SSLProxyCheckPeerExpire off
        ProxyPass / http://127.0.0.1:8080/
        ProxyPassReverse / http://127.0.0.1:8080/

        ErrorLog ${APACHE_LOG_DIR}/error.log
        CustomLog ${APACHE_LOG_DIR}/access.log combined

        SSLEngine on
        SSLCertificateFile /etc/ssl/certs/apache.crt
        SSLCertificateKeyFile /etc/ssl/private/apache.key

        <FilesMatch "\.(cgi|shtml|phtml|php)$">
                        SSLOptions +StdEnvVars
        </FilesMatch>
        <Directory /usr/lib/cgi-bin>
                        SSLOptions +StdEnvVars
        </Directory>
</VirtualHost>

<VirtualHost *:443>
        ServerAdmin webmaster@localhost
        ServerName www.l337.l11
        ServerAlias l337.l11 *.l337.l11
. . .