Have two different locations in openhab with different UI,

Hello,

This is a variant of the already talked Openhab two locations.
I’ve currently had a one location setup, that I would like to divide in two logical separate entities.

This is because we have project to rent a subpart of our house as independent apartment, but still want to give access to Openhab to future resident. But at the same time, we don’t want to handle conflicts between the two locations. For example, if I say “turn all of light” to my google, I want to only apply this to my own apartment.

One obvious solution would be to create a second separate Openhab instance for this apartment, an move the items dedicated to this apartment to the new instance. Of course, it would also need to duplicate things between instance like the Knx gateway device / ZigBee bridge / and others.

I was asking myself is there is other way to do this in Openhab. The Idea would be to create two high level locations in the semantic model “appartment1” & “appartment2”.

And then attach different users to this location, so we will have specific UI for different user.
I don’t think it’s currently possible with current Openhab version, but if someone can confirm about
this.

Thanks,
Laurent.

Well you can have separate UI pages and different sitemaps.
Voice control and “all” type commands are nasty because Google cannot know about your artificial custom separation and you cannot tell it. Alexa et al also often misunderstand or select wrong devices.
I’d avoid using ‘all’ commands altogether.

If you want to be on the safe side, use two instances. You can share things and items using the remote binding.

1 Like

Yes, you can have different UI pages.
But i’m not sure you will be abl

I’ve find that for UI pages, you can add additional user to openhab installation with different user role. And then add a filter on the page using the directive visibleTo inside the page config.

config:
label: Terasse Details
visibleTo:
- role:role1

This will potentially enable to have two different set of pages (and menu) for differents user roles.
But this is not perfect, the visibleTo directive seems to be not apply when you use a tabbed view (bugs ?).

And it will of course not create a full logical division.

@mstormi :

About the google home stuff, I’m happily using the “all” keywork on regular basic.
This is a convenient way to close all my roller shutter in house at night “hey google, close all the rollershutter”. Or when I leave home, to turn all of the light “hey google, turn of all the light”.

At the opposite, I’ve got multiple google home inside my home, and when I use simple order like “turn the light off”, it’s done a good job mapping the room the google home is inside, and turning only off the light of that room.

But I’m not very sure what happens if you have two locations inside google home. You can defined multiple home in google home, and you will have a home selector on the top of the application for each location.

Now, I don’t really know how it’s handle, but I think if will restrict global action to the current selected location as items in google home is attached to a location. Will have to do some test on this.

Laurent

Hum, not perfect also on google side.
I’ve made the test as I’m currently in my secondary house.

If I ask google to “turn all the light”, it turn off only the five light associate with my secondary house.

But If I ask google about items that exists only in primary house, like “close all the rollershutter”, or “what is the temperature in kitchen”, it answer using items in the primary house as if they where exist in the secondary house :frowning:

Laurent

1 Like

So I think I will go to a dedicated instance for now, will be better.

Thanks,
Laurent.

Here’s another perspective. Just don’t.

As big a fan as I am of home automation, I absolutely wouldn’t want to be on the hook for things to keep running for a tenant. Bindings to 3rd party services break due to changes outside your control. Sometimes there is a workaround, sometimes not. And true home automation (not just controlling your lights with your voice) changes and has to adapt to changes in your lives and schedules. Are you going to be doing that for your tenant?

Depends. If it’s remote control only without automation, like in a hotel, eat or die, and devices already are there, why not, you can even charge for it.
I’m of course talking about strictly stripped-down access so your renter can only access stuff in the apartment.
At the very least it’s okay to make that user accessible to him, it doesn’t mean to automate ‘his’ life. Be careful though when (s)he starts asking for that :slight_smile:

Honestly, I would not like my landlord to be able to see in any log files what I am doing in my rooms…

Your comment doesn’t make sense.
Your landlord is providing that system so of course he will have access no matter what.

Technically, you are correct.
My point was more: does the tenant know that the landlord has access to this kind of data, and did agree to that?

It’s an obviousness to anybody including tenants that the owner of such a system has this kind of access, isn’t it.
Particularly so as he will be explaining usage of the system to the tenant (that’s what this thread is about, providing a tenant UI). So by using it, the tenant implicitly agrees.