HABDroid has stopped working

I have been using HABDroid on my phone for quite a while and at some point recently it has quit working for me. I have version 1.8.0.2 installed and my server was a custom build of 1.8.0 but in troubleshooting I have updated to the official 1.8.3 release.

When I open the app, it will briefly say it is discovering OpenHAB and then just spin the icon in the menu bar and never load my sitemap. I had not changed anything on the server before it quit working. I also installed the app on my wife’s tablet and it immediately started working with no issues. I have confirmed that I can access the basic UI from my phone and the REST endpoint is working on both the HTTP and HTTPS ports from my phone.

I’ve been trying to look deeper into this the last few minutes. From what I can tell, the request from my phone seems to never be making it to the server when I use the app. I can watch the request log and see requests when I access the REST endpoint from my phone’s browser and when I use the app from my wife’s tablet. I never see any requests when I try to use the app on my phone.

My server is running on a raspberrypi 2. I’ve checked netstat also and I never see any connections being established when I open up the app on my phone.

Earlier this week they had to change the SSL cert on the my.openhab servers. They used letsencrypt which is a pretty recent service so older JDKs do not trust it as a certificate authority. The easiest fix is to install the latest Oracle Java 8 on your openHAB server.

1 Like

My issue currently isn’t with my.openhab, I’m trying to connect directly to openHAB on my local network.

If you have not already done so, can you enter IP address of the server in the HABDroid settings. It sounds like a problem with the UPNP finding the server.

The upnp worked fine from another device. It made no difference with the IP
manually entered, then it just flashed connecting to configured URL and
started spinning.

Is this still the case when you have specified the IP address? If so, there would appear to be a problem with the routing on your phone. Have you installed an ad blocker or something that would change this? Or something simple like leaving mobile data on so its not connected to wifi?

Yes still the case when specifying the IP address. I am hesitant to believe
there is something wrong with the phone in general as I can access the REST
endpoint through chrome on my phone and the classic UI website works as
well. I don’t have any ad blocker or anything and WiFi is indeed active.

What URL are you using?

Earlier this week they had to change the SSL cert on the my.openhab servers. They used letsencrypt which is a pretty recent service so older JDKs do not trust it as a certificate authority. The easiest fix is to install the latest Oracle Java 8 on your openHAB server.

This should be a major announcement. I had assumed my.openhab site has been down for the last week and was just about to give up on the service and the IFTTT features that come with it.

http://<local_ip>:8080/ is what I had put into the app. I’ve also tried
using https://<local_ip>:8433. Also in the browser I can use
http://<local_ip>:8080/rest/
and https://<local_ip>:8433/openhab.app?sitemap=demo ((or https
equivalents) just fine.

Did you try uninstalling and reinstalling the app?

It was.

Typo or are you omitting the IP in the app as well? Have you tried using the IP in the url?

http://192.168.1.123:8080
https://192.168.1.123:8443

Yes. Step 1 was trying to force close and clear cache and data. Step 2 was
uninstalling and reinstalling.

Sorry, I see the email now.

Oh, that was a typo. I was using my server’s assigned IP, 192.168.1.4.

I encounter the same issue: HabDroid screen remains empty.
Reading through this thread, I double checked my settings and tries several reinstalls of the app and off course also checked the server is running and the urls working when entered in a browser. Nothing helped :frowning:
In one of my tries I saw a detail, that might leading to the cause:

In the app settings I entered the open accessible demo url as my local url, which worked fine and the app screen is filled with nice little items: "http://demo.openhab.org:8080"
When I use “http://192.168.23.102:8080” the app screen remains empty.

Then I entered the rest endpoint url into a browser: http://demo.openhab.org:8080/rest
This url delivers a nice JSON structure.
When I enter http://192.168.23.103:8080/rest I recieve a little XML structure

If the app is expecting JSON and receives XML its no wonder, that it cannot process it.

Has the rest interface changed? Is there a wac to configure the jetty server to make it deliver JSON instaed of XML? Is there a wy to configure HabDroid from JSON to XML?

Regards
Alex

At the moment, I have to disconnect from my local network to use the app. When I’m connected locally, the openhab auto discovery finds my server then tries for a little bit to connect and stays blank. If I disconnect from my WiFi it will connect through the my.openhab external url and actually load the sitemap.

Yes, same with me.

Besides the OpenHab Jetty server I had an Apache server running. It seems that Apache gives openHab wrong answers on the auto discovery. After stopping Apache2 service HabDroid works fine. HabDroid now is able to connect to the local Url.