This add-on is insired by https://github.com/jakubcizek/pojdmeprogramovatelektroniku/tree/master/SrazkovyRadar.
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.
Homeassistant automation calls laskakit_feeder_rain
rest_command service, add-on processes precipitation image and send data to LaskaKit.
- In Home Assistant go to
Settings
>Add-ons
>Add-on Store
> dots top-right >Repositories
and add the repository URLhttps://github.com/radoslavirha/homeassistant-addons.git
. - Click on
LaskaKit data feeder
>INSTALL
. - Click on
Configuration
and set required value oflaskakit_url
. - Click on
START
after enablingWatchdog
and optionallyAuto update
. Click onLOGS
andREFRESH
to see everything is working as expected.
laskakit_url
(required) - URL to LaskaKitimage_to_console
(default false) - displays the ČHMÚ image with the picture where it is raining in the consolelog_level
(default info) - one ofdebug
|info
|warn
|error
Add the following to configuration.yaml
and restart:
rest_command:
laskakit_feeder_rain:
url: http://{your IP}:8000/rain
method: GET
GET
/documentation
(Swagger documentation UI)
GET
/rain
(Downloads precipitation image from ČHMÚ, process and send data to LaskaKit)
Query Parameters
name type data type default description pixelBuffer optional int 0 Pixel buffer around the city
Responses
http code content-type response 200
application/json
Array of cities sent to LaskaKit 400
application/json
Boom error
Example cURL
curl -X GET http://0.0.0.0:8000/rain curl -X GET http://0.0.0.0:8000/rain?pixelBuffer=5
GET
/rain/image
(Downloads precipitation image from ČHMÚ, creates current image and returns joined image)
Query Parameters
name type data type default description pixelBuffer optional int 0 Pixel buffer around the city
Responses
http code content-type response 200
image/png
Radar and current conditions image 400
application/json
Boom error
Example cURL
curl -X GET http://0.0.0.0:8000/rain/image curl -X GET http://0.0.0.0:8000/rain/image?pixelBuffer=5
Swagger UI does not show parsed payload/params/query/headers validators. It's built for Joi, not Zod. Requested feature: hapi-swagger/hapi-swagger#804 (comment)
Add more data sources!