home-assistant / iOS

:iphone: Home Assistant for Apple platforms
https://companion.home-assistant.io
Other
1.57k stars 304 forks source link

Accommodate multiple instances of Home Assistant from the app. #161

Closed swperic closed 3 years ago

swperic commented 6 years ago

Accommodate multiple instances of Home Assistant from the app. It would be great to be able to save multiple URLs for Home, Office, Studio and be able to get notifications from all that are "enabled". I love the iOS app!

ps. sorry I cant figure out how to tag this as a feature request

jrb80 commented 4 years ago

+1

HA app must be able to support multiple homes. The "modern" family is not based at a single home location. Multiple home support is already widely available in other integration and home automation platforms.

hairychris commented 4 years ago

Can we please use the emoji replies for +1s. We should only comment here if we have specific suggestions or questions.

castorw commented 4 years ago

Hey @robbiet480 and everybody else involved,

is anybody addressing this? If there isn’t currently WIP on this issue I may try to take a look at this and possibly produce a PR, since its the only issue preventing me from deploying HA widely at all my locations.

robbiet480 commented 4 years ago

Hey @robbiet480 and everybody else involved,

is anybody addressing this? If there isn’t currently WIP on this issue I may try to take a look at this and possibly produce a PR, since its the only issue preventing me from deploying HA widely at all my locations.

@zacwest discussed working on this this year, unsure where his head is at.

zacwest commented 4 years ago

I'm planning on taking a stab at it in the near future, but it's going to be a pretty substantial change. We need a lot of new UI (how do you switch between instances?), error handling (what happens if a webhook to 1 fails, but the other is fine?), storage (how do things like notification categories work when multiple servers can define it? what if there's conflicts?), etc. If you are looking to contribute to make changes for this, it would be best to break it into smaller PRs, and talk over the meta-plan in Discord.

mishoco commented 4 years ago

Many mobile apps for home automation now supports multi homes like ewelink and tuya... Is it a big effort to just ask for the instance you want to connect to whenever the app first load?

Please this is a very important feature and might be a reason for me to drop HA and move into another platform.

castorw commented 4 years ago

@zacwest Hi there, would you get a chance to point me in the right direction with dev env setup? I am constantly getting "No such module" errors and I am unable to perform a single build. I don't want to mess with package management / dependency configuration either.

Could we connect via Discord or any other platform so we don't spam this with irrelevant posts?

SeanPM5 commented 4 years ago

@castorw the #devs_mobile_apps channel in the Home Assistant Discord server is perfect for those types of questions.

GazTheGeek commented 3 years ago

+1 vote from me too. I have 2 houses with HA. If the app could switch between them while still receiving notifications from both - that would be perfect. I would pay for that app.

swissMack commented 3 years ago

+1 from me, I have 3 separate locations running HA

ydeschoe commented 3 years ago

+1 from me, 2 locations running HA

zilogZ80 commented 3 years ago

+1 from me, HA is so useful this is a must have feature which will benefit a lot of people (home + work, holiday home, elderly parents home etc etc)

noerrra commented 3 years ago

+1 Ditto, two locations on HA. Would love to have both in single app!

jorns73 commented 3 years ago

+1 yes, have HA running several places

miljume commented 3 years ago

I also really would like this feature!

rippleglass commented 3 years ago

+1 for me, would be an awesome feature.

tanbronson commented 3 years ago

+1 for me. My SO and I both have our own house, and I tend to help our my neighbors, so this would really, really help!

Mariusthvdb commented 3 years ago

+3 here, running 3 instances in the same location, production system and 2 dedicated instances for MQTT and zwave

alphatsui commented 3 years ago

second on this

floodwayprintco commented 3 years ago

Dang it, I was hoping this would be a lot simpler too, so put me on the list! Would love to see this as a feature.

LoneWolf345 commented 3 years ago

+1 from me, 3 locations running HA

bkvargyas commented 3 years ago

Need this feature! Ideally, based on which WiFi network you connect to, it will switch to a different instance for login. I'm using one for business and have two more instances at two other properties. The business we use NFC for door access control (or will shortly).

ccsliinc commented 3 years ago

+1 from me, 3 locations running HA

jrb80 commented 3 years ago

@zacwest How difficult would it be to add a simple drop down menu or switch to change the home location/instance? The manual method is somewhat cumbersome as the configuration item is buried in the menus and only supports free text. I think a minor enhancement in switching the "saved location" path would solve this issue.

=> App Configuration => Home Assistant URL => HTTP path

I think everyone is overthinking this issue too much as the solution is already there, it just needs a slicker way of changing the Home Assistant URL.

buzzdev commented 3 years ago

+100 -> simple instance switching would be enough, please.

jrb80 commented 3 years ago

+100 -> simple instance switching would be enough, please.

Yes, I was thinking of a simple Badge that could be clicked that exposes the list of available "homes" as done in Google Home (see image). I would have thought it's a simple frontend change. The caveat is that only one (1) home instance is connected at any given time, fair compromise in my opinion. @zacwest what are your thoughts?

GA

floodwayprintco commented 3 years ago

@jrb80 that would be perfect, thanks for creating an example! I think the tradeoff of one instance would be fine. Enough to gauge interest at least but definitely enough for my needs.

ccsliinc commented 3 years ago

My only concern is the phone data being pushed to all the instances(like gps), as well as getting notifications from each instance.

bkvargyas commented 3 years ago

I would only expect whichever instance is currently selected is the one that is being used for data and notifications.

holman commented 3 years ago

I'd expect the opposite. If I'm at one site, I still want to receive notifications from the other and vice versa. I've gotten by with having one app and one web view, but that means I forfeit any type of real interactivity I have with the web view'd site because I miss out on notifications, location tracking, NFC tags, and so on.

bkvargyas commented 3 years ago

I agree that having notifications from all instances would be great in an ideal situation --- I'm just thinking from a logical programming perspective in what's involved in getting this function to actually work and initially implemented. A simple switcher would be a great step 1. Anything beyond that seems to lend itself to a cloud based application where your device will receive notifications from a single source that's connected to all the remote instances as well as feeding location data, etc back. From a business perspective, this could be an opportunity for the nuba casa? team to add in the advanced functions into their cloud system while keeping a simple switcher in the app for those that don't want cloud functions.

jrb80 commented 3 years ago

@holman we all want utopia but it's unrealistic to expect this on day one. Let's start small and build on that.

derekatkins commented 3 years ago

IMHO a first pass is just being able to select between multiple HA instances, but only be connected to one-at-a-time. I think this is similar to what @jrb80 suggested above. The dialog can raise either at app start or via a manual user request. When the user selects HomeA vs HomeB, the app is fully connected to there. I believe that would certainly solve the issue for many users. Obviously it would not solve the issue for all users, and that's okay. Adding multiple background connections to multiple HA instances could be a next step. But IMHO the first step is being able to store multiple connection data (and tokens) and be able to switch between them by the push of a button. Thanks for listening!

jrb80 commented 3 years ago

@derekatkins well articulated, I agree 100%

Redebo commented 3 years ago

Adding my vote to only have a “selector switch” that’s let’s me pick Home A or Home B. I don’t need cross server notifications.

turshija commented 3 years ago

I would also be fine with a "selector switch" to switch between currently active HA instance.

noerrra commented 3 years ago

Simple switcher between active instance (notifications, ui) would be sufficient. As for mobile data being logged by HA - maybe a Primary instance could be marked. This way all mobile data is synced with primary not currently selected/active instance. Thoughts?

Redebo commented 3 years ago

Personally, I'm not using the built-in notify service for notifications through the HA application. I'm using a MMS text group to hit members of my family (Leak detected! Fridge door open!). So, I don't care if I can't use HA notifications from the app at all. :)

renhardy commented 3 years ago

Just a selector switch would be fine.

On Tue, Feb 16, 2021 at 2:24 PM Redebo notifications@github.com wrote:

Personally, I'm not using the built-in notify service for notifications through the HA application. I'm using a MMS text group to hit members of my family (Leak detected! Fridge door open!). So, I don't care if I can't use HA notifications from the app at all. :)

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/iOS/issues/161#issuecomment-780063528, or unsubscribe https://github.com/notifications/unsubscribe-auth/AOV7UMATUQNMKZNZY7OD75LS7LA6XANCNFSM4FZJGFKQ .

0n3man commented 3 years ago

Ability to access multiple instances would be wonderful as I have multiple family members with HA setups. Ideally I could select a location should an alarm go off. I receive notifications outside the app via sms or email. Likewise when in the area of a specific house it would be great if it prioritized which location was presented based on my physical location. I'd still want the option to select a different location since I might be monitoring a house in a different location.

robbiet480 commented 3 years ago

Please vote on this Twitter poll

JasonRS1969 commented 3 years ago

Not on twitter.

2 instances with 2 homes.

heron65 commented 3 years ago

Even the Vera Mobile App has this. I can select different vera hubs in their mobile app. I currently have 3 vera hubs that I have to support. Would like to replace them with HA installations, and need to be able to select which HA I am looking at in my "overview". I do not want to create one combined virtual "Overview" in lovelace across three physical HA installations in different locations.

robbiet480 commented 3 years ago

Based on the results of the poll I still feel that there’s not enough people who would benefit from the immense effort it would take to rework the app core to support multiple instances vs the effort is takes for @zacwest to keep adding features and fixing things.

As I’ve said before, if a developer came along that wanted to add this functionality (in concert with Zac and myself) and was willing to maintain it, we’d be open to that. But for now, there’s far more people who benefit from incremental changes than dropping everything to support a small but vocal minority.

Sorry y’all. Will revisit this again in the future.

floodwayprintco commented 3 years ago

Hard disagree. I feel that there are more than enough people who would benefit.

15% of users are using multiple instances - I'm just guessing, but there's gotta be core features that less than 15% of people users take advantage of.

Not to mention, your twitter poll was a limited time. It did capture a lot of votes but it's a small percentage of the total users.

Further, maybe people don't have more than one instance because the functionality doesn't really exist...

Do you think the results would be different if you asked if people would benefit from the feature? The number of instances people run today seems relevant but doesn't seem to be an accurate measure of the need for the feature.

--

Cory Beal

He/HimProduction Manager @ Floodway Print Company LTD.

https://floodwayprintco.com/

On Fri, Mar 5, 2021 at 5:25 PM Robbie Trencheny notifications@github.com wrote:

Based on the results of the poll I still feel that there’s not enough people who would benefit from the immense effort it would take to rework the app core to support multiple instances vs the effort is takes for @zacwest https://github.com/zacwest to keep adding features and fixing things.

As I’ve said before, if a developer came along that wanted to add this functionality (in concert with Zac and myself) and was willing to maintain it, we’d be open to that. But for now, there’s far more people who benefit from incremental changes than dropping everything to support a small but vocal minority.

Sorry y’all. Will revisit this again in the future.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/iOS/issues/161#issuecomment-791786035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3B6MYCZLED3ONXCO5NRKLTCFR7DANCNFSM4FZJGFKQ .

Redebo commented 3 years ago

All I'm looking to do is be able to tell the HA app which of my HA instances to log into. I don't need cross-platform, create an automation in one place that works in another-type functionality.

Right now I use the HA app for my main house, and a mobile web browser for my other instance and it sucks. Just have the HA app ask me which instance I want to sign into and we're done.

jrb80 commented 3 years ago

All I'm looking to do is be able to tell the HA app which of my HA instances to log into. I don't need cross-platform, create an automation in one place that works in another-type functionality.

Right now I use the HA app for my main house, and a mobile web browser for my other instance and it sucks. Just have the HA app ask me which instance I want to sign into and we're done.

Totally agree! How difficult could it be to create a simple frontend switcher or popup chooser! Completely bemused.

floodwayprintco commented 3 years ago

Just curious now, what type of response to that poll would shift this into priority if 15% is not enough?

--

Cory Beal

He/HimProduction Manager @ Floodway Print Company LTD.

https://floodwayprintco.com/

On Fri, Mar 5, 2021 at 5:25 PM Robbie Trencheny notifications@github.com wrote:

Based on the results of the poll I still feel that there’s not enough people who would benefit from the immense effort it would take to rework the app core to support multiple instances vs the effort is takes for @zacwest https://github.com/zacwest to keep adding features and fixing things.

As I’ve said before, if a developer came along that wanted to add this functionality (in concert with Zac and myself) and was willing to maintain it, we’d be open to that. But for now, there’s far more people who benefit from incremental changes than dropping everything to support a small but vocal minority.

Sorry y’all. Will revisit this again in the future.

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/home-assistant/iOS/issues/161#issuecomment-791786035, or unsubscribe https://github.com/notifications/unsubscribe-auth/AM3B6MYCZLED3ONXCO5NRKLTCFR7DANCNFSM4FZJGFKQ .

ericreich commented 3 years ago

I also disagree. I am also not on Twitter. It does not need full functionality, just a way to flip from a primary to a secondary home assistant.

But I have resolved this by using 2 Nabu Casa accounts and bookmarks to the separate instances. Costs only $5 per account per month.

robbiet480 commented 3 years ago

All I'm looking to do is be able to tell the HA app which of my HA instances to log into. I don't need cross-platform, create an automation in one place that works in another-type functionality. Right now I use the HA app for my main house, and a mobile web browser for my other instance and it sucks. Just have the HA app ask me which instance I want to sign into and we're done.

Totally agree! How difficult could it be to create a simple frontend switcher or popup chooser! Completely bemused.

While that sounds simple, the reality is that there’s behind the scenes work going on between the app and the frontend. We reuse the front ends WebSocket connection for a lot of data transfer. If that connection is severed (by switching to another web view), no more data transfer is possible. So now, to keep that going, we need to both migrate away from reusing the frontend WebSocket but also figure out how to route data to the right place at the right time. This doesn’t even cover how we figure out what to do about notifications... how do we know where to route a button press back or which instance to stream a camera from in a notification.