• Stars
    star
    2,055
  • Rank 21,641 (Top 0.5 %)
  • Language
    Kotlin
  • License
    Apache License 2.0
  • Created about 5 years ago
  • Updated 15 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

πŸ“± Home Assistant Companion for Android

πŸ“± Home Assistant Companion for Android Beta Deploy

Documentation

If you are looking for documentation around the companion applications check out the Home Assistant Companion Documentation. This will provide you instructions on using the applications.

Setup App Development Environment

  1. Download and install Android Studio

  2. Download / clone this repository to a folder on your computer

  3. Create a Firebase project at Firebase Console

  4. Create four Android apps, with following package names

  • io.homeassistant.companion.android
  • io.homeassistant.companion.android.debug
  • io.homeassistant.companion.android.minimal
  • io.homeassistant.companion.android.minimal.debug
  1. Now download the google-services.json file and put it in the home-assistant-Android/app and home-assistant-Android/wear folder. This file contains the configuration of the whole project (all four applications). (You can also use the mock services file instead of generating your own. The file should contain client IDs for all packages listed above for debugging to work properly. If you do not generate your own file FCM push notification will never work, only websocket notifications will)
  2. Start Android Studio, open your source code folder and check if the Gradle build will be successful using Build/Make Module "App". You might have to install the right Android SDK via Tools/SDK Manager first.
  3. Run gradlew assembleDebug to build all debug versions, this might take a while.
  4. If the build is successful, you can run the app by doing the following: click Run -> Run 'app'.
  5. Connect your phone or create a new virtual device following on screen instruction
  6. πŸŽ‰

If you get stuck while setting up your own environment, you can ask questions in the #devs_mobile_apps channel on Discord.

Push Notifications

If you want to work on push notifications or use a development build with push notifications, please go the server side code HERE and deploy it to your firebase project. Once you have your androidV1 URL to the deployed service, set it in to your ${GRADLE_USER_HOME}/gradle.properties file, e.g.:

homeAssistantAndroidPushUrl=https://mydomain.cloudfunctions.net/androidV1

You can also define the rate limit function URL, e.g.:

homeAssistantAndroidRateLimitUrl=https://mydomain.cloudfunctions.net/checkRateLimits

App Flavors

The Android app has both a full flavor that uses Google Play Services to offer features like location tracking and notifications. There is also a minimal flavor that does not require Google Play Services and can be found in the releases section. The minimal flavor does not have location tracking or notifications.

Building for publishing

To build the app for publishing, you will need to sign the app. To do this, do the following:

  1. Create keystore containing keypair for debug application signing. In Android Studio: Menu/Build/Generate signed APK, then use a button to create new keystore. Remember the passwords and key alias. Default, the keystore must be named release_keystore.keystore and should be placed in the home-assistant-Android/app and home-assistant-Android/wear folder.
  2. Set environmental variables used in app/build.gradle.kts:
  • KEYSTORE_PASSWORD
  • KEYSTORE_ALIAS
  • KEYSTORE_ALIAS_PASSWORD
  • KEYSTORE_PATH (if your keystore is located differently than stated above)
  1. Run gradlew build
  2. The signed APK is located in your build folder

Testing Dev Releases

We are using Github Actions to perform continuous integration both by unit testing, deploying dev releases to Play Store Beta and final releases to the Play Store when we release. To help test out a specific feature/fixes users can find the APK on the Actions page for each pull request, this debug APK can be installed side-by-side the production or beta builds.

Quality

We are using ktlint as our linter. You can run a check locally on your machine with:

./gradlew ktlintCheck

This commands runs on our CI to check if your PR passes all tests. So we strongly recommend running it before committing.

To run a check with an auto-format:

./gradlew ktlintFormat

Translating

The project currently uses lokalise to translate the application. If you are interested in helping translate go to the link and click start translating!

Generating a release to production

  • Create a new release with the name and tag in the {MAJOR}.{MINOR}.{PATCH} format
  • Steal the release notes from the latest beta build
  • This will cause a tag to be added to the project and the Production Deploy Workflow will handle the rest
  • Note: Only the first 500 characters of the release notes get set in the Google Play release

More Repositories

1

core

🏑 Open source home automation that puts local control and privacy first.
Python
68,686
star
2

home-assistant.io

πŸ“˜ Home Assistant User documentation
HTML
4,402
star
3

operating-system

πŸ”° Home Assistant Operating System
Python
4,381
star
4

frontend

🍭 Frontend for Home Assistant
TypeScript
3,698
star
5

supervisor

🏑 Home Assistant Supervisor
Python
1,652
star
6

supervised-installer

Installer for a generic Linux system
Shell
1,587
star
7

Iconic

🎨 Auto-generated icon font library for iOS, watchOS and tvOS
Swift
1,576
star
8

addons

βž• Docker add-ons for Home Assistant
Shell
1,432
star
9

iOS

πŸ“± Home Assistant for Apple platforms
Swift
1,432
star
10

homebridge-homeassistant

DEPRECATED in favor of native HomeKit support. - ο£Ώ Homebridge plugin for Home Assistant
JavaScript
679
star
11

intents

Intents to be used with Home Assistant
Python
414
star
12

architecture

Repo to discuss Home Assistant architecture
304
star
13

developers.home-assistant

Developers website for Home Assistant.
JavaScript
280
star
14

home-assistant-js-websocket

🚑 JavaScript websocket client for Home Assistant
TypeScript
253
star
15

os-agent

Daemon allowing to control OS features through D-Bus
Go
240
star
16

hassio-build

🚜 Hass.io build tools
Python
221
star
17

brands

🎨 Brands for Home Assistant
Shell
217
star
18

hadashboard

🐠 Dashing dashboard for Home Assistant (deprecated)
JavaScript
200
star
19

example-custom-config

A collection of example custom components for Home Assistant
Python
187
star
20

cli

πŸ”³ Home Assistant command line interface
Go
181
star
21

docker

Home Assistant containers
Dockerfile
179
star
22

hassbian-scripts

Scripts used in the Hassbian image.
Shell
122
star
23

ada

Hey Ada!
Python
102
star
24

fabric-home-assistant

πŸ“œ Deploy Home-Assistant easily with Fabric
Shell
99
star
25

addons-example

Example Home Assistant add-on repository
Dockerfile
94
star
26

addons-development

Add-on Repository for Development
Dockerfile
77
star
27

companion.home-assistant

πŸ“– Home Assistant Companion docs
JavaScript
74
star
28

hassil

Intent parsing for Home Assistant
Python
70
star
29

docker-base

Home Assistant base images
Dockerfile
66
star
30

builder

Home Assistant builder script
Shell
64
star
31

scenegen

πŸŽ† Generate Scenes for Home Assistant
Python
61
star
32

home-assistant-notebooks

πŸ““ Sample Jupyter Notebooks to explore Home Assistant data
Jupyter Notebook
60
star
33

data.home-assistant

Data Science Portal for Home Assistant.
JavaScript
59
star
34

home-assistant-js

🐝 JavaScript implementation of the Home Assistant API using NuclearJS
JavaScript
57
star
35

micropython-home-assistant

🐍 Home Assistant client for MicroPython
Python
53
star
36

version

Home Assistant versions data
Shell
48
star
37

assets

🎨 Assets for the Home Assistant project
HTML
46
star
38

ui-schema

A schema to define a user interface for Home Assistant.
39
star
39

alerts.home-assistant.io

Home Assistant Alerts
HTML
36
star
40

custom-panel-starter-kit-react

A starter kit to start developing a React based custom panel
JavaScript
34
star
41

HAKit

Swift library for communicating with Home Assistant.
Swift
32
star
42

buildroot

Buildroot fork with patches for Home Assistant OS
Makefile
29
star
43

services.home-assistant.io

Home Assistant web services
TypeScript
28
star
44

my.home-assistant.io

The portal to your home.
TypeScript
28
star
45

wheels

Build wheels for Home Assistant
Python
28
star
46

wheels-custom-integrations

Custom integration wheels hosted by Home Assistant
Dockerfile
27
star
47

hubot-home-assistant

πŸ’¬ Hubot module for interacting with Home Assistant via chat
CoffeeScript
27
star
48

actions

GitHub Actions for Home Assistant workflows
Dockerfile
24
star
49

mobile-apps-fcm-push

Push Notification Sender for Home Assistant official mobile apps
JavaScript
24
star
50

bthome.io

BTHome is a BLE API to broadcast data for your home.
HTML
23
star
51

devcontainer

Custom devcontainers for the home-assistant org
Shell
23
star
52

plugin-audio

Pulseaudio implementation for Home Assistant
Shell
23
star
53

analytics.home-assistant.io

Home of the Home Assistant usage stats.
TypeScript
22
star
54

plugin-observer

Supervisor plugin observare to monitor host part of Supervisor
Go
21
star
55

plugin-multicast

Multicast implementation for Home Assistant
Dockerfile
20
star
56

yellow.home-assistant.io

HTML
19
star
57

skyconnect.home-assistant.io

HTML
19
star
58

plugin-dns

CoreDNS implementation for Home Assistant
Go
16
star
59

tempio

A template helper for config files
Go
15
star
60

hass-release

Home Assistant release helper scripts
Python
14
star
61

service-hub

Monorepo for NestJS services
TypeScript
13
star
62

probot-home-assistant

Probot to deal with PR/Issue automations for Home Assistant
TypeScript
12
star
63

.github

Default Community Health Files for GitHub Repos
11
star
64

plugin-cli

CLI implementation for Home Assistant
Dockerfile
10
star
65

landingpage

JavaScript
9
star
66

hassbot

HassBot is the chat assistant for the Home Assistant chatrooms on Gitter.
CoffeeScript
9
star
67

lambda-home-assistant-github

:octocat: GitHub hook for the Home Assistant repository
Python
8
star
68

wheels-tensorflow

Build wheels for TensorFlow and Home Assistant
Dockerfile
8
star
69

wheels-opencv

Build opencv packages for Home Assistant
8
star
70

bot

Help with maintenance tasks.
TypeScript
7
star
71

github-issue-maker

Create GitHub issues based on a template.
Python
6
star
72

LabelBot

A Lambda function that labels Home Assistant pull requests
JavaScript
6
star
73

partner.home-assistant

HTML
5
star
74

intents-package

Python package of the Home Assistant intents
Python
5
star
75

deployments

HCL
5
star
76

hbmqtt-auth-home-assistant

HBMQTT Auth plugin to authenticate against Home Assistant auth
Python
5
star
77

private-demo

Repository for the private-demo image
Shell
5
star
78

ci-azure

Helper / Templates for Azure Pipelines
Roff
4
star
79

my-upnp

Go
4
star
80

people

An audit trail for who's meant to be in the Home Assistant GitHub organization - and a place to open issues for security-problem users
4
star
81

codeowners-mention

A Probot app to mention user(s) listed in CODEOWNERS on newly opened issues and PRs that have associated integration labels
JavaScript
3
star
82

operating-system-blobs

Shell
3
star
83

organization

πŸ’Ό A repository for discussing the organizational matters of Home Assistant
3
star
84

voice.home-assistant

[Deprecated] Website for all Home Assistant Voice
JavaScript
3
star
85

wheels-scipy

wheels-scipy
3
star
86

cosign

Sigstore cosign repository for Home Assistant
3
star
87

green.home-assistant.io

HTML
3
star
88

login.home-assistant.io

The login to your home.
HTML
2
star