Files
ems/docs/04-modules/modbus-registers-teltocharge.md
Dusan Vojacek 5239463699
Some checks failed
CI and deploy / migration-check (push) Failing after 23s
CI and deploy / deploy (push) Has been skipped
EV telemetrie: skutečné čtení Teltonika TeltoCharge (konec stub-u)
poll_ev_chargers četl placeholder ('available'/0 W) — EV spotřeba se nikdy
neodečítala z bazálu a session detekce nefungovala. Nyní: blok registrů 0-40
jedním FC 3 (oficiální protokol rev 0.5), parse_teltocharge_frame (status z
reg 6 → available/preparing/charging/..., výkon reg 38, energie session reg 39,
proud max L1-L3 reg 3-5). Při selhání čtení se vzorek NEzapisuje (fabrikovaný
available by falešně ukončoval session).

fn_telemetry_ev_charger_sample: + p_current_a (drop staré 7-arg signatury).
6 nových testů parseru; plná sada beze změny. Docs: modbus-registers-teltocharge.md.

Po deployi: home-01 ev-charger-1/2 začnou posílat reálná data; bazál se začne
čistit od EV (EMA 00:30); rebuild stats má smysl až po ~2 týdnech čisté historie.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-11 22:10:46 +02:00

43 lines
1.9 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# Teltonika TeltoCharge — Modbus registry (EMS)
Zdroj: oficiální „TeltoCharge Modbus RTU Communication protocol" rev 0.5
(2024-07-23). Připojení: RS485 → Waveshare → Modbus TCP (endpoint
`site_endpoint`, FC 3 čtení, FC 6/16 zápis). Wallbox musí být v aplikaci
nastaven jako *secondary (server)*.
## Čtení (telemetry_collector, blok 040 jedním FC 3)
| Reg | Význam | Formát |
|-----|--------|--------|
| 02 | Napětí L1L3 | int16, V |
| 35 | Proud L1L3 | int16, ×10 A |
| 6 | **EVSE status (DLM)** | 0=C nabíjí · 13=B1B3 připojeno · 4=D1 stop od EV · 56=D2D3 zákaz · 7=A bez EV · 8=F chyba · 9=E |
| 27 | Charge point state | 09 (informativní) |
| 33 | IEC61851 stav | 08 |
| 34/35 | Warning / Error bity | bitfield |
| 38 | Okamžitý výkon | uint16, W |
| 39 | Energie session | uint16, kWh×100 |
| 40 | Trvání session | uint16, s |
| 4144 | Celková energie (FW ≥1.13) | uint64, kWh×100 |
Mapování stavů v EMS (`TELTO_STATUS_MAP` v `telemetry_collector.py`):
7→`available`, 0→`charging`, 13→`preparing`, 4→`suspended_ev`,
56→`suspended_evse`, 8→`faulted`, 9→`unknown`. Detekce příjezdu/odjezdu
(`fn_ev_session_transition`) stojí na přechodu `available` ↔ ≠`available`.
**Při selhání čtení se vzorek NEzapisuje** — fabrikovaný `available` by falešně
ukončil session a EV výkon 0 by špinil bazál (pravidlo 15).
## Zápis (budoucí řízení — zatím NEimplementováno)
| Reg | Význam | Hodnoty |
|-----|--------|---------|
| 15 | **Amps to use** (limit proudu) | 0 = stop, 632 A |
| 16 | Start/Stop session | 0 nic · 1 stop · 2 start |
| 19 | Communication timeout (watchdog) | 0600 s (0 = vypnuto) |
| 20 | Failsafe current | 0, 632 A |
Až se zapne řízení: zapisovat reg 15 přes journal `modbus_command`
(pravidlo 17) a nastavit watchdog (reg 19/20) — při výpadku EMS wallbox
spadne na failsafe proud.