Update docs.md

This commit is contained in:
Yegor Vialov
2019-08-16 15:27:16 +03:00
committed by GitHub
parent d5ec143e64
commit dd83c1b948

29
docs.md
View File

@ -7,14 +7,16 @@
- [SSL Certificates](#ssl-certificates) - [SSL Certificates](#ssl-certificates)
- [Android](#android) - [Android](#android)
- [Authentication](#authentication) - [Authentication](#authentication)
- [Mobile app integration](#mobile-app-integration)
- [UI configuration](#ui-configuration) - [UI configuration](#ui-configuration)
- [Notification](#notifications)
- [Log Viewer](#log-viewer) - [Log Viewer](#log-viewer)
## Requirements ## Requirements
### Home Assistant general ### Home Assistant general
To check if you are using right configuration for app, try to access your Home Assistant web interface with the same protocol (http:// or https://), the same domain or IP and port. If it is not loading the app will not work as well. To check if you are using right configuration for app, try to access your Home Assistant web interface with the same protocol (http:// or https://), the same domain or IP and port. If it is not loading the app will not work as well.
To connect to your Home Assistant instance with HA Client you need `http` and `websocket_api` components to be enabled as well as [remote access](https://www.home-assistant.io/docs/configuration/remote/) configured. If you are using `frontend` component (Home Assistant web interface actually) `websocket_api` is enabled by default and `http` component is already configured on your server, but still you need to double check. To connect to your Home Assistant instance with HA Client you need `http`, `websocket_api` and `mobile_app` components to be enabled as well as [remote access](https://www.home-assistant.io/docs/configuration/remote/) configured. If you are using `frontend` component (Home Assistant web interface actually) `websocket_api` is enabled by default and `http` component is already configured on your server, but still you need to double check.
In other cases changes should be made to you `configuration.yaml`: In other cases changes should be made to you `configuration.yaml`:
```yaml ```yaml
@ -25,6 +27,8 @@ http:
ssl_key: /ssl/privkey.pem ssl_key: /ssl/privkey.pem
websocket_api: websocket_api:
mobile_app:
``` ```
[Back to top](#documentation) [Back to top](#documentation)
@ -78,6 +82,22 @@ There is also 'Logout' option added. It will disconnect from Home Assistant, cle
![image](/assets/images/logout.png) ![image](/assets/images/logout.png)
[Back to top](#documentation)
## Mobile app integration (HA Client >= 0.6.0)
Strating from 0.6.0 `mobile_app` component should be enabled on your Home Assistant server. In nevest versions of HA it is enabled by default. If not, the app will show you an error saying that you need to enable `mobile_app` component on your HA instance. In that case just add this to your `configuration.yaml`:
```yaml
mobile_app:
```
If `mobile_app` component is enabled, you'll see a message about successfull mobile app registration:
![image](/assets/images/mobile_app_registered.png)
Also new integration will be created in your Home Assistant Integrations:
![image](/assets/images/mobile_app_registered-2.png)
For now it means that you can use [notofications](#notifications) in HA Client. But to make new `notify` service appear you need to restart Home Assistant.
[Back to top](#documentation) [Back to top](#documentation)
## UI Configuration ## UI Configuration
By default HA Client UI is based on your Lovelace UI config, so it should display the same views as your Home Assistant web UI. It is still possible to switch off Lovelace UI in app settings. In this case app UI will be based on groups configuration, the same as old Home Assistant UI. By default HA Client UI is based on your Lovelace UI config, so it should display the same views as your Home Assistant web UI. It is still possible to switch off Lovelace UI in app settings. In this case app UI will be based on groups configuration, the same as old Home Assistant UI.
@ -85,6 +105,13 @@ By default HA Client UI is based on your Lovelace UI config, so it should displa
![image](/assets/images/setting_ui.png) ![image](/assets/images/setting_ui.png)
[Back to top](#documentation) [Back to top](#documentation)
## Notification (HA Client >= 0.6.0)
Starting from version 0.6.0 HA Client sipports sending notifications from Home Assistant to the app. The app [should be registered in your HA](#mobile-app-integration) and HA need to be restarted to make it work.
For now notificationas could only have title and text. No actions supported yet. After [mobile app will be registered](#mobile-app-integration) and your Home Assistant will be restarted you'll see a new `notify` service. For example: `notify.mobile_app_egor_s_pixel_3_xl`. It can be used to send notifications to HA Client on a specific device. Just call this service with some data:
```yaml
{"message":"Something is moving on your backyard!"}
```
## Log Viewer ## Log Viewer
There is a built in debug messages viewer in the app. You can access it by *Log* item in main menu. It will be very helpful if you will attach a copy of this log to your issue report. It is easy to do with button in header (![image](/assets/images/log_copy_btn.png)) that will copy all log entries to clipboard. There is a built in debug messages viewer in the app. You can access it by *Log* item in main menu. It will be very helpful if you will attach a copy of this log to your issue report. It is easy to do with button in header (![image](/assets/images/log_copy_btn.png)) that will copy all log entries to clipboard.