Skip to content

feat(node-red): capability parity with Homey expansion campaign - #84

Merged
Bre77 merged 10 commits into
mainfrom
fm/nodered-capability-expansion
Aug 2, 2026
Merged

feat(node-red): capability parity with Homey expansion campaign#84
Bre77 merged 10 commits into
mainfrom
fm/nodered-capability-expansion

Conversation

@Bre77

@Bre77 Bre77 commented Aug 2, 2026

Copy link
Copy Markdown
Member

Intent

  • Bring node-red-contrib-teslemetry up to capability parity with the completed Homey capability-expansion campaign (Teslemetry/homey PRs Uplift n8n integration to feature-complete status #23-feat(api): add energy site SSE events (live_status, site_info) #71), expressed in this package's own idiom rather than ported wholesale - triggers become event-emitting nodes, actions become command-node cases, and per-field Homey capabilities collapse into the generic Signal/Event nodes this package already has.
    • New teslemetry-energy-event node: energy sites had no push-based node at all, only REST polling via teslemetry-energy-command/teslemetry-energy-history. The SDK's per-site SSE stream (live_status/site_info/tariff_content_v2/energy_totals) was already selected by default but unreachable here. Mirrors the existing teslemetry-event/teslemetry-signal pattern. This alone covers the data behind several Homey themes at once: solar/grid/load/battery power, buy/sell tariff, generator power, grid-outage-vs-test status, Powerwall battery-breaker state, and live energy totals.
    • New vehicle commands on teslemetry-vehicle-command: cabin overheat protection (off/on/fan-only + temp limit), software update schedule/cancel, scheduled charging + scheduled departure (with an HH:mm -> minutes-of-day helper colocated in the node), automatic seat and steering-wheel climate, Cybertruck tonneau open/close, legacy S/X sunroof vent/close/stop, and absolute media volume.
    • Most of the campaign's other themes (TPMS, route/ETA, Powershare, HV battery pack diagnostics, presence, wake/sleep, security state) needed no new wiring: teslemetry-signal/teslemetry-event already expose any field from the live API's field registry dynamically, so nothing here was hand-mapped per field the way Homey's capability model requires.
  • Skipped, with reasons:
    • Threshold-crossing and lifecycle-transition packs (power/tariff thresholds, route/ETA thresholds, grid-outage-started/ended, vehicle-woke/slept, presence arrive/leave) - these are Homey Flow-card sugar over already-streamed raw fields. In Node-RED the raw stream (now including energy sites) plus a downstream switch/change/function node is the idiom; a bespoke node would just reimplement what those core nodes already do well.
    • PIN-to-drive / valet-mode / speed-limit commands - Homey's own campaign shipped these state-only, reasoning that Flow action config isn't a safe place to hold a PIN. Mirrored here by not wiring setPinToDrive/setValetMode/speedLimit* at all.
    • Modern multi-schedule add/remove-charge/precondition-schedule commands - Homey scoped these out too, since there's no getter to read schedules back.
    • Off-grid manual actions (scheduleBackupEvent/cancelBackupEvent/setIslandMode) - flagged risky in the source expansion menu and never shipped by Homey's own campaign either.
    • Software-update derived status/progress state machine and install-safety gating - composed multi-signal logic that belongs in the flow; this node doesn't gate on vehicle state for any other command either.
    • Relative volume up/down - adjustVolume (absolute) is wired; relative stepping composes naturally from the MediaAudioVolume/MediaAudioVolumeIncrement signals in a function node, documented in the command node's help text.

Build, typecheck (pnpm -r --no-bail tsc, plus iobroker.teslemetry's check), lint, and node-red-dev validate all pass. This package has no test suite yet (per AGENTS.md), so none was added.

Bre77 added 10 commits August 2, 2026 15:10
Energy sites had no push-based node — only REST polling via
teslemetry-energy-command/teslemetry-energy-history. The SDK's
per-site SSE stream (live_status/site_info/tariff_content_v2/
energy_totals) was already selected by default but unreachable from
this package. This closes that gap in Node-RED's own idiom: a
generic streaming node (mirroring teslemetry-event/teslemetry-signal)
rather than per-field Homey-style capabilities, since downstream
switch/change/function nodes already compose thresholds and
transitions from the raw stream.

Covers the data behind several Homey capability-expansion themes at
once: solar/grid/load/battery power, buy/sell tariff, generator
power, grid-outage vs off-grid-test status, Powerwall battery-breaker
state, and live energy totals.
Wraps the SDK's setCabinOverheatProtection/setCopTemp, which weren't
exposed as vehicle commands yet. Mirrors Homey's cabin-overheat-
protection theme; mode/temp-limit telemetry is already readable via
the existing generic Signal node.
Wraps scheduleSoftwareUpdate (offsetSec 0 = install now) and
cancelSoftwareUpdate. Skips Homey's derived multi-signal
status/progress state machine and install-safety gating: this node
never gates on vehicle state for any other command either, so
reading the raw SoftwareUpdate* signals and deciding when to install
is left to the flow, consistent with the rest of this node.
Wraps setScheduledCharging/setScheduledDeparture. Both take a
minutes-since-local-midnight integer on the wire; msg carries a
Flow-friendly 24-hour "HH:mm" string instead, converted by a small
helper colocated in this node (only user of that conversion).

Matches Homey's own scope for this theme: the modern multi-schedule
add/remove-charge/precondition-schedule endpoints are skipped since
there's no getter to read scheduled entries back, and the legacy
ScheduledChargingStartTime/ScheduledDepartureTime raw signals stay
available via the existing Signal node without new wiring.
Wraps setAutoSeatClimate (front seats only) and
setAutoSteeringWheelHeat.
Wraps the closure() command for the tonneau cover. Only open/close
are exposed — there's no position/percentage endpoint, so the
continuous TonneauOpenPercent signal stays read-only via the
existing Signal node, matching Homebridge's read-only Window
Covering treatment of the same field.
Wraps sunRoofControl for vent/close/stop. No continuous position
telemetry exists for the sunroof in Fleet Telemetry, so this is
control-only.
Wraps adjustVolume (absolute). Relative volume up/down — Homey's
theme here — is left as flow composition: read MediaAudioVolume and
MediaAudioVolumeIncrement via the existing Signal node, do the
add/subtract in a function node, and call this with the result. That
composition is Node-RED's own idiom and needs no dedicated node.
… node

Records the node inventory accurately (energy-history was missing,
and the new energy-event node) plus the architectural reason most
Homey/Homebridge-style per-field capability work has no equivalent
here: the Signal/Event nodes already expose the live API's field
registry dynamically.
@Bre77 Bre77 added the fm Opened by a Firstmate crewmate label Aug 2, 2026
@Bre77
Bre77 merged commit 116988d into main Aug 2, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fm Opened by a Firstmate crewmate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant