My.openhab with more than one openhab server

I have two locations each with their own openhab server, and I would like to manage them through my.openhab.

Each site has a separate internet connection, but I am using the same secret and UUID, corresponding to my openhab account.

It basically doesn’t work (using the https://my.openhab.org/openhab.app?sitemap=xxx), however, if I look at the list of items, they are updated from each site.

Is there a way to make such a setup work, or is one my.openhab account restricted to one ‘site’ (openhab server, IP address) ?

I’m no expert on the implementation of my.openhab so this is largely a guess on how I think it works based on observation.

I do not think that having multiple OH servers on the same my.openhab account was ever an anticipated use case. From the documentation and my experience there is nothing that would make me think it would work. It makes sense that your Items from both instances are showing up because that is a data push (i.e. your two OH instances are pushing the data to my.openhab). But anything else I would not expect to work because I doubt the work necessary to keep track of which instance has what Items or sitemap is in place. And even if it was able to do that, there is all sorts of complexity added in dealing with duplicated names and such.

So I think the short answer is that is not supported. If you want to have a single sitemap you can try to link the two Event Buses over MQTT (see the MQTT Binding page for details).

That’s what I suspected. I have worked around the problem by creating one my.openhab account per site, but that creates its own set of challenges on the client side (not well supported by browser, android app…). I have seen that there is an enhancement request for this for the android app, but no plan as such. I’m looking at ways of having two app instances on Android…

I’ll look into the MQTT solution. Thanks!

Have you looked at some of the other third party apps like 3House? Then you could use Habdroid for one and 3House for the other. Its not ideal but it can get you by until a better solution comes along.

As far as I can tell tell 3Hou.se does not support my.openhab.

I have managed to rebuild the openhab Android app with a different name (I even have a different color icon!) so that I can have two openhab apps with different configurations. A bit of a hack I give you that, but it serves my purpose. If I have more time I could try to help integrate something in the official app.

MQTT seems to require a broker, and openhab only provides a client, so it looked a little convoluted, but one day I would like to look into it some more.

I assure you it is far far less convoluted than rebuilding the Habdroid app. :wink:

In fact 3Hou.se does support my.openhab, and supports multiple hosts. So that is definitely a solution to my problem. The UI is perhaps not as nice as openhab app, but it works.

For the MQTT solution, I was stuck on the fact that both openhab servers are behind routers that change public IP when they reboot. I have now found that DynDNS is a solution to this problem.

So I now have 3 solutions to choose from!

Cobra worked out of the box for me to run my second site: https://play.google.com/store/apps/details?id=in.cobrasoftwares.cobrahas
3hou.se never loaded sitemaps for my sites on openhab 1.8.3 and Samsung Note 5.

I can’t see how you add a second server in CobraHAS. Looks like a clone of android openhab to me. What am I missing ?

Hi. I use habdroid for one site and cobra for another site. a bit clunky but until there is a client that works it does it for me.

1 Like

I’m looking for a way to run two instances as well. One for for my home and one for my cabin.

Seems that the clients still can’t connect to two different myopenhab accounts.

And the only way is to use two different front end clients. For me it will be Rotini and habDroid.