Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for control 2 Home Assistance #296

Closed
ghost opened this issue Jan 23, 2020 · 37 comments · Fixed by #3332
Closed

Support for control 2 Home Assistance #296

ghost opened this issue Jan 23, 2020 · 37 comments · Fixed by #3332
Labels
enhancement New feature or request

Comments

@ghost
Copy link

ghost commented Jan 23, 2020

Hi
Is any chance to add support for two instance Home Assistant on other address ?

@dshokouhi
Copy link
Member

Even better if it can handle one of those instances being down usually like a dev instance

@jes1417
Copy link

jes1417 commented Jan 23, 2020

I was hoping for this as well, in my use case I have an instance at home and at work and I wanted to control both of them. I ended up getting this working by setting up a work profile on my phone which allowss me to have separate apps, works perfectly!

@balloob
Copy link
Member

balloob commented Jan 23, 2020

We are still working on building out basic functionality of the app, so this is not on the roadmap. Once we feel like we're in a good place we would gladly accept a pull request!

@balloob balloob closed this as completed Jan 23, 2020
@tescher
Copy link

tescher commented Apr 16, 2020

I'd like to give a +1 for this enhancement also.

@mishoco
Copy link

mishoco commented Sep 27, 2020

This is a very important feature... any update for this?

@T-bond
Copy link
Contributor

T-bond commented Oct 28, 2020

If anybody like me on a Samsung phone without multiple profiles:
You can use GPlay and F-Droid to install 2 instances (F-Droid is only the minimal favour)
(Or maybe use Secure Folder)

I hope this can get implemented in the near future, as I can't think about anything missing, other than this.
So thank you everybody who worked on this project!

@balloob may I ask you, is the project reached into a state to allow pull request for this? Or is there an estimate for it?
Thank you, very much!

@teras
Copy link

teras commented Nov 16, 2020

Hello.
I think the problem is not solved like this.
With two instances we have two notifications, double resources and the auto-update is a problem especially with f-droid. And what if I need three or more instances?

I strongly believe that this issue should be reopened. The similar iOS issue is still pending 😬

@albalaing
Copy link

I have three installations and I have the same problem. Please, I could use it very well if you open the topic

@balazs111
Copy link

Similar issue here. Already has 2 system and the third is coming.

@robbiet480
Copy link
Member

Hey all, I ran a poll on our Twitter account this week trying to determine how many people actually have multiple instances. Based on the results of the poll we (@JBassett, @dshokouhi and 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 developers 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 Justin and others) 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.

@tescher
Copy link

tescher commented Mar 5, 2021

Twitter poll? Who here monitors the HA Twitter feed?

@robbiet480
Copy link
Member

You’re right that I failed to alert this issue when I posted the poll, I’m sorry for that. I did alert the same issue in the iOS repo. The poll had 2232 respondents which I think is a good sample size. You can see results and comments here.

@teras
Copy link

teras commented Mar 6, 2021

With all my respect, having an Android-related poll on a iOS-related group is not a match. Also let's make a poll to see how many people prefer HA instead of Google Home or whatever. Is this the correct spirit?

Moreover this issue is not solved - thus it shouldn't be closed.

@olylak
Copy link

olylak commented Mar 23, 2021

+1

@wabbastang
Copy link

Seems odd how much talk there is around this on iOS but not much on Android. Definitely a worthwhile feature; obviously it's a select group that runs multiple servers but I think if the ability was there at the top level there would be more utilization. I used to run a dev server to sandbox in, but was such an inconvenience that gave it up. Now have two physical locations and just doesn't play well.

@ocalvo
Copy link

ocalvo commented Apr 23, 2021

Hey all, I ran a poll on our Twitter account this week trying to determine how many people actually have multiple instances. Based on the results of the poll we (@JBassett, @dshokouhi and 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 developers 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 Justin and others) 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.

Hello. Up until now I have been running only one instance, but this year we are building a new vacation home in Costa Rica.

I have some experience with Android development and I would love the challenge add support for multiple homes to the Android home.

I will start by setting my developer environment.

@dshokouhi
Copy link
Member

Hello. Up until now I have been running only one instance, but this year we are building a new vacation home in Costa Rica.

I have some experience with Android development and I would love the challenge add support for multiple homes to the Android home.

I will start by setting my developer environment.

Thats excellent news and congrats on the new vacation home! If you have any questions or need any help don't hesitate to ask us on discord in #devs_mobile_app

@rhinot
Copy link

rhinot commented Nov 4, 2021

Hey all, I ran a poll on our Twitter account this week trying to determine how many people actually have multiple instances. Based on the results of the poll we (@JBassett, @dshokouhi and 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 developers 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 Justin and others) 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.

@robbiet480 Thanks for being transparent and engaging here.

Reading through the comments of the twitter poll, it seems there are two main categories of users with 2+ HA instances:

  1. Devs hacking around things that may not currently work for them in HA (examples: services needing multiple accounts, extending range of ZigBee, testing services before deploying them)
  2. Users with multiple locations

For the second case, I wonder if the use cases can be further broken out, and perhaps there is a primary use case which is much less work to implement & maintain.

For example, could it be that most users who have HAs in multiple locations really just need location reported to multiple HAs? The use case being that their HAs can respond to where they are in concert. Let's say such a user is en route to their parents home, a winter cottage, or work from where they live. They'd like their home to go into away mode and their parents home/winter cottage/work to switch to home/present mode without manually switching URLs & accounts on their mobile app.

If this is a primary use case, there may be simpler solutions than allowing users to switch between instances on the fly:

  • Pushing location to a list of HA servers provided in app
  • Allowing HA instances to push location to other HA instances

I originally thought the first option was already possible when I first read this line in the location docs:

location data is sent directly from your phone to your Home Assistant instances

The first option seems simpler, although (after a quick glance through the repo) I couldn't find the code that is responsible for pushing location data to an HA instance to see how simple this actually is. Also, home-assistant/iOS#161 (comment) makes me believe it may not be as easy as anticipated, but perhaps I'm misreading.

Nonetheless, sharing this with you as you may:
a) Want to further understand the use cases behind this request to see if one will solve most requesters primary need
b) See an even simpler solution than those outlined here (assuming my example primary use case is correct)

Also, if it's helpful, I can file a separate enhancement request to push user location to multiple HAs with the detail here. I held off as I wasn't sure if that would just get rolled back into this request. LMK.

Hope this helps.

@albalaing
Copy link

What is your twitter account?

@tescher
Copy link

tescher commented Nov 4, 2021

@albalaing that was an issue - it wasn't really announced so not sure how it could be considered a useful poll

@rhinot - Thanks, that would be useful, but would only solve a tiny part of my use case. I can get presence other ways, such as router IP address detection. What I really need is a way to switch easily between my 3 instances on my phone for general usage.

@Vinndimon
Copy link

So... The iOS version now supports multiple servers. What about Android?

@JBassett
Copy link
Collaborator

I'll say this, we are working towards being able to support multiple instances but we still have a long way to go. Like Zac said for iOS it was basically touching every aspect of the app. The same applies to us. For now we can reopen this ticket, but I wouldn't expect results tangible results in the near term, still a lot to do in the background to get ready for this.

@JBassett JBassett reopened this Dec 19, 2021
@jkrenzer
Copy link

Thanks, @JBassett . Maybe a good approach would be identifying the tasks and breaking the work into adoptable chunks so people without insight into the complete app structure could contribute, too.

@skylord123
Copy link

If you need another HA instance without all the stuff the companion app adds you can just add the other locations to home screen from the web browser on Android.

I have my home's HA on the app and my work's HA running through the web-browser just added to my home screen. Works great (and was how apps were supposed to function but blame Google and Apple for going the monetary route with app stores and severely limiting PWA functionality).

You could also use AppCloner to duplicate the app. I use this already for my Riot/Matrix chat server (since I have one for work and one for home).

@ctml91
Copy link

ctml91 commented Jan 9, 2022

Subscribing for updates on this one =)

@VaR63
Copy link

VaR63 commented Jan 14, 2022

I am only writing to report that some friends and I also need to use 2 HA instances with the Android app.
I hope the implementation will be considered.

@advorsky73
Copy link

More than one HA instance does make sense if you own multiple homes/houses or maintain the ones from your family.
I would really like to see that feature as I am maintaining 2 instances already and this number could raise to 3 in the near future...

@tescher
Copy link

tescher commented Jan 18, 2022

More than one HA instance does make sense if you own multiple homes/houses or maintain the ones from your family. I would really like to see that feature as I am maintaining 2 instances already and this number could raise to 3 in the near future...

That's exactly my use case. I have 3.

@makidoll
Copy link

I just set up my second home on my iPhone and my spouse can't on her Pixel. I hope this gets added soon, same 3 finger swipe gesture as on iOS.

@bojanpotocnik
Copy link

On Android, you can use two instances by utilising the Work profile - you install the app under work profile and it gets separate data storage, allowing you to manage separate instance. Works for me perfectly for the last year.
Screenshot_20220119-095600_One UI Home

Of course this is only a hack/workaround for our needs here, and it cannot work for more than 2 instances.

@VaR63
Copy link

VaR63 commented Jan 19, 2022

Thank you, I will try it.

@teras
Copy link

teras commented Jan 19, 2022

On Android, you can use two instances by utilising the Work profile -

Unfortunately my Samsung phone doesn't provide this functionality. I've seen some Xiaomi phones who do this. Samsung reserves this only for communication apps, like Whatsapp and Viber

@ctml91
Copy link

ctml91 commented Jan 19, 2022

My work profile has restrictions (from my work), so it's not an option. It's similar to the app cloning but at the end of the day it is still just a work around and poor UX. However as the devs said a lot of refactoring is required to support this change natively in the app but it sounds like it's on the roadmap, fingers crossed it comes sooner than later 😃

@advorsky73
Copy link

same here, work profile is not an option. fingers crossed it will be created soon

@dshokouhi
Copy link
Member

Guys while I appreciate everyone here is excited for this feature to get added to the android app lets not turn this issue into a massive support thread for all the workarounds. These are not specific to the app and are more a general android thing. If you want to continue this discussion please move it to the forums so we can reduce the chatter here.

There is a lot of work to be done for this feature and its going to take us sometime. In fact we know that some users asked us to help break up what needs to happen but in all honesty its a task within itself to document what needs to happen.

At the moment all authentication is stored in local storage so to start with we need to first migrate storing the tokens, URLs etc.. in the database so later on we can add the additional servers and UI. This involves touching every aspect of the app. We have to consider how it will work with Widgets, Notifications, Android Power Menu etc.. there is a lot to consider. For anyone who wants to get started please join us on discord in #devs_mobile_apps and we can have a more open discussion about what the first step would be.

@T-bond
Copy link
Contributor

T-bond commented Jan 19, 2022

Please everyone stop spamming the thread.

Use reactions to say that you want this feature. Use the subscribe button to get notifications about updates, and stop spamming more than 23 people. Thank you.

@teras if you would read the whole thread, you would see that I described a method how you can install 4 seperate instances on Samsung devices.
Samsung DOES support this, with Secure folder, also there is 2 Home Assistant version available on two stores with different application id.

@dshokouhi can you somehow lock the topic? I think there is an option on GitHub for only allow collaborators to comment on this issue. (Unfortunately it locks reactions too)
I would like to get notified about this issue changes, but not about everybody just commenting something random here.

@home-assistant home-assistant locked and limited conversation to collaborators Jan 19, 2022
@jpelgrom jpelgrom linked a pull request Feb 12, 2023 that will close this issue
@jpelgrom
Copy link
Member

jpelgrom commented Feb 13, 2023

Hi all,

Support for multiple servers is hopefully coming soon to the Android app :) I have submitted a pull request with a first version of the feature, so please make sure to read the description and documentation updates to understand what is and isn't supported at this point.

If you'd like to test before multiserver support is included in the beta, great! Log in to your GitHub account, download the artifact file from here, unzip it to get the apk file, and install it on your device. The full flavor offers support for location tracking. The test version will install alongside the existing version of the app but only supports push notifications using a persistent connection, which may increase battery usage. If you encounter crashes, bugs or other weirdness, let me know via a comment on the pull request linked above this comment.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.