feat: add Home Assistant support
- docs/homeassistant-config.md: Lovelace Map Card + custom:map-card (HACS) - docs/api-endpoints.md: HA Tile-Layer Beispiel ergänzt - .github/copilot-instructions.md: HA als Zieldienst aufgeführt - nginx/nginx.conf: HA in CORS-Kommentar ergänzt
This commit is contained in:
parent
dcc47babf9
commit
7dd8b44ea8
4 changed files with 65 additions and 3 deletions
4
.github/copilot-instructions.md
vendored
4
.github/copilot-instructions.md
vendored
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## Project
|
## Project
|
||||||
Selbst gehosteter Tile-Server (rd13) – stellt Karten-Tiles (OSM Vektor + Satelliten-Raster)
|
Selbst gehosteter Tile-Server (rd13) – stellt Karten-Tiles (OSM Vektor + Satelliten-Raster)
|
||||||
für interne Dienste bereit: MediaWiki (Kartographer), Nextcloud Maps und weitere Web-Apps.
|
für interne Dienste bereit: MediaWiki (Kartographer), Nextcloud Maps, Home Assistant und weitere Web-Apps.
|
||||||
|
|
||||||
## Stack
|
## Stack
|
||||||
- Language: Shell (Bash/Fish), JSON, Nginx config
|
- Language: Shell (Bash/Fish), JSON, Nginx config
|
||||||
|
|
@ -29,7 +29,7 @@ für interne Dienste bereit: MediaWiki (Kartographer), Nextcloud Maps und weiter
|
||||||
```
|
```
|
||||||
config/ TileServer-GL config.json
|
config/ TileServer-GL config.json
|
||||||
data/ MBTiles, Fonts, Sprites, Styles (nicht im Git)
|
data/ MBTiles, Fonts, Sprites, Styles (nicht im Git)
|
||||||
docs/ Integrations-Anleitungen (MediaWiki, Nextcloud, API)
|
docs/ Integrations-Anleitungen (MediaWiki, Nextcloud, Home Assistant, API)
|
||||||
nginx/ nginx.conf, cors.conf
|
nginx/ nginx.conf, cors.conf
|
||||||
prompts/ GitHub Copilot Prompt-Templates
|
prompts/ GitHub Copilot Prompt-Templates
|
||||||
scripts/ Daten-Download, Deploy-Hilfen
|
scripts/ Daten-Download, Deploy-Hilfen
|
||||||
|
|
|
||||||
|
|
@ -32,3 +32,13 @@
|
||||||
# style: 'http://SERVER:PORT/styles/osm-bright.json',
|
# style: 'http://SERVER:PORT/styles/osm-bright.json',
|
||||||
# container: 'map'
|
# container: 'map'
|
||||||
# });
|
# });
|
||||||
|
#
|
||||||
|
# Home Assistant – configuration.yaml:
|
||||||
|
# map:
|
||||||
|
# lovelace card (custom:map-card oder built-in):
|
||||||
|
# tile_layer_url: 'http://SERVER:PORT/styles/osm-bright/{z}/{x}/{y}.png'
|
||||||
|
# tile_layer_attribution: '© OpenMapTiles © OpenStreetMap contributors'
|
||||||
|
#
|
||||||
|
# Für Home Assistant custom:map-card (HACS):
|
||||||
|
# tile_layer_url: 'http://SERVER:PORT/styles/osm-bright/{z}/{x}/{y}.png'
|
||||||
|
# tile_layer_max_zoom: 19
|
||||||
|
|
|
||||||
52
docs/homeassistant-config.md
Normal file
52
docs/homeassistant-config.md
Normal file
|
|
@ -0,0 +1,52 @@
|
||||||
|
# Home Assistant – eigenen Tile-Server verwenden
|
||||||
|
#
|
||||||
|
# Home Assistant kann über mehrere Wege eigene Karten-Tiles nutzen.
|
||||||
|
#
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# Option 1: Map Card (Standard Lovelace)
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# In einer Lovelace-Dashboard-Karte (type: map) wird der Tile-Server über
|
||||||
|
# ein custom Frontend-Modul eingebunden. Die eingebaute Map-Card unterstützt
|
||||||
|
# ab HA 2024.x direkt eigene Tile-Layer:
|
||||||
|
#
|
||||||
|
# Lovelace YAML (Dashboard → Karte bearbeiten → YAML-Modus):
|
||||||
|
#
|
||||||
|
# type: map
|
||||||
|
# entities:
|
||||||
|
# - person.YOUR_PERSON
|
||||||
|
# default_zoom: 12
|
||||||
|
# # Tile Layer Override (ab HA 2024.6+):
|
||||||
|
# tile_layer: http://TILE_SERVER_URL:8080/styles/osm-bright/{z}/{x}/{y}.png
|
||||||
|
# tile_layer_attribution: "© OpenMapTiles © OpenStreetMap contributors"
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# Option 2: custom:map-card (HACS)
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# https://github.com/nathan-gs/ha-map-card
|
||||||
|
#
|
||||||
|
# type: custom:map-card
|
||||||
|
# x: 48.137
|
||||||
|
# y: 11.576
|
||||||
|
# zoom: 12
|
||||||
|
# tile_layer_url: "http://TILE_SERVER_URL:8080/styles/osm-bright/{z}/{x}/{y}.png"
|
||||||
|
# tile_layer_attribution: "© OpenMapTiles © OpenStreetMap contributors"
|
||||||
|
# tile_layer_max_zoom: 19
|
||||||
|
# entities:
|
||||||
|
# - entity: person.YOUR_PERSON
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# Option 3: Satellitenkarte als alternativer Layer
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# type: custom:map-card
|
||||||
|
# tile_layer_url: "http://TILE_SERVER_URL:8080/styles/satellite-hybrid/{z}/{x}/{y}.png"
|
||||||
|
# tile_layer_attribution: "© OpenMapTiles © Sentinel-2"
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# Hinweise
|
||||||
|
# -------------------------------------------------------------------------
|
||||||
|
# - TILE_SERVER_URL ersetzen mit der IP/Hostname des Tile-Servers im LAN
|
||||||
|
# - Port 8080 ist Standard (nginx-Proxy), anpassen falls abweichend
|
||||||
|
# - CORS ist bereits für das gesamte LAN (Origin: *) konfiguriert
|
||||||
|
# - Home Assistant muss den Tile-Server über HTTP im LAN erreichen können
|
||||||
|
# - Für HTTPS-Setups: Tile-Server ebenfalls über HTTPS erreichbar machen
|
||||||
|
# (z.B. über nginx Reverse Proxy mit SSL-Terminierung)
|
||||||
|
|
@ -14,7 +14,7 @@ http {
|
||||||
listen 80;
|
listen 80;
|
||||||
server_name _;
|
server_name _;
|
||||||
|
|
||||||
# CORS für alle Clients (MediaWiki, Nextcloud, etc.)
|
# CORS für alle Clients (MediaWiki, Nextcloud, Home Assistant, etc.)
|
||||||
include /etc/nginx/cors.conf;
|
include /etc/nginx/cors.conf;
|
||||||
|
|
||||||
location / {
|
location / {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue