Giter Site home page Giter Site logo

home-assistant / android Goto Github PK

View Code? Open in Web Editor NEW
2.3K 75.0 627.0 25.53 MB

:iphone: Home Assistant Companion for Android

Home Page: https://companion.home-assistant.io/

License: Apache License 2.0

Kotlin 99.88% Ruby 0.12%
kotlin home-assistant home-automation open-source-app android hacktoberfest

android's Introduction

Home Assistant Chat Status

Open source home automation that puts local control and privacy first. Powered by a worldwide community of tinkerers and DIY enthusiasts. Perfect to run on a Raspberry Pi or a local server.

Check out home-assistant.io for a demo, installation instructions, tutorials and documentation.

This is a project of the Open Home Foundation.

screenshot-states

Featured integrations

screenshot-integrations

The system is built using a modular approach so support for other devices or actions can be implemented easily. See also the section on architecture and the section on creating your own components.

If you run into issues while using Home Assistant or during development of a component, check the Home Assistant help section of our website for further help and information.

android's People

Contributors

alfiegerner avatar anyuta1166 avatar balloob avatar bramkragten avatar cedrickflocon avatar chriss158 avatar dependabot[bot] avatar dshokouhi avatar googlvalenzuela avatar homeassistant avatar jbassett avatar jpelgrom avatar kberstene avatar klejejs avatar lasserosenow avatar leroyboerefijn avatar marazmarci avatar neopilou avatar nickm-27 avatar notwoods avatar pdecat avatar robbiet480 avatar robomagus avatar roffild avatar runningcode avatar skechywolf avatar skynetua avatar timmo001 avatar uvjustin avatar vigonotion avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

android's Issues

Don't allow user to press back to log out

First off, this is great to see an official HA app. Well done! πŸ‘πŸ‘πŸ‘

I found that by pressing back too many times logged me out of HA. This is a UX bug. See #75.

No connection timeout if current instance url no longer reachable

I just managed to get a connection via my VPN to home. I disconnected the VPN and wanted to try my external host name and cannot get to the manual address screen now. It wants to continue using the manual ip address with the VPN connection.

Is there a way short of uninstalling the app and re-installing it to get a fresh line for a manual addition?

I do get a connection error that the web page is not available after a long delay.

Open external URLs in default browser

Would be good to perhaps get the app to open external links in the browser. I managed to get back to log in by pressing back which logged me out of HA :(.

This can be done by using shouldOverrideUrlLoading.

The only issue I can see about this is that there might be instances where you want authenticate using the HA OAuth for account linking or possibly other things.

Screen does not go to sleep if you have video stream showing

Hi,
When using this app, if I leave it on tab with video stream(live Picture glance entity ), screen does not turn off after expected inactivity.
When leaving in that state on web page view through any of web browsers this does not happen, screen turn off as expected.
Can you fix this?

Animated images doesn't show

In UI I have weather card with animated images used for current and forecasted conditions.
Those images do not load on same connection (internal and external) on which direct shortcut on Android work flawlessly.

I'm using latest firebase version (26).

Has a 'beta' channel been suggested for Google Play?

Might be nice to setup a beta channel for people to use with Google Play so that more people can test new changes without needing Android Studio or knowledge of building the app from scratch to test it as it develops.

Play Store - add instructions how to connect if scan doesn't work

Scan doesn't find the instance.
When I manually enter some URL (local network, duckdns, with or without port) nothing will be found, I get only error messages . This normally will result in a bad rating.
I suggest to add some more instructions how to use the app, what are the requirements for a successful scan, what to try if scan doesn't work.

Confirmation dialogs missing

Anything that requires a pop-up confirmation dialog (deleting things, restarting, etc) doesn't show up in the app and therefore cannot complete the intended action.

Color status bar according to hass theme

Android Status Bar color is defaulting to the colorPrimaryDark of the app theme. Looks like this is "hassio blue" which makes it ugly (see image).

  • Set android "colorPrimaryDark" to the corresponding color in the hassio theme (i think the top bar in hassio is colored by hassio theme "text-color"?

hassio

Tasker integration

Tasker is very popular and can be used to automate things on Android phones.

This app might have the same feature set in the future but in the mean time you could integrate with tasker.

Question - Ariela

Hey ho!

Out of Curiosity is there a reason you the official app developers are not working together with the Arieal App Developer? Was using the Ariela App for the longest, but since it's sadly only one developer, so progress can be kinda slow and its also not open source. So I will most likely switch to the official App for the above Reasons. But the Ariela app has some cool functions so it would be cool if both Apps got merged! :D

Home Assistant Android app can't connect to FQDN

@BRTPOB commented on Nov 15, 2019, 1:37 PM UTC:

Home Assistant release with the issue:
Android app 1.0.0

Last working Home Assistant release (if known):
N/A

Operating environment (Hass.io/Docker/Windows/etc.):
Android 9.0 Pie

Integration:
N/A

Description of problem:
When attempting to setup the HA Android App with my HA installation, I am unable to connect to my server using my FQDN that I setup for HA. I have to use my internal IP and port to get it to save and connect. This means that I'm unable to use the app to control my house from outside of my house, which seems like a missed or broken opportunity.

Problem-relevant configuration.yaml entries and (fill out even if it seems unimportant):
N/A
Traceback (if applicable):
N/A
Additional information:

This issue was moved by fabaff from home-assistant/home-assistant#28791.

Monitor battery status

Using the app as a kiosk, it will be handy to be able to monitor the status of the battery especially for those tablets that don't always stay attached to the wall and connected to a power source.

The Amazon Fire HD 7 (and probably few others) do not have the GPS module and applications like GPSLogger for logging the location and the battery can't properly work. A work-around I am using is by having a Fake GPS app running in background. Recently the tablet stopped sending messages to HA, don't understand why, therefore the battery status can't be tracked anymore.

The android app could solve this issue even though this means having it running in background. GPSLogger installed in my smartphone works great and the message with location and battery are sent every 15 minutes (take this as a little hint).

Thank you!

App crashes when server returns HTTP 502 response

I use a reverse proxy in front of my Home Assistant instance. When Home Assistant is not running, the reverse proxy returns a 502 status code. This is making the Home Assistant app crash. Instead, the app should not crash but simply show an error message.

Jackson-module-kotlin Android compatibility

According to this issue Jackson module kotlin 2.9.10 is only compatible with Android >= 24

Stack Trace

Fatal Exception: java.lang.NoSuchMethodError
No virtual method getAnnotationsByType(Ljava/lang/Class;)[Ljava/lang/annotation/Annotation; in class Ljava/lang/reflect/Method; or its super classes (declaration of 'java.lang.reflect.Method' appears in /system/framework/core-libart.jar)
com.fasterxml.jackson.module.kotlin.KotlinAnnotationIntrospector.isRequiredByAnnotation (KotlinAnnotationIntrospector.kt:61)
com.fasterxml.jackson.module.kotlin.KotlinAnnotationIntrospector.hasRequiredMarker (KotlinAnnotationIntrospector.kt:68)
com.fasterxml.jackson.module.kotlin.KotlinAnnotationIntrospector.access$hasRequiredMarker (KotlinAnnotationIntrospector.kt:23)

crash after logging in

When logging into my server manually (using https on a public nginx proxy server) the app crashes right after a successful login.

The page reloads as if to show my devices but then the app closes without a message right after loading in the blue header bar. Reopening the app looks like opening it the first time, nothing saved.

Device: OnePlus 7 with Android 10, rooted
Android System WebView 78.0.3904.108
Home Assistant App: 1.0.0
Home Assistant: 0.101.3

I have seen #32 but I do not think this applies here as no errors are logged. This is from my nginx access.log:

<MY_IP> - - [22/Nov/2019:02:41:43 +0100] "GET /auth/providers HTTP/2.0" 200 60 "https://<FQDN>/auth/authorize?response_type=code&client_id=https://home-assistant.io/android&redirect_uri=homeassistant://auth-callback" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:43 +0100] "POST /auth/login_flow HTTP/2.0" 200 173 "https://<FQDN>/auth/authorize?response_type=code&client_id=https://home-assistant.io/android&redirect_uri=homeassistant://auth-callback" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "POST /auth/login_flow/bb1092ff5e444c2e82dc32d6cf2476c2 HTTP/2.0" 200 182 "https://<FQDN>/auth/authorize?response_type=code&client_id=https://home-assistant.io/android&redirect_uri=homeassistant://auth-callback" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /?external_auth=1 HTTP/2.0" 200 1315 "-" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.c7b017ac9eca58717858.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.807c6f34c5c530f4cca6.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.458ea1d430f92886bbd0.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.64c373937461d7f4df1a.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.2695d3b011f65d298b38.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"
<MY_IP> - - [22/Nov/2019:02:41:56 +0100] "GET /frontend_latest/chunk.3a3de4e2d7b60783b7b2.js HTTP/2.0" 499 0 "https://<FQDN>/?external_auth=1" "Mozilla/5.0 (Linux; Android 10; GM1900 Build/QKQ1.190716.003; wv) AppleWebKit/537.36 (KHTML, like Gecko) Version/4.0 Chrome/78.0.3904.108 Mobile Safari/537.36"

Let me know if you need to know more

No way to change Home Assistant server address

Currently the only way to change the configured address of the Home Assistant server is to clear the app data or uninstall and reinstall the app. The app should provide a UI for changing the server address.

App not available at Play Store

When I search at Play Store, I can't find the app.
If I go through the link:

what I found is "This app is not avaliable":

If I look at the code (here and here), minsSdkVersion should be Android 5.0:

    defaultConfig {
        applicationId "io.homeassistant.companion.android"
        minSdkVersion 21
        targetSdkVersion 29
        versionCode "${System.env.VERSION_CODE ?: 1}".toInteger()
        versionName "1.0.0"
    }

My mobile phone is Android 6.0.1 (Cyanogen 13.1.2)

Why may the application not be available to me?

Thanks in advance.

Mobile Alarm Sensor

The mobile alarm time would be a great to have in home assistant! This works in other apps so should be possible for this app also.

Integration screen shows 2 devices under mobile_app

  1. Install latest firebase test app (22 or 23)
  2. Login to Home Assistant (latest version 0.102.1)
  3. Navigate to integration screen
  4. Select mobile app

There are 2 devices for my phone listed. One of which has not much data and the other shows the device_tracker entity (pending #8) as well as some blank automations.

expected: only 1 device should be shown

image

image

image

Android TV support

Hello, I would like to be able to install this on my nvidia shield.
Regards,

Suggestion: Make automatic deployment optional

As the name says. Building from source result in File google-services.json is missing from module
Would allow anyone to actually build the app.

For reference, I did:

diff --git a/app/build.gradle b/app/build.gradle
index a0470a3..e6e3bb2 100644
--- a/app/build.gradle
+++ b/app/build.gradle
@@ -1,7 +1,5 @@
 apply plugin: 'com.android.application'
 apply plugin: 'kotlin-android'
-apply plugin: 'com.google.firebase.appdistribution'
-apply plugin: 'com.github.triplet.play'

 buildscript {
     repositories {
@@ -9,8 +7,6 @@ buildscript {
         maven { url "https://plugins.gradle.org/m2/" }
     }
     dependencies {
-        classpath 'com.google.firebase:firebase-appdistribution-gradle:1.1.0'
-        classpath 'com.github.triplet.gradle:play-publisher:2.5.0'
     }
 }

@@ -25,11 +21,6 @@ android {
         versionName "1.0.0"
     }

-    firebaseAppDistribution {
-        serviceCredentialsFile = "firebaseAppDistributionServiceCredentialsFile.json"
-        releaseNotesFile = "CHANGES.md"
-    }
-
     signingConfigs {
         release {
             storeFile file('release_keystore.keystore')
@@ -51,10 +42,6 @@ android {
     }
 }

-play {
-    serviceAccountCredentials = file("playStorePublishServiceCredentialsFile.json")
-}
-
 dependencies {
     implementation "org.jetbrains.kotlin:kotlin-stdlib-jdk7:$kotlin_version"
     implementation "androidx.appcompat:appcompat:1.1.0"
@@ -65,4 +52,3 @@ dependencies {
     implementation "com.squareup.retrofit2:converter-jackson:2.6.2"
 }

-apply plugin: 'com.google.gms.google-services'
\ No newline at end of file
diff --git a/build.gradle b/build.gradle
index 8f9f658..293ca40 100644
--- a/build.gradle
+++ b/build.gradle
@@ -8,7 +8,6 @@ buildscript {
     dependencies {
         classpath 'com.android.tools.build:gradle:3.5.1'
         classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
-        classpath 'com.google.gms:google-services:4.3.2'
     }
 }

Pull to Refresh

The Home Assistant PWA, when used in Chrome for Android, supports pull to refresh. I frequently use this to get Home Assistant working again when it loses its connection to the server. It would be nice if the Android app had this feature too.

Unable to connect to HA instance

Hello,
I installed the app, and am now unable to connect to my instance.
In the connection setting tab, I put the ip of my instance. I only use HA on local network, with no ssl, on standard port.

When connecting to @ip:8123 I reach the credential page, but then it loops back to credential part. Connecting to other port doesn't work.

I'm using Huawei and android 8.

Any guess? Or any information I can provide?

Accept self-signed SSL certificate issued by a non-public CA

I'm using my own CA to sign my home-assistant (and other) SSL certificates. This CA is imported in the androids user "trusted credentials". This works perfect for home assistant via Chrome and other services I use - like nextcloud and their app.

As far as I understand the support of user "trusted credentials" CAs needs to be enabled in the apps security policy:
https://developer.android.com/training/articles/security-config.html

The nextcloud Android App is a working example.

Thx!

Rotating the device will reload the interface

When rotating the device, Home Assistant for Android will reload the whole interface and return to the home view.
Expected behavior is to rotate the page to landscape mode.
It would also be natural to show cameras in full screen if the UI is currently displaying a more info dialog for one.

Add push notifications support

The mobile app integration has support for push notifications. This allows this app to register as a target. To do so, we should set push_token and push_url during the mobile app registration from #5 (docs). We can use the same one as iOS.

@robbiet480 could you briefly explain how to get push_token and push_url?

Firebase App Distribution Release Note

Improve firebase app distribution release note
For Now =>

[CI] Travis with Firebase App Distribution (#11) app build.gradle CLA.md CODE_OF_CONDUCT.md gradle gradle.properties gradlew gradlew.bat LICENSE.md README.md serviceCredentialsFile.json settings.gradle travis Setup travis ci with Firebase App Distribution
app build.gradle CLA.md CODE_OF_CONDUCT.md gradle gradle.properties gradlew gradlew.bat LICENSE.md README.md serviceCredentialsFile.json settings.gradle travis Encrypt google-services.json and serviceCredentialsFile.json into a tar

Add localizations

App already looks great πŸŽ‰
but it needs to support multiple languages.
Other projects already use lokalise.com, so I think the next step is to create a community-driven project that will allow us to help with translation.

Automatic Switch Between Local/Internet server

Thanks for this great job.
One of the important request Is:
Switching from local address when over home wifi
And on internet access when outsider home.
I Hope soon ☺️ thanks

App crashes if logged in but refresh token revoked on the server side

Hi there,

I might have found a bug or "missbehaviour" on the Android App.

I was cleaning up the "Refresh Tokens" list and doing that I also removed the one for the Android App.

What I noticed from that is that my Chrome Home linked site was banned right after and once the ban was removed I was able to login again.

On the Android App it doesn't open anymore, or to better say, it does open but it crash right after.

I am about to send the feedback via phone and I will add in the description this GitHub ticket number to give some background information.

I am running HA in Python Env on the latest stable version 0.102.2 on an Intel NUC with CentOS 7

Hope it helps :)
Cheers
Andrea

App crashes when certificate has expired

I just noticed that the app crashes immediately when the certificate has expired.
After crashing a few times I got an option to send feedback but I couldn't copy the stack trace. It said something about: CertPathValidatorException: Trust anchor for certification path not found.

I sent the feedback but don't know if it goes to you or Google.

Getting an error message in the app would be preferred.

Edit:
Attaching screenshot of stack trace.
Screenshot_20191130-132922

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.