Owntracks with private Openhab-cloud

Have anyone configured Owntracks through a private openhab-cloud? Wondering what it takes to point owntracks to a private openhab-cloud instead of openhab at home/office behind a firewall.

Yes I did, but it has nothing to do with the Obenhab-cloud itself

I have a private root server with the obenhab-cloud and a “secure” mqtt server installed on.
My smartphone has the Owntracks app with the secure mqtt server configured.
At home i have a raspberry Pi with openhab. (there I have another internal mqtt server running)
openhab knows both of the mqtt servers and my owntrack items use the secure mqtt server.

Thanks for the reply and time taken to nicely illustrate it @Felix_Raetz

My implementation is through http, not through mqtt. So I may have to do something more at the private openhab-cloud side than that is mu guess.

I have exactly the same. Did you came any further on this @anjana55?

My OwnTrack version 2.1.3 on Android reports in the status menu (Endpoint state message):


It seems like Owntrack tries to send something to my OpenhabCloud,but gets no response. My OwnTrack setup works fine with myopenhab.org

This puzzels me:
The URL that you need to configure in OwnTrack is :
Note home as start of the URL!

That is a different URL than configured into the OpenHab App:

Anyone has a clue? Is this a nginx trick that is bound to the home.openhab.org subdomain, or a node.js trick?
Should I also configure an extra subdomain?

Any help is appreciated!

Found the solution! :grinning:
See issue #231 on GitHub.

There are basically two solutions.

  1. Either create another subdomain and process those URL request different (like http://home.myopenhab.org instead of https://myopenhab.org)

  2. Add two small correcties to the javascript files.

I tried the 2nd solution and it works!

The GitHub link shows the changes a bit difficult to read. Here is what to do:

On your private MyOpenhab server, go to the directory (changes mydomain.com to the domain you actually using):


In app.js, change the line:

if (!req.path.match('/rest*') && !req.path.match('/oauth2/token') && !req.path.match('/ifttt/*') && !req.path.match('/remote/*'))

into (add the gpstracker exception):

if (!req.path.match('/rest*') && !req.path.match('/oauth2/token') && !req.path.match('/ifttt/*') && !req.path.match('/remote/*') && !req.path.match('/gpstracker/*'))

In addition, in the file routes/index.js, after the line:

app.all('/habpanel/*', this.ensureRestAuthenticated, this.preassembleBody, this.setOpenhab, this.ensureServer, this.proxyRouteOpenhab.bind(this));

add the following line:

app.all('/gpstracker/*', this.ensureRestAuthenticated, this.preassembleBody, this.setOpenhab, this.ensureServer, this.proxyRouteOpenhab.bind(this));

Then restart your node.js in the way you usually do.

I need some more timing to examine this patch and its consequences, but wouldn’t wait telling the community. Many thanks to @DerOetzi :pray: