feat(node-red): capability parity with Homey expansion campaign - #84
Merged
Conversation
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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Intent
node-red-contrib-teslemetryup 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.teslemetry-energy-eventnode: energy sites had no push-based node at all, only REST polling viateslemetry-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 existingteslemetry-event/teslemetry-signalpattern. 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.teslemetry-vehicle-command: cabin overheat protection (off/on/fan-only + temp limit), software update schedule/cancel, scheduled charging + scheduled departure (with anHH: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.teslemetry-signal/teslemetry-eventalready 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.switch/change/functionnode is the idiom; a bespoke node would just reimplement what those core nodes already do well.setPinToDrive/setValetMode/speedLimit*at all.scheduleBackupEvent/cancelBackupEvent/setIslandMode) - flagged risky in the source expansion menu and never shipped by Homey's own campaign either.adjustVolume(absolute) is wired; relative stepping composes naturally from theMediaAudioVolume/MediaAudioVolumeIncrementsignals in a function node, documented in the command node's help text.Build, typecheck (
pnpm -r --no-bail tsc, plusiobroker.teslemetry'scheck), lint, andnode-red-dev validateall pass. This package has no test suite yet (perAGENTS.md), so none was added.