Access two completely separate openHAB instances from the openhab app on my phone

I have searched the forums and Googled the subject but I can’t find a way to easily access two separate openHab2 instances from my phone.

Background:

I have openHab2 running quite successfully at my home, I have several devices all integrated through Alexa. I have a myopenHab account for that instance and have the openHab app installed on my phone. From the app I can see my home instance either locally (when at home) or remotely when on the road. I like openHab so much that decided to implement a new instance at work, this is a separate office building miles away from my home. I have implemented a new local server there and set up several devices. Now I want to be able to access the work instance from my phone too. - I have created a different myopenHab account for the work instance however, without reconfiguring the app to look at work, I can’t see a way to configure the app so that I can switch between my home instance and my work instance.

In researching this dilemma I did see that some folks have created a communication between separate openHab servers using MQTT. I don’t want or need these two separate instances to communicate with each other. I just want to be able to access both instances (switching between the two) from my Android phone.

I can potentially log into myopenHab in a browser from the phone but this will not give me the same ease of access that I get with the app.

Has anybody tackled this issue and come up with a solution?

Any help would be greatly appreciated.

1 Like

I don’t think so.
You could try to manually install a second instance of the app from package source (I think with a different name) to point its URL to your second instance.

I hope it doesn’t come to that, but I will if I must :wink:

There’s another recent thread on this with noone to show a (simple) solution, so likely yes you’ll have to.
Either way, home automation is not about controlling devices from your smartphone, so with proper automation in place, you won’t need that app any longer…

1 Like

I believe this is definitely one important aspect of home automation. At home, I use “Alexa” extensively, she is in every room and controls everything however, when I am not physically at the house, it is great to be able to adjust my thermostat from my phone or check to see what’s being turned on and “left” on. I am certainly a proponent of phone integration as one of the advantages of home automation.

@ianj001 I understand your concern and yes things like this happen from time to time. A suggestion, if you are worried about things happening or not happening. Why not automate that? Basically if the thermostat is set one way and it is not supposed to be send yourself an alert.
This I believe may be the point @mstormi was trying to make. Home automation is supposed to be a passive thing vs active.

No it isn’t. You didn’t catch the point. Interaction isn’t automation or part thereof. Once you have properly automated your home, there’s no need for interaction any more except in rare corner cases - no matter if through a smartphone or Alexa.
Thermostats can be auto-set based on time schedules and presence detection as can be lighting, and any critical household appliance can be switched off after a number of minutes or when you’re leaving the house.
Btw, you can also use the web interface instead of the app, then it’s as simple as having two bookmarked links.

2 Likes

Oh I get your point, you believe home automation is a passive environment where everything automatically happens based on rules however, in my “real world” this does not suffice. I will give you just couple of use cases that happen on a regular basis:

**Case 1:**
We are eating, we have a scene set up that provides adequate lighting for the meal, it is essentially 4 lights in various combinations. Our room is open plan and the TV is viewable from the table however, it is not our desire to watch TV during the meal. The meal can happen at anytime during the evening depending on our busy lives. Once we have finished we would like to retire to the living room and watch TV however, one of our family members may still be finishing their meal. The TV is automated via  a harmony device which not only switches on the TV but also controls the tuner, then the programming is provided by a Roku. "Alexa turn on the TV" will trigger a rule that turns on the TV, the tuner, tunes the Roku to PS Vue and turns on the side lamp.
"Alexa turn on TV time" will trigger a rule that will turn off the kitchen light, the dining table light, the pantry light, turns on the TV, the tuner, tunes the Roku to PS Vue and turns on the side lamp.
Also Alexa can control any of the lights individually, thus if one family member is eating, it is possible to turn on the TV and reduce the normal lighting so the family member can eat with minimal interruption to TV viewing.

**Case 2**
The TV volume maybe higher or lower depending on the show, I can sift through my plethora of remotes to adjust it and move to the side of the room where it works because the tuner is in a cabinet that makes the remote effectiveness spotty or I can use my phone to adjust the volume from the openHab App. It uses the harmony that has a remote blaster inside the cabinet and works flawlessly.

**Case 3**
My wife is sitting watching TV and feels a little warm. I use my openHab App to adjust the temp down 2 degrees on the air conditioning.... Happy wife, happy life.

**Case 4**
My wife is sitting watching TV and feels a little cold. I use my openHab App to adjust the temp up 2 degrees on the air conditioning.... Happy wife, happy life.

**Case 5**
I need to open the garage door, I can find buttons or use the door opener remote or just use my openHab App to send an open command via Garadget.

As you can see there are many times when my family life makes interaction a wise choice. I am happy that you may be able to automate your home to the extent that you almost never have to adjust anything but that is just not a reality for my family and I wouldn’t have it any other way.

4 year old issue :neutral_face:

I guess that means I will need to find another solution. Back in the day when I used “Eudora” for an email client I wrote a front end app that let you choose the profile that you wanted to use as “Eudora” didn’t support multiple email accounts at that time. I might investigate something similar here but alas my app writing skills are limited.

Like @lfs_alp5 said, there is a feature request, but it isn’t implemented yet.
Instead of compiling your own version you could install both stable and beta versions and use one for work and one for home.

1 Like

Now that’s a brilliant idea, why didn’t I think of that ?!?!
UPDATE: I installed the beta version and that worked perfectly, now I can access both of my instances from my phone. - Thanks for the tip. :grinning:

No I don’t believe it’s all-passive ad didn’t mean to say it’s possible to automate things to an extent that no interaction will be required any more. But interaction is not automation. And there’s more and more natural/more intelligent ways to interact than through your smartphone, Alexa being one, but there’s others.
I know your case 1 as well, I’m using the TV remote as the trigger. Same for case 2, you can use the remote of any of the OH-controlled devices and trigger on volume changes to propagate them to the other devices.
On a number of ‘daily’ use cases such as your #5, it makes more sense to assign them to physical switches rather than to fiddle with the smartphone.
Now I don’t claim to be able to fully get rid of that but it’ll greatly reduce the number of cases where you’ll still need it.

And all of those cases you mention apply to a single home only, so you won’t need that dual-home-in-a-single-app capability. Alexa or a family tablet on the table will do.

I agree that Alexa is definitely the most convenient way to access the “on-demand” automation, we have invested in it heavily at home but at the office, we are not using Alexa yet. Also, Alexa doesn’t give me remote access to things at home. I love having alerts on my phone and being able to change things based on my changing schedule.

I am trying to automate things as much as possible, I believe the office will be much more automated than my home. The rules are pretty simple, I want the lights on when we are open, off when we are not. I want the thermostat to stay between certain limits and change on the schedule that I have programmed taking into account the outside temperature. I want to know when the doors are opened and closed. I believe I will be able to get that to an almost “hands-off” automation soon.

Thanks for the input and discussion.

Hi there

I think i know what you mean. I solved the same problem throug a chrome shortcut on my android phone. Just open and login on your second instance through remote with chrome. Than you can save the shortcut next to your normal instance of the openhab app.

I have no idea if you can do the same on ios.

Thanks for the input @seliku I solved the problem by installing the Beta version alongside the original so I get notifications from both instances. - I set the alerts up so they begin with “HOME” or “WORK” that way they are easily distinguishable. It works very well and saves me having delete all the emails that I was sending.

Using the beta is a great workaround… until someone needs a 3rd location, or a development server, or is a property manager, etc. etc.

+1 @ianj001. This is a legitimate need.

On android phones I think you can run dual apps using an app called parallel space. Also, but I not sure because I never tried, it might also be possible to run a second instance of an app from the secure folder on Samsung phones

I‘ve got the same need now. Is there a proper solution for this 2 yo request instead if installing stabke AND beta app?

Yes: Multi server support