My Journey with OpenHAB3 on Raspberry Pi: Challenges and Solutions

After successfully setting up OpenHAB3 on my Raspberry Pi, I couldn’t help but dive deeper into its capabilities. The initial setup was smooth, but I soon encountered a puzzling issue: I couldn’t download any new add-ons. Despite the network connection being confirmed working (as I could access the OpenHAB cloud), the installation process kept failing. Here’s my journey through troubleshooting and finding a solution.

Initially, I suspected a Docker configuration issue. My Docker setup was as follows:

version: ‘2.2’
services:
openhab3:
image: “openhab/openhab:milestone”
restart: always
ports:
- 8080:8080
- 8443:8443
- 8101:8101
- 3671:3671
#- 3671:3671/udp
- 5007:5007
- 6524:6524/udp
- 1012:1012
volumes:
- “/etc/localtime:/etc/localtime:ro”
- “/etc/timezone:/etc/timezone:ro”
- “./openhab/addons:/openhab/addons”
- “./openhab/conf:/openhab/conf”
- “./openhab/userdata:/openhab/userdata”
environment:
OPENHAB_HTTP_PORT: “8080”
OPENHAB_HTTPS_PORT: “8443”
EXTRA_JAVA_OPTS: “-Duser.timezone=Europe/Berlin”
network_mode: bridge

The logs showed errors like:

2021-04-13 11:25:01.414 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing ‘openhab-persistence-influxdb’: Error: Error downloading mvn:org.openhab.addons.bundles/org.openhab.persistence.influxdb/3.1.0.M1

I tried resetting the installer by removing problematic entries from addons.config, but the issue persisted. After some research, I realized that Docker’s network mode might be restricting outgoing connections. Switching to a custom Docker network resolved the issue, allowing add-ons to download seamlessly.

This experience taught me the importance of network configurations in Docker setups. It also highlighted the resilience of OpenHAB3, as even after encountering such issues, the system remained functional and responsive.

I’m now looking forward to exploring more advanced configurations and integrations with other smart devices. The journey with OpenHAB3 has been nothing short of enlightening, and I’m excited to continue learning and optimizing my setup!