[SOLVED] Using OpenHAB behind a corporate proxy - can't download addons

Tags: #<Tag:0x00007f616ee62838> #<Tag:0x00007f616ee62748>
  • Platform information:
    • Hardware: Raspberry Pi 3B
    • OS: Raspbian 9.6
    • Java Runtime Environment: openjdk version “1.8.0_152”
    • openHAB version: openHAB 2.3.0-1
  • Issue of the topic:

Hi all,

I’m trying to get a Raspberry Pi running OpenHAB going behind a university proxy server (with authentication), and I’m most of the way there but am stuck with getting addons to install.

I have followed the instructions provided here to set up the details of the proxy server and authentication settings, and I have confirmed (I believe) that this works through pinging google:

ping -c 5 www.google.com
PING www.google.com ( 56(84) bytes of data.
64 bytes from syd09s14-in-f4.1e100.net ( icmp_seq=1 ttl=51 time=8.72 ms
64 bytes from syd09s14-in-f4.1e100.net ( icmp_seq=2 ttl=51 time=8.81 ms
64 bytes from syd09s14-in-f4.1e100.net ( icmp_seq=3 ttl=51 time=8.73 ms
64 bytes from syd09s14-in-f4.1e100.net ( icmp_seq=4 ttl=51 time=8.80 ms
64 bytes from syd09s14-in-f4.1e100.net ( icmp_seq=5 ttl=51 time=8.76 ms

--- www.google.com ping statistics ---
5 packets transmitted, 5 received, 0% packet loss, time 4007ms
rtt min/avg/max/mdev = 8.720/8.768/8.815/0.091 ms

and doing an apt-get

 sudo apt-get update
[sudo] password for openhabian:
Ign:1 http://repos.azulsystems.com/debian stable InRelease
Hit:2 http://repos.azulsystems.com/debian stable Release
Hit:3 https://deb.nodesource.com/node_8.x stretch InRelease
Hit:4 http://archive.raspberrypi.org/debian stretch InRelease
Hit:6 http://raspbian.raspberrypi.org/raspbian stretch InRelease
Ign:7 https://dl.bintray.com/openhab/apt-repo2 stable InRelease
Get:8 https://dl.bintray.com/openhab/apt-repo2 stable Release [6,051 B]
Hit:8 https://dl.bintray.com/openhab/apt-repo2 stable Release
Reading package lists... Done

which appear to work as expected.

When I try to go through the PaperUI to install a binding I get the spinning icon over the “install” text and errors in the log as follows:

2018-12-13 17:01:40.325 [ERROR] [core.karaf.internal.FeatureInstaller] - Failed installing 'openhab-binding-fronius': Error:

	Error downloading mvn:org.openhab.binding/org.openhab.binding.fronius/2.3.0

This point is where I really get out of my depth, so I’m hoping to get some advice on how to resolve this. My understanding is that openHAB uses maven to manage packages and I’ve searched for information on how to set up maven with proxies - such as here where they suggest putting the details in a settings.xml file, however I’m not able to find the .m2 directory or the settings.xml file.

I realise this is a real edge case and possibly the first time someone has come up against this issue with OpenHAB, but I’m hoping the experts here will be able to help me solve this problem!

I’ve tried to include as much relevant information as I can, but please advise if there’s anything more that would be useful.

Thanks in advance!

If you do
sudo apt-get install openhab2-addons
it will download ALL thebindings in a KAR file
Your openHAB installation would not then need to download bindings when needed but just install them from the main kar file directly.

1 Like

I used the suggested way. from @vzorglub as I have my system running behind a Proxi that our isp runs and I have logged requests to do acl for me so that I have my system open, but for now I need to do it this way.i have a Cisco that I will install and use for the security part. once I have the proxy opens up (removed) as they use it to link the systems on there side as all our links from them are wifi .

Hi @vzorglub - thank you very much for your quick and insightful solution!

I’ve implemented this and it works as expected and now I can install all necessary bindings.

One quick follow up clarification - once bindings are installed will they stay up to date via updating the entire openHAB system (as per this post)?