Skip to content

Commit

Permalink
docs: create DOCS.md
Browse files Browse the repository at this point in the history
  • Loading branch information
radoslavirha committed Jun 5, 2023
1 parent 166cbff commit ddd1cb4
Show file tree
Hide file tree
Showing 3 changed files with 68 additions and 119 deletions.
64 changes: 1 addition & 63 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,66 +8,4 @@ This add-on is insired by https://github.com/jakubcizek/pojdmeprogramovatelektro

[CHANGELOG](CHANGELOG.md)

## 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!
[Add-on docs](laskakit-data-feeder/DOCS.md)
56 changes: 0 additions & 56 deletions laskakit-data-feeder/.README.j2
Original file line number Diff line number Diff line change
Expand Up @@ -12,62 +12,6 @@ This add-on is basically a Node.js server that processes data from the ČHMÚ pr

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!

[maintenance-shield]: https://img.shields.io/maintenance/yes/2023.svg
[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg
[release-shield]: https://img.shields.io/badge/version-{{ version }}-blue.svg
Expand Down
67 changes: 67 additions & 0 deletions laskakit-data-feeder/DOCS.md
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!

0 comments on commit ddd1cb4

Please sign in to comment.