(Solved) OpenHAB app on iOS


Using the OH app on iOS I seem to get 500 errors trying to connect. Wireshark seems to show this error:

93 151.933244566 -> HTTP 375 GET /rest/sitemaps/home/home HTTP/1.1
94 151.936844978 -> HTTP 503 HTTP/1.1 500 Internal Server Error (application/json)

Has anyone managed to get it working? This happens no matter what sitemap I choose.

Have solved this. Part of the problem was my nginx configuration I was using to reverse proxy OH2, and add authentication.

Here is the pertinent part, in case it helps anyone else.

	ssl_certificate           /etc/nginx/ssl/cert.crt;
	ssl_certificate_key       /etc/nginx/ssl/cert.key;
    ssl on;
	add_header                      Strict-Transport-Security "max-age=31536000";

    access_log            /var/log/nginx/openhab.access.log;
	root /var/www/html;

	auth_basic "Protected content";
    auth_basic_user_file passwords;

    location / {
      proxy_pass https://localhost:8443;
      proxy_redirect https://localhost:8443 https://openhab.org.local:9000;
	  proxy_buffering off;

	  proxy_set_header Host                 $http_host;
	  proxy_set_header X-Real-IP            $remote_addr;
	  proxy_set_header X-Forwarded-For      $proxy_add_x_forwarded_for;
 	  proxy_set_header X-Forwarded-Proto    $scheme;