Add per-TRV control panel + valve/wifi telemetry, restyle dashboard radiator icon
Backend: - New valve_position column, populated from shellies/<id>/info alongside wifi_rssi (was already a column, never actually written to). - New GET/POST /api/devices/:id/trv-status and /trv-control routes, mirroring the mhi-status/mhi-control and daikin-status/daikin-control pattern. Control goes through the existing setTargetWithRetry() reliability pipeline. Frontend: - New TrvControlPanel.tsx: +/- setpoint control debounced 1s after the last click before firing a command (these are battery/deep-sleep valves going through a real retry/backoff pipeline, not a cheap register write like MHI/ Daikin), plus room temp, valve position %, wifi signal, and a live "time since last update" readout. Wired into ZoneDetailModal for shelly_trv rows. - ZoneCard dashboard tile: radiator icon now just shows red when heating_active (valve open) / grey when idle, with only the target setpoint alongside it (dropped the room-temp half, redundant with the zone-level temp line above).
This commit is contained in:
parent
807a27ca1b
commit
d818bd1e7a
9 changed files with 212 additions and 7 deletions
|
|
@ -93,6 +93,7 @@ export interface DeviceSummary {
|
|||
// via MQTT (mqtt.js); mhi_modbus populates the rest via the AC poller (ac-poller.js).
|
||||
current_room_temp: string | null
|
||||
heating_active: boolean | null
|
||||
valve_position: number | null
|
||||
power_state: 'on' | 'off' | null
|
||||
current_mode: string | null
|
||||
fan_speed: string | null
|
||||
|
|
@ -189,6 +190,20 @@ export interface DaikinStatus {
|
|||
error?: string
|
||||
}
|
||||
|
||||
export interface TrvStatus {
|
||||
external_ref: string
|
||||
setpoint?: number
|
||||
roomTemp?: number
|
||||
heatingActive?: boolean | null
|
||||
valvePosition?: number | null
|
||||
wifiRssi?: number | null
|
||||
batteryPct?: number | null
|
||||
targetOrigin?: string | null
|
||||
lastSeen?: string | null
|
||||
statusUpdatedAt?: string | null
|
||||
error?: string
|
||||
}
|
||||
|
||||
export interface DevicePhoto {
|
||||
id: number
|
||||
device_id: number
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue