signalk-mareas-ihm 2.1.4 → 2.1.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,108 +1,129 @@
1
1
  # signalk-mareas-ihm
2
2
 
3
- 🇪🇸 [Español](#español) · 🇬🇧 [English](#english)
3
+ **A complete anchor watch and marine safety webapp for Signal K.**
4
+ Voice alarms, shelter forecasting, on-board wave measurement, multi-source charts and official Spanish IHM tide predictions — running on your OpenPlotter / Raspberry Pi.
4
5
 
5
- ---
6
-
7
- ## Español
6
+ 🇬🇧 [English](#english) · 🇪🇸 [Español](#espanol)
8
7
 
9
- Plugin de Signal K que convierte tu OpenPlotter / Raspberry Pi en un **visor completo de fondeo**: mareas oficiales del **IHM (Instituto Hidrográfico de la Marina)**, previsión de abrigo, medición de olas a bordo, alarmas inteligentes y soporte para domótica.
8
+ ---
10
9
 
11
- ### Características principales
10
+ ## English
12
11
 
13
- #### Mareas
14
- - **Predicción de mareas** automática por GPS o selección manual entre 70 estaciones del IHM.
15
- - **Curvas de marea interactivas** con HAT/LAT anuales, cursor y etiquetas de pleamar/bajamar.
16
- - **Coeficientes oficiales IHM** con descarga automática.
17
- - **Caché offline** de al menos 2 meses de predicciones.
18
- - **Tendencia y coeficiente** visibles en la barra superior del visor.
12
+ ### What you get
13
+
14
+ A single Signal K plugin that turns your boat computer into a serious **anchor watch** with everything a cruiser actually needs:
15
+
16
+ - 🗺️ **Marine charts** — customizable transparencies and multilayer viewer with highly detailed worldwide **Bathymetry** + **Esri Satellite** + **IHM ENC S-52** + **MBTiles charts for offline use** + **OpenStreetMap** + **OpenSeaMap** + **SK Charts plugin integration**
17
+ - **Smart anchor watch** with predictive swing radius based on tide and weather
18
+ - 🌐 **Real-time multi-device sync** via SSE — phone, tablet and chartplotter all show the same state
19
+ - 🚢 **AIS anchoring potential collision watch** — drag detection on neighbouring boats with voice alarm and per-target ACK
20
+ - 🎙️ **Voice alarms** for anchor drag, AIS collision and grounding (in your language, not synth voices)
21
+ - 🏔️ **Shelter forecast** — when anchoring, auto-detection of which sectors are open vs sheltered depending on the current conditions and a 12 h hour-by-hour forecast
22
+ - 🌅 **Tide predictions** — official IHM Spain for >70 stations, FES2014 global fallback for anywhere else; open to suggestions for other countries' free official or just reliable tide APIs
23
+ - 🌊 **On-board wave measurement** from your IMU (no extra sensor needed)
24
+ - 📊 **Sounder calculator** — chain, scope, depth, swing prediction
25
+ - 🌤️ **Weather forecast** with Open-Meteo (multiple models, sea temperature, wave height & period)
26
+ - 🌀 **Windy integration**: access to Windy map and forecast directly from your viewer
27
+ - ⛵ **Windregatta.com integration**: a new and promising cutting-edge free sailing route planner — a great discovery!
28
+ - 🚀 **Shortcuts to KIP and SK Freeboard** directly from your viewer
29
+ - 🇬🇧 🇪🇸 **Fully bilingual UI** (English / Spanish) — switch from the menu
30
+
31
+ Runs on **Raspberry Pi** (OpenPlotter), **any Linux box** or **macOS / Windows** with Signal K Server.
32
+
33
+ ### ⭐ Why this plugin
34
+
35
+ Most anchor watch apps are paid, closed source, single-device and tied to a vendor's hardware. This one:
36
+
37
+ - Is **free and open source** (Apache 2.0).
38
+ - Runs **on your existing Signal K server** — no extra hardware.
39
+ - Shows the **same alarm on every device** (phone, tablet, chartplotter, Pi screen).
40
+ - Uses your **boat's real sensors** (anemometer, depth, IMU) when available; falls back to forecast when not.
41
+ - Has **mobile-first UI** that works on phone screens, big monitors and the Pi browser.
42
+ - Handles **edge cases** real cruisers hit: AudioContext suspended after backgrounding, browser autoplay blocks, multiple AIS targets in zone, snooze + un-snooze, etc.
43
+
44
+ ### Key features in detail
45
+
46
+ #### Anchor watch
47
+ - **Predictive swing radius**: combines depth, chain deployed and tide cycle to predict the actual swing area over the next 12 h — not just a static circle.
48
+ - **Two chain calculation methods**: classic ratio and the Vicente method (15 + 2 × depth).
49
+ - **Drag detection** with audible siren that bypasses user mute for safety.
50
+ - **GPS track** with time-gradient colouring so you can see exactly where the boat has been.
51
+ - **Favourite anchorages** saved with a custom name (or auto-named from geolocation).
52
+
53
+ #### AIS collision watch
54
+ - **Voice alarm** when an AIS target enters your swing zone.
55
+ - **30 s grace window** before voice starts — see the modal first, hit ACK if it's a false positive.
56
+ - **Per-target ACK** with timestamp, so silencing one boat doesn't disable the alarm for others.
57
+ - **Drag detection on neighbours** — if an ACKed boat starts approaching >5 m/min, the alarm re-engages.
58
+ - **Anchor estimation** for other boats via track centroid analysis.
59
+
60
+ #### Shelter forecasting
61
+ - **16-sector wind rose** with automatic open/sheltered detection from OpenStreetMap coastline.
62
+ - **A–F grade** + **0–100 % protection score** computed from forecast wind in exposed sectors.
63
+ - **12 h strip** with per-hour grade and peak wind.
64
+ - **24 h wave history** from on-board IMU (acceleration RMS by intensity band).
65
+ - **Real-time degrade**: if measured wind on the anemometer is higher than the forecast in an exposed sector, the grade is downgraded automatically.
19
66
 
20
- #### Previsión de abrigo
21
- - **Rosa de 16 sectores** con detección automática del abrigo según la costa (OpenStreetMap).
22
- - **Grado A-F y porcentaje de protección** combinando viento y olas previstos.
23
- - **Strip de exposición** próximas 12 h con previsión hora a hora.
24
- - **Resumen "AHORA / PREDICCIÓN"** con datos en tiempo real de sensores y previsión.
25
- - **Edición manual** de sectores cuando el detector automático no convence.
26
-
27
- #### Medición de olas en fondeo
28
- - **Dirección, período y altura** de ola calculados a bordo desde sensores de actitud y aceleración (pypilot IMU u otros compatibles).
29
- - **Historial de las últimas 24 h** en barras de 15 minutos.
30
- - **El grado de abrigo se ajusta automáticamente** cuando la ola medida supera la prevista.
31
-
32
- #### Visor de fondeo
33
- - **Mapa Leaflet** con posición GPS en tiempo real y capas múltiples (ESRI, Bing, Google, IHM S-52, Batimetría, MBTiles offline).
34
- - **Anchor Watch** con alarma de garreo visual y sonora.
35
- - **Cadena largada** con slider bidireccional y cálculo automático (métodos tradicional y Vicente).
36
- - **Radio de borneo y alarma** con etiquetas en la carta y predicción según marea.
37
- - **Sincronización multi-dispositivo** en tiempo real (SSE).
38
- - **Cartas náuticas locales** vía servidor MBTiles integrado.
39
-
40
- #### Sensores en tiempo real
41
- - Lectura directa de **viento (veleta)**, **temperatura aire/agua** y **presión atmosférica** de Signal K.
42
- - Etiquetas **"Veleta"** y **"Sensor"** distinguen datos reales de previsión.
43
- - **Fallback automático a Open-Meteo** cuando un sensor falla.
44
- - **Sonda inteligente**: detecta congelación / spikes / valores absurdos y deja de mostrar lecturas inventadas.
45
-
46
- #### AIS inteligente
47
- - **Detección de colisión** con targets AIS en zona de borneo.
48
- - **ACK por target individual** silencia alarma de un barco sin desactivar la alarma general.
49
- - **Detección de garreo ajeno** — si un target ACKed se acerca >2 m/min, la alarma se reactiva.
50
- - **Estimación de ancla** de otros barcos mediante análisis de track (centroide + radio máximo).
51
-
52
- #### Alarmas y audio
53
- - **Alarmas independientes**: garreo, varada, AIS y sonda con control individual.
54
- - **Voces pregrabadas (OGG)** por idioma — más naturales que el sintetizador.
55
- - **Detección automática** de la salida de audio del Raspberry Pi (USB → analog → HDMI).
56
- - **Soporte móvil** fiable (audio funciona incluso con la pestaña en segundo plano).
57
- - **Patrones distintos** por evento ("tuc tuc tuc" para AIS, sirena para garreo, etc.).
58
-
59
- #### Domótica / KIP
60
- - **Botones KIP** para fondear/levar y activar/desactivar alarmas.
61
- - **Endpoints REST** para Alexa, Google Home, Node-RED, MQTT.
62
- - **Endpoint toggle** para mandos a distancia con un solo botón.
63
-
64
- #### Bilingüe completo
65
- - Interfaz en **español e inglés** en todas las vistas.
66
- - Compass cardinal en español correcto (N/NE/E/SE/S/SO/O/NO).
67
- - Banderas de idioma en la barra inferior del visor.
67
+ #### Tides
68
+ - **Official IHM Spain predictions** for >70 stations with annual HAT/LAT and constituent coefficients.
69
+ - **Worldwide fallback** via Open-Meteo / FES2014 (USA, UK, Australia, Japan, etc.).
70
+ - **Interactive tide curve** with cursor, peaks and 2-month offline cache.
71
+ - **No API key required** for any tide source.
72
+
73
+ #### Weather forecast
74
+ - **Open-Meteo** integrated (free, no API key, no rate limit issues).
75
+ - **Multiple models**: ICON (DWD), GFS (NOAA), ECMWF, Météo-France Arome, GEM, JMA.
76
+ - **Sea temperature, wave height, period and direction** when available.
77
+ - **48 h hourly table** + collapsible plain-language summary.
78
+
79
+ #### Audio & alarms
80
+ - **Per-language voice clips (OGG)** natural, no robotic synth.
81
+ - **Snooze 5 min** for AIS (anchor drag is never snoozable for safety).
82
+ - **60 s user-mute window** if you mute manually, even garreo cannot override for 60 s.
83
+ - **Visibility-aware**: when phone screen wakes from sleep, AudioContext is resumed automatically.
84
+ - **Vibration fallback** on Android when autoplay policy blocks audio.
85
+
86
+ #### Charts & layers
87
+ - **Esri Satellite**, **IHM ENC S-52** (Spain official charts), **Bathymetry overlay**, **OpenStreetMap**, **OpenSeaMap** seamarks, **Bing Hybrid**, **Esri Clarity**, **Google Satellite**.
88
+ - **MBTiles offline** drop your `.mbtiles` files in a folder and they show up automatically.
89
+ - **Signal K registered charts** any chart you've registered with Signal K appears as a layer.
90
+ - **Per-layer opacity slider** with default values you can tweak.
91
+
92
+ #### Home Automation / KIP / Freeboard
93
+ - **KIP buttons** for drop/lift and toggle alarms — open Freeboard-SK with one tap from the side bar.
94
+ - **REST endpoints** for Alexa, Google Home, Node-RED, MQTT bridges, custom dashboards.
95
+ - **`/toggle` endpoint** for single-button remote controls.
68
96
 
69
97
  ### URLs
70
98
 
71
- | URL | Función |
72
- |-----|---------|
73
- | `/signalk-mareas-ihm/` | Landing — selector Mareas / Visor de Fondeo |
74
- | `/signalk-mareas-ihm/mareas` | Vista de Mareas (directo) |
75
- | `/signalk-mareas-ihm/visorfondeo` | Visor de Fondeo (directo) |
99
+ | URL | What it does |
100
+ |-----|----------|
101
+ | `/signalk-mareas-ihm/` | Landing — choose Tides or Anchor Watch |
102
+ | `/signalk-mareas-ihm/mareas` | Tides view (direct) |
103
+ | `/signalk-mareas-ihm/visorfondeo` | Anchor Watch viewer (direct) |
104
+ | `/signalk-mareas-ihm/mobile` | Mobile-first viewer (recommended on phones) |
76
105
 
77
- ### DomóticaEndpoints REST
106
+ ### Home Automation REST endpoints
78
107
 
79
108
  ```bash
80
- # Fondear/Levar con un solo botón
109
+ # One-button drop or lift (auto detects current anchor state)
81
110
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/toggle
82
111
 
83
- # Fondear en posición GPS actual
112
+ # Drop anchor at current GPS
84
113
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/drop
85
114
 
86
- # Levar ancla
115
+ # Lift anchor
87
116
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/lift
88
117
 
89
- # Estado simple (para monitorización)
118
+ # Simple JSON status (for monitoring / dashboards)
90
119
  curl http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/simple
91
120
  ```
92
121
 
93
- ### KIP — Paths para Boolean Control
122
+ ### Quick install
94
123
 
95
- | Path | Función |
96
- |------|---------|
97
- | `environment.anchor.mareasIhm.anchorCommand` | Fondear (true) / Levar (false) |
98
- | `environment.anchor.mareasIhm.garreoAlarmCommand` | Alarma garreo ON/OFF |
99
- | `environment.anchor.mareasIhm.aisAlarmCommand` | Alarma AIS ON/OFF |
124
+ From the **Signal K Appstore**: search `signalk-mareas-ihm` and click install.
100
125
 
101
- ### Instalación
102
-
103
- Desde el **Signal K Appstore**: buscar `signalk-mareas-ihm` e instalar.
104
-
105
- O por línea de comandos:
126
+ Or from the command line:
106
127
 
107
128
  ```bash
108
129
  cd ~/.signalk
@@ -110,99 +131,149 @@ npm install signalk-mareas-ihm@latest --save
110
131
  sudo systemctl restart signalk
111
132
  ```
112
133
 
134
+ Then open: `http://your-pi.local:3000/signalk-mareas-ihm/`
135
+
136
+ ### Tested on
137
+
138
+ - Raspberry Pi 4 (OpenPlotter V4) — primary target.
139
+ - Linux x64, macOS, Windows 11.
140
+ - Firefox, Chrome, Safari on iOS / Android.
141
+
142
+ ### Disclaimer
143
+
144
+ This is a navigation aid, **not** a replacement for proper anchor watch with eyes on the boat. The author takes no responsibility for dragging, collision, grounding or any other incident. Use at your own risk.
145
+
146
+ ### Contributing & support
147
+
148
+ Issues, PRs and feature requests welcome at the [GitHub repo](https://github.com/Aitonos/signalk-mareas-ihm).
149
+
150
+ ### License
151
+
152
+ Apache 2.0. Derived from `signalk-tides` (Brandon Keepers, Joachim Bakke, Scott Bender and contributors).
153
+
113
154
  ---
114
155
 
115
- ## English
156
+ <a id="espanol"></a>
116
157
 
117
- Signal K plugin that turns your OpenPlotter / Raspberry Pi into a **complete anchor watch viewer**: official Spanish tides from **IHM (Instituto Hidrográfico de la Marina)**, shelter forecast, on-board wave measurement, smart alarms and home automation support.
158
+ ## Español
118
159
 
119
- ### Main Features
160
+ Plugin de Signal K que convierte tu OpenPlotter / Raspberry Pi en una **webapp completa de anchor watch y seguridad marina**: alarmas de voz, previsión de abrigo, medición de olas a bordo, cartas náuticas multi-fuente y mareas oficiales del IHM (Instituto Hidrográfico de la Marina) de España.
120
161
 
121
- #### Tides
122
- - **Automatic tide prediction** by GPS or manual selection among 70 IHM stations.
123
- - **Interactive tide curves** with annual HAT/LAT, cursor and high/low tide labels.
124
- - **Official IHM coefficients** with automatic download.
125
- - **Offline cache** of at least 2 months of predictions.
126
- - **Tendency and coefficient** visible in the viewer's top bar.
127
-
128
- #### Shelter forecast
129
- - **16-sector rose** with automatic shelter detection from coastline (OpenStreetMap).
130
- - **Grade A-F and protection percentage** combining forecast wind and waves.
131
- - **12 h exposure strip** with hourly forecast.
132
- - **"NOW / FORECAST" summary** with real-time sensor and forecast data.
133
- - **Manual sector override** when the automatic detector is wrong.
134
-
135
- #### On-board wave measurement
136
- - **Direction, period and height** of waves computed on board from attitude and acceleration sensors (pypilot IMU or compatible).
137
- - **24 h history** in 15-minute bars.
138
- - **Shelter grade auto-adjusts** when measured wave exceeds forecast.
139
-
140
- #### Anchor watch viewer
141
- - **Leaflet map** with real-time GPS position and multiple layers (ESRI, Bing, Google, IHM S-52, Bathymetry, offline MBTiles).
142
- - **Anchor Watch** with visual and audible drag alarm.
143
- - **Chain deployed** with bidirectional slider and automatic calculation (traditional and Vicente methods).
144
- - **Swing and alarm radius** with chart labels and tide-aware prediction.
145
- - **Multi-device real-time sync** (SSE).
146
- - **Local nautical charts** via integrated MBTiles server.
147
-
148
- #### Real-time sensors
149
- - Direct reading of **wind (anemometer)**, **air/water temperature** and **atmospheric pressure** from Signal K.
150
- - **"Veleta"** and **"Sensor"** badges distinguish real data from forecast.
151
- - **Automatic Open-Meteo fallback** when a sensor drops.
152
- - **Smart depth sounder**: detects frozen / spike / absurd values and stops showing made-up readings.
153
-
154
- #### Smart AIS
155
- - **Collision detection** with AIS targets in swing zone.
156
- - **Per-target ACK** silence alarm for one boat without disabling the general alarm.
157
- - **External dragging detection** if an ACKed target approaches >2 m/min, alarm reactivates.
158
- - **Anchor estimation** for other boats via track analysis (centroid + max radius).
159
-
160
- #### Alarms and audio
161
- - **Independent alarms**: drag, grounding, AIS and depth with individual control.
162
- - **Pre-recorded voices (OGG)** per language — more natural than synthesizer.
163
- - **Automatic detection** of Raspberry Pi audio output (USB analog HDMI).
164
- - **Reliable mobile support** (audio works even when the tab is in background).
165
- - **Distinct patterns** per event (rapid beep for AIS, siren for drag, etc.).
166
-
167
- #### Home Automation / KIP
168
- - **KIP buttons** for drop/lift and alarm enable/disable.
169
- - **REST endpoints** for Alexa, Google Home, Node-RED, MQTT.
170
- - **Toggle endpoint** for single-button remote controls.
171
-
172
- #### Full Bilingual
173
- - Interface in **Spanish and English** across all views.
174
- - Correct Spanish cardinal compass (N/NE/E/SE/S/SO/O/NO).
175
- - Language flags in the viewer's bottom bar.
162
+ ### Qué te llevas
163
+
164
+ Un único plugin de Signal K que convierte el ordenador del barco en un **anchor watch serio** con todo lo que un navegante de verdad necesita:
165
+
166
+ - 🗺️ **Cartas náuticas** transparencias configurables y visor multicapa con **Batimetría mundial de alto detalle** + **Satélite Esri** + **IHM ENC S-52** + **MBTiles para uso offline** + **OpenStreetMap** + **OpenSeaMap** + **integración con plugin SK Charts**
167
+ - **Anchor watch inteligente** con radio de borneo predictivo según marea y meteo
168
+ - 🌐 **Sincronización multi-dispositivo en tiempo real** vía SSE — móvil, tablet y chartplotter muestran el mismo estado
169
+ - 🚢 **Vigilancia de colisión AIS al fondear** — detección de garreo en barcos vecinos con alarma de voz y ACK por target
170
+ - 🎙️ **Alarmas de voz** para garreo, colisión AIS y varada (en tu idioma, no voz sintética)
171
+ - 🏔️ **Previsión de abrigo** al fondear, autodetección de qué sectores están abiertos vs abrigados según las condiciones actuales y previsión hora a hora durante 12 h
172
+ - 🌅 **Mareas oficiales** IHM España para >70 estaciones, fallback global FES2014 para el resto del mundo; abierto a sugerencias de otras APIs oficiales gratuitas o fiables
173
+ - 🌊 **Medición de olas a bordo** desde tu IMU (sin sensor extra)
174
+ - 📊 **Calculadora de fondeo** cadena, scope, sonda, predicción de borneo
175
+ - 🌤️ **Previsión meteo** con Open-Meteo (varios modelos, temperatura del mar, altura y período de ola)
176
+ - 🌀 **Integración Windy**: acceso al mapa y previsión de Windy directamente desde el visor
177
+ - **Integración Windregatta.com**: un nuevo y prometedor planificador de rutas a vela libre y muy puntero ¡un gran descubrimiento!
178
+ - 🚀 **Accesos directos a KIP y SK Freeboard** desde el propio visor
179
+ - 🇬🇧 🇪🇸 **UI bilingüe completa** (Inglés / Español) cambio desde el menú
180
+
181
+ Funciona en **Raspberry Pi** (OpenPlotter), **cualquier Linux** o **macOS / Windows** con Signal K Server.
182
+
183
+ ### Por qué este plugin
184
+
185
+ La mayoría de apps de anchor watch son de pago, código cerrado, un solo dispositivo y atadas al hardware del fabricante. Esta:
186
+
187
+ - Es **libre y open source** (Apache 2.0).
188
+ - Corre en tu **Signal K Server existente** — sin hardware extra.
189
+ - Muestra la **misma alarma en todos los dispositivos** (móvil, tablet, plotter, pantalla del Pi).
190
+ - Usa los **sensores reales del barco** (veleta, sonda, IMU) cuando están; cae a previsión si no.
191
+ - Tiene **UI mobile-first** que funciona en móvil, monitor grande y el navegador del Pi.
192
+ - Maneja los **casos límite** que sufre el navegante real: AudioContext suspendido tras background, bloqueo de autoplay del navegador, múltiples targets AIS en zona, snooze + un-snooze, etc.
193
+
194
+ ### Funcionalidades en detalle
195
+
196
+ #### Anchor watch
197
+ - **Radio de borneo predictivo**: combina sonda, cadena largada y ciclo de marea para predecir el área real de borneo en las próximas 12 h — no un círculo estático.
198
+ - **Dos métodos de cálculo de cadena**: ratio clásico y método Vicente (15 + 2 × sonda).
199
+ - **Detección de garreo** con sirena audible que bypassa el mute del usuario por seguridad.
200
+ - **Track GPS** con coloreado por gradiente temporal para ver exactamente por dónde ha pasado el barco.
201
+ - **Fondeos favoritos** guardados con nombre personalizado (o auto-nombrados por geolocalización).
202
+
203
+ #### Vigilancia de colisión AIS
204
+ - **Alarma de voz** cuando un target AIS entra en tu zona de borneo.
205
+ - **30 s de gracia** antes de que arranque la voz ves el modal primero, ACK si es falso positivo.
206
+ - **ACK por target** con timestamp, así silenciar un barco no desactiva la alarma para otros.
207
+ - **Detección de garreo en vecinos** — si un barco ya ACKeado empieza a acercarse >5 m/min, la alarma se reactiva.
208
+ - **Estimación del ancla** de otros barcos vía análisis de centroide del track.
209
+
210
+ #### Previsión de abrigo
211
+ - **Rosa de 16 sectores** con detección automática abierto/abrigado desde la línea de costa de OpenStreetMap.
212
+ - **Grado A-F** + **% de protección 0-100** calculado desde el viento previsto en sectores expuestos.
213
+ - **Strip de 12 h** con grado por hora y viento pico.
214
+ - **Historial de olas 24 h** desde el IMU a bordo (RMS de aceleración por banda de intensidad).
215
+ - **Degradación en tiempo real**: si el viento medido por la veleta es mayor que el previsto en un sector expuesto, el grado baja automáticamente.
216
+
217
+ #### Mareas
218
+ - **Predicciones oficiales IHM España** para >70 estaciones con HAT/LAT anual y coeficientes de constituyentes.
219
+ - **Fallback mundial** vía Open-Meteo / FES2014 (USA, UK, Australia, Japón, etc.).
220
+ - **Curva de marea interactiva** con cursor, picos y caché offline de 2 meses.
221
+ - **Sin API key** para ninguna fuente de mareas.
222
+
223
+ #### Previsión meteo
224
+ - **Open-Meteo** integrado (gratis, sin API key, sin problemas de rate limit).
225
+ - **Múltiples modelos**: ICON (DWD), GFS (NOAA), ECMWF, Météo-France Arome, GEM, JMA.
226
+ - **Temperatura del mar, altura, período y dirección de ola** cuando están disponibles.
227
+ - **Tabla horaria 48 h** + resumen colapsable en lenguaje claro.
228
+
229
+ #### Audio y alarmas
230
+ - **Clips de voz por idioma (OGG)** — naturales, no síntesis robótica.
231
+ - **Snooze 5 min** para AIS (garreo nunca es snoozable por seguridad).
232
+ - **Ventana mute-usuario 60 s** — si silencias manualmente, ni el garreo crítico puede reactivar el audio durante 60 s.
233
+ - **Consciente de visibilidad**: cuando la pantalla del móvil despierta, el AudioContext se reanuda automáticamente.
234
+ - **Vibración fallback** en Android cuando la política de autoplay bloquea el audio.
235
+
236
+ #### Cartas y capas
237
+ - **Satélite Esri**, **IHM ENC S-52** (cartas oficiales España), **Batimetría**, **OpenStreetMap**, **OpenSeaMap** señalización marítima, **Bing Hybrid**, **Esri Clarity**, **Google Satélite**.
238
+ - **MBTiles offline** — pon tus archivos `.mbtiles` en una carpeta y aparecen automáticamente.
239
+ - **Cartas registradas en Signal K** — cualquier carta registrada con Signal K aparece como capa.
240
+ - **Slider de opacidad por capa** con valores por defecto editables.
241
+
242
+ #### Domótica / KIP / Freeboard
243
+ - **Botones KIP** para echar/levar y conmutar alarmas — abre Freeboard-SK con un toque desde la sidebar.
244
+ - **Endpoints REST** para Alexa, Google Home, Node-RED, puentes MQTT, dashboards a medida.
245
+ - **Endpoint `/toggle`** para mandos remotos de un solo botón.
176
246
 
177
247
  ### URLs
178
248
 
179
- | URL | Function |
180
- |-----|----------|
181
- | `/signalk-mareas-ihm/` | Landing — Tides / Anchor Watch selector |
182
- | `/signalk-mareas-ihm/mareas` | Tides view (direct) |
183
- | `/signalk-mareas-ihm/visorfondeo` | Anchor Watch Viewer (direct) |
249
+ | URL | Función |
250
+ |-----|---------|
251
+ | `/signalk-mareas-ihm/` | Landing — Mareas o Anchor Watch |
252
+ | `/signalk-mareas-ihm/mareas` | Vista mareas (directo) |
253
+ | `/signalk-mareas-ihm/visorfondeo` | Anchor Watch viewer (directo) |
254
+ | `/signalk-mareas-ihm/mobile` | Vista mobile-first (recomendada en móviles) |
184
255
 
185
- ### Home Automation — REST Endpoints
256
+ ### Domóticaendpoints REST
186
257
 
187
258
  ```bash
188
- # Drop/Lift with single button
259
+ # Echar o levar con un botón (auto-detecta el estado actual)
189
260
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/toggle
190
261
 
191
- # Drop anchor at current GPS
262
+ # Echar ancla en GPS actual
192
263
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/drop
193
264
 
194
- # Lift anchor
265
+ # Levar ancla
195
266
  curl -X POST http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/lift
196
267
 
197
- # Simple status (for monitoring)
268
+ # Estado JSON simple (para monitorización / dashboards)
198
269
  curl http://openplotter.local:3000/signalk-mareas-ihm/api/anchor-watch/simple
199
270
  ```
200
271
 
201
- ### Installation
272
+ ### Instalación rápida
202
273
 
203
- From the **Signal K Appstore**: search `signalk-mareas-ihm` and install.
274
+ Desde el **Appstore de Signal K**: busca `signalk-mareas-ihm` y pulsa instalar.
204
275
 
205
- Or via command line:
276
+ O desde la línea de comandos:
206
277
 
207
278
  ```bash
208
279
  cd ~/.signalk
@@ -210,6 +281,22 @@ npm install signalk-mareas-ihm@latest --save
210
281
  sudo systemctl restart signalk
211
282
  ```
212
283
 
213
- ---
284
+ Después abre: `http://tu-pi.local:3000/signalk-mareas-ihm/`
285
+
286
+ ### Probado en
287
+
288
+ - Raspberry Pi 4 (OpenPlotter V4) — objetivo principal.
289
+ - Linux x64, macOS, Windows 11.
290
+ - Firefox, Chrome, Safari en iOS / Android.
291
+
292
+ ### Aviso legal
293
+
294
+ Es una **ayuda a la navegación**, NO un sustituto del anchor watch con vigilancia humana. El autor no se responsabiliza de garreos, colisiones, varadas ni ningún otro incidente. Uso bajo tu propia responsabilidad.
295
+
296
+ ### Contribuir y soporte
297
+
298
+ Issues, PRs y peticiones de funcionalidad en el [repo de GitHub](https://github.com/Aitonos/signalk-mareas-ihm).
299
+
300
+ ### Licencia
214
301
 
215
- © IHM Official data from Spain's Instituto Hidrográfico de la Marina
302
+ Apache 2.0. Derivado de `signalk-tides` (Brandon Keepers, Joachim Bakke, Scott Bender y contribuidores).