mirror of
https://github.com/home-assistant/home-assistant.io.git
synced 2025-07-19 15:26:59 +00:00
Merge branch 'current' into next
This commit is contained in:
commit
e5a739766b
@ -12,26 +12,16 @@ ha_category: Hub
|
||||
ha_release: "0.40"
|
||||
---
|
||||
|
||||
The Android IP webcam component turns an Android phone into a network camera with multiple viewing options.
|
||||
The `android_ip_webcam` component turns an Android phone into a network camera with multiple viewing options.
|
||||
|
||||
It's setup as a mjpeg camera and all settings as switches inside of Home Assistant. You can also expose the sensors. If you have multiple phones, you can use all options inside a list.
|
||||
|
||||
To set it up, download [the IP Webcam app][app] and add the following information to your `configuration.yaml` file:
|
||||
To set it up, download [the IP Webcam app][app], and add the following information to your `configuration.yaml` file:
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
android_ip_webcam:
|
||||
<<<<<<< HEAD
|
||||
<<<<<<< HEAD
|
||||
- host: 192.168.1.10
|
||||
=======
|
||||
# This should be the ip of your phone
|
||||
=======
|
||||
# This should be the IP Address of the phone
|
||||
>>>>>>> origin/current
|
||||
- host: 192.168.1.10
|
||||
name: Entrance
|
||||
>>>>>>> current
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
@ -42,7 +32,6 @@ Configuration variables:
|
||||
- **username** (*Optional*): The username to access the phone.
|
||||
- **password** (*Optional*): The password to access the phone.
|
||||
- **scan_interval** (*Optional*): Default is 10 seconds. Defines the update interval of the phone.
|
||||
- **auto_discovery** (*Optional*): Default is True. Auto detect which sensors and settings are available for setup.
|
||||
- **sensors** array (*Optional*): Conditions to display sensor in the frontend. See list of supported sensors.
|
||||
- **switches** array (*Optional*): Conditions to display settings in the frontend. See list of supported settings.
|
||||
- **motion_sensor** (*Optional*): Activate motion sensor if auto_discovery is disabled.
|
||||
@ -70,8 +59,5 @@ Settings:
|
||||
- torch
|
||||
- whitebalance_lock
|
||||
- video_recording
|
||||
<<<<<<< HEAD
|
||||
=======
|
||||
|
||||
[app]: https://play.google.com/store/apps/details?id=com.pas.webcam
|
||||
>>>>>>> current
|
||||
|
@ -45,7 +45,7 @@ automation:
|
||||
condition:
|
||||
condition: state
|
||||
entity_id: 'binary_sensor.workday_sensor'
|
||||
state: 'off'
|
||||
state: 'on'
|
||||
action:
|
||||
service: switch.turn_on
|
||||
entity_id: switch.heater
|
||||
|
@ -15,6 +15,8 @@ ha_release: 0.12
|
||||
|
||||
The `lifx` platform allows you to integrate your [LIFX](http://www.lifx.com) into Home Assistant.
|
||||
|
||||
_Please note, LIFX is currently not supported on Windows._
|
||||
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
light:
|
||||
|
@ -52,8 +52,7 @@ Configuration variables:
|
||||
|
||||
- **command_topic** (*Required*): The MQTT topic to publish commands to change the light's state.
|
||||
- **brightness** (*Optional*): Flag that defines if the light supports brightness. Default is false.
|
||||
- **color_temperature** (*Optional*): Flag that defines if the light supports color temperature. Default is false.
|
||||
- **effect** (*Optional*): Flag that defines if the light supports effects. Default is false.
|
||||
- **color_temp** (*Optional*): Flag that defines if the light supports color temperature. Default is false.
|
||||
- **effect** (*Optional*): Flag that defines if the light supports effects. Default is false.
|
||||
- **effect_list** (*Optional*): The list of effects the light supports.
|
||||
- **flash_time_long** (*Optional*): The duration, in seconds, of a "long" flash. Default is 10.
|
||||
|
@ -88,8 +88,8 @@ script:
|
||||
add_logbook_entry:
|
||||
alias: Add Logbook
|
||||
sequence:
|
||||
- event: LOGBOOK_ENTRY
|
||||
event_data:
|
||||
- service: logbook.log
|
||||
data_template:
|
||||
name: Kitchen
|
||||
message: is being used
|
||||
# Optional
|
||||
|
@ -20,7 +20,8 @@ To enable Matrix notifications in your installation, add the following to your `
|
||||
```yaml
|
||||
# Example configuration.yaml entry
|
||||
notify:
|
||||
- platform: matrix
|
||||
- name: NOTIFIER_NAME
|
||||
platform: matrix
|
||||
homeserver: HOMESERVER
|
||||
username: USERNAME
|
||||
password: PASSWORD
|
||||
|
@ -38,6 +38,7 @@ sensor:
|
||||
currency: $
|
||||
- type: amount
|
||||
period: day
|
||||
- type: current_values
|
||||
```
|
||||
|
||||
Configuration variables:
|
||||
@ -51,6 +52,7 @@ negative number of minutes your timezone is ahead/behind UTC time.
|
||||
- **budget**: Monthly budget.
|
||||
- **cost**: The cost for energy consumption (with the tariff that has been set in Efergy) over a given period.
|
||||
- **amount**: The amount of energy consumed over a given period.
|
||||
- **current_values**: This returns the current energy usage of each device on your account, as efergy_\<sid of device\>. If you only have one device in your account, this is effectively the same as instant_readings.
|
||||
- **period** (*Optional*): Some variables take a period argument. Valid options are "day", "week", "month", and "year".
|
||||
- **currency** (*Optional*): This is used to display the cost/period as the unit when monitoring the cost. It should correspond to the actual currency used in your dashboard.
|
||||
|
||||
|
@ -21,14 +21,24 @@ To integrate this into Home Assistant, add the following section to your `config
|
||||
zeroconf:
|
||||
```
|
||||
|
||||
The registration will include metadata about the Home Assistant instance, including a base URL that can be used to access Home Assistant, the currently running Home Assistant version, and whether an API password is needed to access the instance.
|
||||
The registration will include metadata about the Home Assistant instance, including a base URL that can be used to access Home Assistant, the currently running Home Assistant version, and whether an API password is needed to access the instance. The examples below show two ways to retrieve the details for testing.
|
||||
|
||||
```bash
|
||||
$ avahi-browse -alr
|
||||
+ eth0 IPv4 Home _home-assistant._tcp local
|
||||
= eth0 IPv4 Home _home-assistant._tcp local
|
||||
hostname = [Home._home-assistant._tcp.local]
|
||||
address = [192.168.0.5]
|
||||
address = [192.168.0.70]
|
||||
port = [8123]
|
||||
txt = ["version=0.27.0.dev0" "base_url=http://192.168.0.5:8123" "requires_api_password=true"]
|
||||
txt = ["base_url=http://192.168.0.70:8123" "requires_api_password=true" "version=0.41.0"]
|
||||
```
|
||||
|
||||
```bash
|
||||
$ avahi-discover
|
||||
Browsing domain 'local' on -1.-1 ...
|
||||
Browsing for services of type '_home-assistant._tcp' in domain 'local' on 4.0 ...
|
||||
Found service 'Home' of type '_home-assistant._tcp' in domain 'local' on 4.0.
|
||||
Service data for service 'Home' of type '_home-assistant._tcp' in domain 'local' on 4.0:
|
||||
Host Home._home-assistant._tcp.local (192.168.0.70), port 8123, TXT data:
|
||||
['requires_api_password=true', 'base_url=http://192.168.0.70:8123', 'version=0.41.0']
|
||||
```
|
||||
|
@ -53,6 +53,20 @@ Include conf/extra/hass.conf
|
||||
If you don't want HTTPS, you can change `<VirtualHost *:443>` to `<VirtualHost *:80>` or better consider redirecting all HTTP to HTTPS.
|
||||
|
||||
|
||||
<p class='note'>
|
||||
In case you are getting occasional HTTP 504 error messages ("Gateway Timeout") when accessing the Web UI through your proxy, try adding disablereuse=on to both ProxyPass directives:
|
||||
|
||||
```text
|
||||
<VirtualHost *:443>
|
||||
[...]
|
||||
ProxyPass /api/websocket ws://localhost:8123/api/websocket disablereuse=on
|
||||
[...]
|
||||
ProxyPass / http://localhost:8123/ disablereuse=on
|
||||
[...]
|
||||
</VirtualHost>
|
||||
```
|
||||
</p>
|
||||
|
||||
#### {% linkable_title Multiple Instance %}
|
||||
|
||||
You already have Home Assistant running on http://localhost:8123 and available at home.example.org as describe before. The configuration file for this Home Assistant is available in `/home/alice/.homeassistant/configuration.yaml`
|
||||
|
@ -24,7 +24,8 @@ Essentially this is a browser-based alternative to modifying your configuration
|
||||
- Check valid configuration and restart Home Assistant directly with the click of a button
|
||||
- SSL support
|
||||
- Optional authentication and IP filtering for additional security
|
||||
- Direct links to Home Assistant documentation
|
||||
- Direct links to Home Assistant documentation and icons
|
||||
- Execute shell commands
|
||||
- Runs on pretty much any machine Home Assistant can run on
|
||||
|
||||
<p class='note warning'>
|
||||
@ -33,7 +34,7 @@ Consider running the configurator as a user with limited privileges to limit pos
|
||||
|
||||
### {% linkable_title Installation (Linux, OS X) %}
|
||||
There are no dependencies on Python modules that are not part of the standard library. And all the fancy JavaScript libraries are loaded from CDN (which means this doesn't work when you're offline).
|
||||
- Copy [configurator.py](https://github.com/danielperna84/hass-poc-configurator/blob/master/configurator.py) to your Home Assistant configuration directory (e.g /home/homeassistant/.homeassistant)
|
||||
- Copy [configurator.py](https://github.com/danielperna84/hass-configurator/blob/master/configurator.py) to your Home Assistant configuration directory (e.g /home/homeassistant/.homeassistant)
|
||||
- Make it executable: `sudo chmod 755 configurator.py`
|
||||
- (Optional) Set the `GIT` variable in configurator.py to `True` if [GitPython](https://gitpython.readthedocs.io/) is installed on your system. This is required if you want to make use of the Git integration.
|
||||
- Execute it: `sudo ./configurator.py`
|
||||
@ -41,7 +42,7 @@ There are no dependencies on Python modules that are not part of the standard li
|
||||
|
||||
### {% linkable_title Configuration %}
|
||||
Near the top of the configurator.py-file you will find some global variables you can change to customize the configurator. If you are unfamiliar with Python: when setting variables of the type _string_, you have to write that within quotation marks. The default settings are fine for just checking out the configurator quickly. With more customized setups you should change some settings though.
|
||||
To keep your settings across updates it is also possible to save settings in an external file. In that case copy [settings.conf](https://github.com/danielperna84/hass-poc-configurator/blob/master/settings.conf) whereever you like and append the full path to the file to the command when starting the configurator. E.g. `sudo .configurator.py /home/homeassistant/.homeassistant/mysettings.conf`. This file is in JSON format. So make sure it has a valid syntax (you can set the editor to JSON to get syntax highlighting for the settings). The major difference to the settings in the py-file is, that `None` becomes `null`.
|
||||
To keep your settings across updates it is also possible to save settings in an external file. In that case copy [settings.conf](https://github.com/danielperna84/hass-configurator/blob/master/settings.conf) whereever you like and append the full path to the file to the command when starting the configurator. E.g. `sudo .configurator.py /home/homeassistant/.homeassistant/mysettings.conf`. This file is in JSON format. So make sure it has a valid syntax (you can set the editor to JSON to get syntax highlighting for the settings). The major difference to the settings in the py-file is, that `None` becomes `null`.
|
||||
|
||||
#### LISTENIP (string)
|
||||
The IP the service is listening on. By default it is binding to `0.0.0.0`, which is every interface on the system.
|
||||
@ -99,11 +100,11 @@ Since the configurator script on its own is no service, you will have to take so
|
||||
|
||||
1. Fork the process into the background with the command:
|
||||
`nohup sudo ./configurator.py &`
|
||||
2. If your system is using systemd (that's usually what you'll find on a Raspberry PI), there's a [template file](https://github.com/danielperna84/hass-poc-configurator/blob/master/hass-poc-configurator.systemd) you can use and then apply the same process to integrate it as mentioned in the [Home Assistant documentation](https://home-assistant.io/docs/autostart/systemd/). If you use this method you have to set the `BASEPATH` variable according to your environment.
|
||||
3. If you have [supervisor](http://supervisord.org/) running on your system, [hass-poc-configurator.supervisor](https://github.com/danielperna84/hass-poc-configurator/blob/master/hass-poc-configurator.supervisor) would be an example configuration you could use to control the configurator.
|
||||
2. If your system is using systemd (that's usually what you'll find on a Raspberry PI), there's a [template file](https://github.com/danielperna84/hass-configurator/blob/master/hass-poc-configurator.systemd) you can use and then apply the same process to integrate it as mentioned in the [Home Assistant documentation](https://home-assistant.io/docs/autostart/systemd/). If you use this method you have to set the `BASEPATH` variable according to your environment.
|
||||
3. If you have [supervisor](http://supervisord.org/) running on your system, [hass-poc-configurator.supervisor](https://github.com/danielperna84/hass-configurator/blob/master/hass-poc-configurator.supervisor) would be an example configuration you could use to control the configurator.
|
||||
4. A tool called [tmux](https://tmux.github.io/), which should be pre-installed with [HASSbian](https://home-assistant.io/docs/hassbian/).
|
||||
5. A tool called [screen](http://ss64.com/bash/screen.html) (alternative to tmux). If it's not already installed on your system, you can do `sudo apt-get install screen` or `sudo yum install screen` to get it. When it's installed, start a screen session by executing `screen`. Then navigate to your Home Assistant directory and start the configurator like described above. Put the screen session into the background by pressing `CTRL+A` and then `CTRL+D`. It is now safe to disconnect from your SSH session.
|
||||
To resume the screen session, log in to your machine and execute `screen -r`.
|
||||
|
||||
### {% linkable_title Troubleshooting, Issues etc. %}
|
||||
If you encounter difficulties setting up the configurator or stumble upon a possible bug, head over to the [Issues](https://github.com/danielperna84/hass-poc-configurator/issues) section of the configurator repository. Additionally there is a thread at the [Home Assistant Community](https://community.home-assistant.io/t/simplistic-configuration-ui/10175) where common problems may have been discussed already. And if not, there are always friendly people around to help finding solutions.
|
||||
If you encounter difficulties setting up the configurator or stumble upon a possible bug, head over to the [Issues](https://github.com/danielperna84/hass-configurator/issues) section of the configurator repository. Additionally there is a thread at the [Home Assistant Community](https://community.home-assistant.io/t/simplistic-configuration-ui/10175) where common problems may have been discussed already. And if not, there are always friendly people around to help finding solutions.
|
||||
|
@ -16,6 +16,8 @@ The only requirement is that you have a Raspberry Pi with a fresh installation o
|
||||
Note that as of 2016-11-30 SSH is disabled by default in the official Raspbian images. Adding an empty file called `ssh` to `/boot/` or the FAT32 partition will enable it. More information is on the Raspberry Pi Foundation [Blog](https://www.raspberrypi.org/blog/page/2/?fish#a-security-update-for-raspbian-pixel)
|
||||
</p>
|
||||
|
||||
Irrespective of whether you use SSH to connect to the Pi from another computer or not, you need SSH to install Home Assistant. So go ahead and enable SSH.
|
||||
|
||||
* Login to Raspberry Pi. For example with `ssh pi@your_raspberry_pi_ip`
|
||||
* Run the following command
|
||||
|
||||
|
@ -58,12 +58,12 @@ condition:
|
||||
state: 'home'
|
||||
- condition: or
|
||||
conditions:
|
||||
- condition: state
|
||||
entity_id: sensor.weather_precip
|
||||
state: 'rain'
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: '20'
|
||||
- condition: state
|
||||
entity_id: sensor.weather_precip
|
||||
state: 'rain'
|
||||
- condition: numeric_state
|
||||
entity_id: 'sensor.temperature'
|
||||
below: '20'
|
||||
```
|
||||
|
||||
### {% linkable_title Numeric state condition %}
|
||||
|
@ -195,6 +195,7 @@
|
||||
<li>{% active_link /docs/ecosystem/scenegen/ scenegen %}</li>
|
||||
<li>{% active_link /docs/ecosystem/synology/ Synology %}</li>
|
||||
<li>{% active_link /docs/ecosystem/backup/backup_github/ Backup to GitHub %}</li>
|
||||
<li>{% active_link /docs/ecosystem/hass-configurator/ HASS Configurator %}</li>
|
||||
</ul>
|
||||
</ul>
|
||||
</div>
|
||||
|
@ -19,7 +19,7 @@ Welcome to 0.41. There was a lot going on in the last two weeks. Not only from t
|
||||
## Component overview
|
||||
The [Components][components] overview is now powered by search/filtering feature. This will make it faster to get the component/platform you are looking for more quickly. Thanks again, [@bdurrer] for this.
|
||||
|
||||
## Changelog
|
||||
## Changelog
|
||||
The new format of the changelog which was introduced with 0.40 will provide a link to the related pull request. We are not covering everything in our release notes but we think that this addition will make it easier to find details about the change.
|
||||
|
||||
## New platforms/components
|
||||
@ -36,6 +36,8 @@ The new format of the changelog which was introduced with 0.40 will provide a li
|
||||
- The [Emby mediaplayer][emby] platform was changed to avoid name clashes ([#6664]).
|
||||
- In a lot of places were the power and energy units update. This change mostly affects the `switch` platforms ([#6212]).
|
||||
- If set to `auto` then the [MQTT][mqtt] implementation will use the bundled certificates automatically ([#6707]).
|
||||
- Autodiscovery of [Android IP Webcam][android] was removed ([#6528]).
|
||||
- The frontend is now using [Shadow DOM][shadow] and this could break your custom panels ([#228](https://github.com/home-assistant/home-assistant-polymer/issues/228)).
|
||||
|
||||
## If you need help...
|
||||
...don't hesitate to use our very active [forums][forum] or join us for a little [chat][gitter]. The release notes have comments enabled but it's preferred if you use the former communication channels. Thanks.
|
||||
@ -102,12 +104,11 @@ Experiencing issues introduced by this release? Please report them in our [issue
|
||||
- Add "Refactor zwave discovery to entity schema" ([@balloob] - [#6565])
|
||||
- Tests for ZWave climate ([@armills] - [#6629])
|
||||
- Correctly flag Kodi media types ([@armills] - [#6628])
|
||||
- since knx_2_float can't handle 0, bypass converting 0 value from knx to float ([@goofz] - [#6626])
|
||||
- Use sqlite's WAL mode to avoid `database is locked` errors ([@n8henrie] - [#6519])
|
||||
- Remove event decorators ([@balloob] - [#6634]) (Breaking Change)
|
||||
- Deprecate event forwarding ([@balloob])
|
||||
- Upgrade aiohttp to 1.3.4 ([@pvizeli] - [#6643])
|
||||
- media_player.kodi extra attributes for tvshow and music media ([@mvillarejo] - [#6622])
|
||||
- Kodi extra attributes for tvshow and music media ([@mvillarejo] - [#6622])
|
||||
- Add ZWave cover tests ([@armills] - [#6648])
|
||||
- Kodi: Fix episode media type classification ([@armills] - [#6645])
|
||||
- Move LIFX to aiolifx for driving the bulbs ([@amelchio] - [#6584])
|
||||
@ -121,7 +122,7 @@ Experiencing issues introduced by this release? Please report them in our [issue
|
||||
- Fix hydroquebec ([@titilambert] - [#6574])
|
||||
- Update pyecobee version to 0.0.7 ([@dale3h] - [#6593])
|
||||
- Update SMA solar sensor to work with the new add_devices callback ([@kellerza] - [#6602])
|
||||
- since knx_2_float can't handle 0, bypass converting 0 value from knx to float ([@goofz] - [#6626])
|
||||
- Since knx_2_float can't handle 0, bypass converting 0 value from knx to float ([@goofz] - [#6626])
|
||||
- Bugfix RFLINK remove group ([@pvizeli] - [#6580])
|
||||
- Added workday sensor ([@BastianPoe] - [#6599])
|
||||
- Add test for Z-wave switch ([@turbokongen] - [#6619])
|
||||
@ -341,6 +342,8 @@ Experiencing issues introduced by this release? Please report them in our [issue
|
||||
[tado]: https://home-assistant.io/components/climate.tado/
|
||||
[volumio]: https://home-assistant.io//components/media_player.volumio/
|
||||
[workday]: https://home-assistant.io/components/binary_sensor.workday/
|
||||
[android]: https://home-assistant.io/components/android_ip_webcam/
|
||||
[shadow]: https://www.w3.org/TR/shadow-dom/
|
||||
|
||||
[forum]: https://community.home-assistant.io/
|
||||
[gitter]: https://gitter.im/home-assistant/home-assistant
|
||||
|
70
source/_posts/2017-03-28-http-to-mqtt-bridge.markdown
Normal file
70
source/_posts/2017-03-28-http-to-mqtt-bridge.markdown
Normal file
@ -0,0 +1,70 @@
|
||||
---
|
||||
layout: post
|
||||
title: "HTTP to MQTT bridge"
|
||||
description: "How to integrate IFTTT with HA using MQTT"
|
||||
date: 2017-03-28 06:00:00 +0000
|
||||
date_formatted: "March 28, 2017"
|
||||
author: petkov
|
||||
comments: true
|
||||
categories: How-To
|
||||
og_image: /images/blog/2017-03-bridge/social.png
|
||||
---
|
||||
|
||||
The idea of creating [HTTP to MQTT bridge](https://github.com/petkov/http_to_mqtt) appeared when I was trying to integrate Google Assistant with my Home Assistant after watching [BRUH Automation](https://youtu.be/087tQ7Ly7f4?t=265) video. Right now there is no MQTT service available in [IFTTT](https://ifttt.com/about). Existing integration solution uses [Maker Webhooks](https://ifttt.com/maker_webhooks) which requires that your Home Assistant instance is publically accessible, which I think brings some security concerns or simply not always possible to set up.
|
||||
|
||||
The HTTP to MQTT bridge should fill that gap. The idea is to receive messages using HTTP requests and transfer them to your MQTT broker, which can be contacted by Home Assistant. The HTTP to MQTT bridge is written using Node.js with [Express](https://expressjs.com/) for the server part and [MQTT.js](https://www.npmjs.com/package/mqtt) for the client.
|
||||
|
||||
<!--more-->
|
||||
|
||||
The app could be hosted on any Node.js hosting. I prefer [Heroku: Cloud Application Platform](https://www.heroku.com/home) for its simplicity.
|
||||
|
||||
### {% linkable_title Bringing pieces together %}
|
||||
|
||||
1. Configure the Home Assistant [MQTT trigger](https://home-assistant.io/docs/automation/trigger/#mqtt-trigger).
|
||||
1. Configure [CloudMQTT](https://www.cloudmqtt.com/). Check this [video tutorial](https://www.youtube.com/watch?v=VaWdvVVYU3A) for details.
|
||||
1. [](https://heroku.com/deploy?template=https://github.com/petkov/http_to_mqtt) HTTP to MQTT bridge app.
|
||||
1. Add the [Configuration Variables](https://devcenter.heroku.com/articles/config-vars#setting-up-config-vars-for-a-deployed-application) to your Heroku app mentioned here.
|
||||
* AUTH_KEY: Can be any string, eg. `912ec803b2ce49e4a541068d495ab570`.
|
||||
* MQTT_HOST: The host of your MQTT broker, eg. mqtts://k99.cloudmqtt.com:21234.
|
||||
* MQTT_USER: MQTT username
|
||||
* MQTT_PASS: MQTT password
|
||||
1. Create an IFTTT applet the same way as described in [BRUH Automation](https://youtu.be/087tQ7Ly7f4?t=265) video.
|
||||
1. Configure [Maker Webhooks](https://ifttt.com/maker_webhooks) service with below parameters.
|
||||
* URL: `https://<app_name>.herokuapp.com/post/`
|
||||
* Method: `POST`
|
||||
* Content Type: `application/json`
|
||||
* Body: `{"topic":"<mqtt_topic>","message":"<mqtt_message>","key":"<AUTH_KEY>"}`
|
||||
|
||||
### {% linkable_title Subscribe to latest version %}
|
||||
|
||||
Additionally you can make Heroku to update the HTTP to MQTT bridge app to the latest available version from the GitHub repository automatically. To do this follow the instruction on the [Heroku help page](https://devcenter.heroku.com/articles/github-integration#automatic-deploys).
|
||||
|
||||
### {% linkable_title Improve response time %}
|
||||
|
||||
After 30 minutes of inactivity Heroku will put your app into sleep mode. This will result in ~10 seconds response time. To prevent Heroku from putting your app into sleep mode, ping it every 10 minutes. You can do that by sending regular HTTP GET request to http://your_app/keep_alive/. But be careful. Heroku free quota is 550 hours per month. Without sleeping your app will be allowed to run only 22 days a month. Additionally the `keep_alive` method will send a simple MQTT message to prevent the broker from sleeping as well. The topic and message can be configured using Heroku environment variables `KEEP_ALIVE_TOPIC` and `KEEP_ALIVE_MESSAGE` and both are set to "keep_alive" by default.
|
||||
|
||||
You can even configure Home Assistant to ping HTTP to MQTT bridge every 10 minutes during daytime. Below is an example of how to do that:
|
||||
|
||||
```yaml
|
||||
rest_command:
|
||||
http_to_mqtt_keep_alive:
|
||||
url: https://<your_app_address>/keep_alive/
|
||||
method: get
|
||||
|
||||
automation:
|
||||
alias: HTTP to MQTT keep alive
|
||||
trigger:
|
||||
platform: time
|
||||
minutes: '/10'
|
||||
seconds: 00
|
||||
condition:
|
||||
condition: time
|
||||
after: '7:30:00'
|
||||
before: '23:59:59'
|
||||
action:
|
||||
service: rest_command.http_to_mqtt_keep_alive
|
||||
```
|
||||
|
||||
### {% linkable_title Thanks %}
|
||||
|
||||
Special thanks to Ben from [BRUH Automation](https://www.youtube.com/channel/UCLecVrux63S6aYiErxdiy4w/featured) for awesome tutorials which inspired me to do this project.
|
@ -14,7 +14,6 @@ Home Assistant is built from the ground up to be easily extensible using compone
|
||||
Home Assistant is open-source and MIT-licensed. Here are links to the source:
|
||||
|
||||
- [home-assistant](https://github.com/home-assistant/home-assistant): Python server backend.
|
||||
- [home-assistant-js](https://github.com/home-assistant/home-assistant-js): JavaScript backend that powers the client.
|
||||
- [home-assistant-polymer](https://github.com/home-assistant/home-assistant-polymer): Polymer UI.
|
||||
|
||||
For those new to contributing to open source software, make sure you are familiar with all of the tools and concepts used in Home Assistant before you start.
|
||||
|
BIN
source/images/blog/2017-03-bridge/social.png
Normal file
BIN
source/images/blog/2017-03-bridge/social.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 99 KiB |
Loading…
x
Reference in New Issue
Block a user