-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
166cbff
commit ddd1cb4
Showing
3 changed files
with
68 additions
and
119 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,67 @@ | ||
# Home Assistant Add-on: LaskaKit data feeder | ||
|
||
This add-on is insired by https://github.com/jakubcizek/pojdmeprogramovatelektroniku/tree/master/SrazkovyRadar. | ||
|
||
## Description | ||
|
||
This add-on is basically a Node.js server that processes data from the ČHMÚ precipitation radar and sends it to the pre-programmed [LaskaKit](https://www.laskakit.cz/laskakit-interaktivni-mapa-cr-ws2812b/). | ||
|
||
### How does it work? | ||
|
||
Homeassistant automation calls `laskakit_feeder_rain` rest_command service, add-on processes precipitation image and send data to LaskaKit. | ||
|
||
## Installation | ||
|
||
1) In Home Assistant go to `Settings` > `Add-ons` > `Add-on Store` > dots top-right > `Repositories` and add the repository URL `https://github.com/radoslavirha/homeassistant-addons.git`. | ||
2) Click on `LaskaKit data feeder` > `INSTALL`. | ||
3) Click on `Configuration` and set required value of `laskakit_url`. | ||
4) Click on `START` after enabling `Watchdog` and optionally `Auto update`. Click on `LOGS` and `REFRESH` to see everything is working as expected. | ||
|
||
## Configuration | ||
|
||
- `laskakit_url` (required) - URL to LaskaKit | ||
- `image_to_console` (default false) - displays the ČHMÚ image with the picture where it is raining in the console | ||
- `log_level` (default info) - one of `debug` | `info` | `warn` | `error` | ||
|
||
## Homeassistant service | ||
|
||
Add the following to `configuration.yaml` and restart: | ||
|
||
```yaml | ||
rest_command: | ||
laskakit_feeder_rain: | ||
url: http://{your IP}:8000/rain | ||
method: GET | ||
``` | ||
## Add-on REST API | ||
<details> | ||
<summary><code>GET</code> <code><b>/documentation</b></code> <code>(Swagger documentation)</code></summary> | ||
</details> | ||
<details> | ||
<summary><code>GET</code> <code><b>/rain</b></code> <code>(Downloads precipitation image from ČHMÚ, process and send data to LaskaKit)</code></summary> | ||
Query Parameters | ||
> | name | type | data type | default | description | | ||
> |-------------|-----------|-----------|---------|---------------------------------------------| | ||
> | pixelBuffer | optional | int | 0 | Pixel buffer around the city | | ||
</details> | ||
<details> | ||
<summary><code>GET</code> <code><b>/rain/image</b></code> <code>(Downloads precipitation image from ČHMÚ, creates current image and returns joined image)</code></summary> | ||
Query Parameters | ||
> | name | type | data type | default | description | | ||
> |-------------|-----------|-----------|---------|---------------------------------------------| | ||
> | pixelBuffer | optional | int | 0 | Pixel buffer around the city | | ||
</details> | ||
Swagger UI does not show parsed payload/params/query/headers validators. It's built for Joi, not Zod. Requested feature: https://github.com/hapi-swagger/hapi-swagger/issues/804#issue-1734729569 | ||
## Future | ||
Add more data sources! |