Merge branch 'current' into next
This commit is contained in:
commit
4ba3e3e0c6
33 changed files with 344 additions and 150 deletions
|
@ -495,7 +495,7 @@ $ crontab -e
|
|||
* Scroll to the bottom of the file and paste in the following line
|
||||
|
||||
```text
|
||||
30 2 * * 1 /usr/bin/letsencrypt renew >> /var/log/le-renew.log
|
||||
30 2 * * 1 ~/certbot/certbot-auto renew --quiet --no-self-upgrade --standalone --preferred-challenges http-01
|
||||
```
|
||||
* Save the file and exit
|
||||
|
||||
|
|
|
@ -43,7 +43,7 @@ $ sudo pip3 install --upgrade requests
|
|||
|
||||
## {% linkable_title Configuring hapush (all installation methods) %}
|
||||
|
||||
When you have all the prereqs in place, copy the hapush.cfg.example file to hapush.cfg then edit it to reflect your environment:
|
||||
When you have all the prereqs in place, copy the `hapush.cfg.example` file to `hapush.cfg` then edit it to reflect your environment:
|
||||
|
||||
```
|
||||
ha_url = "http://192.168.1.10:8123"
|
||||
|
@ -61,13 +61,13 @@ logfile = "/etc/hapush/hapush.log"
|
|||
|
||||
## {% linkable_title Running hapush %}
|
||||
|
||||
For a manual installation you can then run hapush from the command line as follows:
|
||||
For a manual installation you can then run `hapush` from the command-line as follows:
|
||||
|
||||
```bash
|
||||
$ ./hapush.py hapush.cfg
|
||||
```
|
||||
|
||||
For docker installs, hapush will be started automatically when you run the startup command.
|
||||
For Docker installs, hapush will be started automatically when you run the startup command.
|
||||
|
||||
If all is well, you should start to see `hapush` responding to events as they occur. For a docker installation you should see these messages in `hapush/hapush.log`.
|
||||
|
||||
|
|
|
@ -10,13 +10,14 @@ footer: true
|
|||
redirect_from: /ecosystem/hadashboard/installation/
|
||||
---
|
||||
|
||||
Installation can be performed using Docker (Contributed by [marijngiesen](https://github.com/marijngiesen)) or manually if Docker doesn't work for you. We also have a Raspberry PI version of Docker contributed by [snizzleorg](https://community.home-assistant.io/users/snizzleorg/activity)
|
||||
Installation can be performed using Docker (Contributed by [marijngiesen](https://github.com/marijngiesen)) or manually if Docker doesn't work for you. We also have a Raspberry Pi version of Docker contributed by [snizzleorg](https://community.home-assistant.io/users/snizzleorg/activity).
|
||||
|
||||
## {% linkable_title Using Docker (Non Raspian) %}
|
||||
|
||||
Assuming you already have Docker installed, installation is fairly easy.
|
||||
|
||||
### {% linkable_title Clone the Repository %}
|
||||
|
||||
Clone the **hadashboard** repository to the current local directory on your machine.
|
||||
|
||||
``` bash
|
||||
|
@ -41,7 +42,7 @@ When the build completes, you can run the dashboard with the following command f
|
|||
$ docker run --name="hadashboard" -d -v <path_to_hadashboard>/dashboards:/app/dashboards -v <path_to_hadashboard>/lib/ha_conf.rb:/app/lib/ha_conf.rb -v <path_to_hadashboard>/hapush:/app/hapush --net=host hadashboard
|
||||
```
|
||||
|
||||
If you are running docker on windows you should not use the `--net` command and explicitly specify the port, aslo for security reason `--net=host` should not be used so the following can also be used in unix. This will also set the process to start when the docker process starts so you do not have to worry about reboots. To map the volumes make sure you have ticked the shred drives in the settings. In this example I am using `c:\hadashboard` as the location where the git clone was done and mapping to port 3030 on the host.
|
||||
If you are running docker on windows you should not use the `--net` command and explicitly specify the port, also for security reason `--net=host` should not be used so the following can also be used in unix. This will also set the process to start when the docker process starts so you do not have to worry about reboots. To map the volumes make sure you have ticked the shred drives in the settings. In this example I am using `c:\hadashboard` as the location where the git clone was done and mapping to port 3030 on the host.
|
||||
|
||||
```powershell
|
||||
docker run --restart=always --name="hadashboard" -p 3030:3030 -d -v C:/hadashboard/dashboards:/app/dashboards -v C:/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v C:/hadashboard/hapush:/app/hapush hadashboard
|
||||
|
@ -57,15 +58,13 @@ By default, the docker instance should pick up your timezone but if you want to
|
|||
|
||||
### {% linkable_title Docker on Raspberry Pi %}
|
||||
|
||||
Raspberry pi needs to use a different docker build file so the build command is slightly different:
|
||||
Raspberry Pi needs to use a different Docker build file so the build command is slightly different:
|
||||
|
||||
```bash
|
||||
$ sudo docker build -f Docker-raspi/Dockerfile -t hadashboard .
|
||||
```
|
||||
|
||||
Apart from that the other steps are identical.
|
||||
|
||||
*Note - this is pretty slow even on a PI3, be prepared for it to take an hour or two to build all of the extensions and install everything*
|
||||
Apart from that the other steps are identical. Running Docker is pretty slow even on a PI3, be prepared for it to take an hour or two to build all of the extensions and install everything.
|
||||
|
||||
## {% linkable_title Manual Installation %}
|
||||
|
||||
|
@ -82,17 +81,23 @@ Change your working directory to the repository root. Moving forward, we will be
|
|||
$ cd hadashboard
|
||||
```
|
||||
|
||||
### {% linkable_title 2. Install Dashing and prereqs %}
|
||||
### {% linkable_title 2. Install Dashing and prerequirments %}
|
||||
|
||||
Essentially, you want to make sure that you have Ruby installed on your local machine. Then, install the Dashing gem:
|
||||
Essentially, you want to make sure that you have Ruby installed on your local machine.
|
||||
|
||||
``` bash
|
||||
For Debian based distribution do:
|
||||
|
||||
```bash
|
||||
$ sudo apt-get install rubygems
|
||||
```
|
||||
|
||||
Then, install the Dashing gem:
|
||||
|
||||
```bash
|
||||
$ gem install dashing
|
||||
```
|
||||
|
||||
From your repository root, make sure that all dependencies are available.
|
||||
|
||||
Note: on some systems you may also need to install bundler:
|
||||
From your repository root, make sure that all dependencies are available. On some systems you may also need to install `bundler`:
|
||||
|
||||
```bash
|
||||
$ gem install bundler
|
||||
|
@ -104,9 +109,7 @@ When installed run it:
|
|||
$ bundle
|
||||
```
|
||||
|
||||
Bundle will now install all the ruby prereqs for running dashing.
|
||||
|
||||
Note: Prereqs will vary across different machines. So far users have reported requirements for some additional installs to allow the bundle to complete succesfully:
|
||||
Bundle will now install all the ruby prerequirements for running dashing. Prerequirements will vary across different machines. So far users have reported requirements for some additional installs to allow the bundle to complete succesfully:
|
||||
|
||||
- ruby-dev - `sudo apt-get install ruby-dev`
|
||||
- node-js - `sudo apt-get install nodejs`
|
||||
|
@ -115,18 +118,18 @@ Note: Prereqs will vary across different machines. So far users have reported re
|
|||
|
||||
You will need to research what works on your particular architecture and also bear in mind that version numbers may change over time.
|
||||
|
||||
Note: This is currently running on various versions of Ruby and there are no strong dependencies however your mileage may vary.
|
||||
This is currently running on various versions of Ruby and there are no strong dependencies however your mileage may vary.
|
||||
|
||||
## {% linkable_title Updating configuration (Manual and Docker) %}
|
||||
|
||||
Next, in the `./lib` directory, copy the ha_conf.rb.example file to ha_conf.rb and edit its settings to reflect your installation, pointing to the machine Home Assistant is running on and adding your api_key.
|
||||
Next, in the `./lib` directory, copy the `ha_conf.rb.example` file to `ha_conf.rb` and edit its settings to reflect your installation, pointing to the machine Home Assistant is running on and adding your API key.
|
||||
|
||||
```ruby
|
||||
$ha_url = "http://192.168.1.10:8123"
|
||||
$ha_apikey = "your key"
|
||||
```
|
||||
|
||||
- `$ha_url` is a reference to your home assistant installation and must include the correct port number and scheme (`http://` or `https://` as appropriate)
|
||||
- `$ha_url` is a reference to your Home Assistant installation and must include the correct port number and scheme (`http://` or `https://` as appropriate)
|
||||
- `$ha_apikey` should be set to your key if you have one, otherwise it can remain blank.
|
||||
|
||||
The file also contains example newsfeeds for the News widget:
|
||||
|
|
|
@ -10,8 +10,8 @@ footer: true
|
|||
redirect_from: /ecosystem/hadashboard/reboot/
|
||||
---
|
||||
|
||||
To run Dashing and `hapush` at reboot, I have provided sample init scripts in the `./init` directory. These have been tested on a Raspberry Pi - your mileage may vary on other systems.
|
||||
To run Dashing and `hapush` at reboot, checkout out the sample init scripts in the `./init` directory. These have been tested on a Raspberry Pi - your mileage may vary on other systems.
|
||||
|
||||
Instructions for automatically starting a docker install can be found [here](https://docs.docker.com/engine/admin/host_integration/).
|
||||
Instructions for automatically starting a Docker installation can be found [here](https://docs.docker.com/engine/admin/host_integration/).
|
||||
|
||||
For docker you may also want to use docker-compose - there is a sample compose file in the `./init` directory.
|
||||
For Docker you may also want to use `docker-compose` - there is a sample compose file in the `./init` directory.
|
||||
|
|
|
@ -16,10 +16,10 @@ To update the dashboard after new code has been released, just run the following
|
|||
$ git pull origin
|
||||
```
|
||||
|
||||
For some releases you may also need to rerun the bundle command:
|
||||
For some releases you may also need to rerun the `bundle` command:
|
||||
|
||||
``` bash
|
||||
$ bundle
|
||||
```
|
||||
|
||||
For docker users, you will also need to rerun the docker build process.
|
||||
For Docker users, you will also need to rerun the Docker build process.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue