Repository navigation
feat(node-red): Local Read node for the Powerwall gateway on the LAN - #201
Conversation
Code Review ✅ Approved 🟡 Medium risk 1 closed / 1 findingsAdding a Node-RED node that polls authenticated Powerwall LAN endpoints could repeatedly expose gateway status and configuration data to connected flows. Adds a Local Read node for reading a Powerwall gateway on the LAN without the cloud, with polling, read-on-input, and a read selector covering all bundled Powerwall reads. The resolved finding was a large poll interval overflowing setTimeout into a 1 ms poll loop, now capped at 24 h. No open issues remain. ✅ 1 closed✅ Edge Case: Large poll interval overflows setTimeout into a 1 ms poll loop
VerificationRules No rules evaluated Functional validation Not enabledAuto-approval Approved For more verification details, comment OptionsAuto-apply is off → Gitar will not commit updates to this branch. Comment with these commands to change the behavior for this request:
Was this helpful? React with 👍 / 👎 | Gitar |
Adds a Local Read node (
teslemetry-local-powerwall-read) on the existing Local Powerwall config node, so Node-RED can read a Powerwall gateway on the LAN without the cloud. It polls inside the node every 10 s by default (2 s to 24 h, 0 reads only on input), also reads once on any input message, and sends the gateway's reply as returned inmsg.payloadwith the read name inmsg.topic; the status shows the last read time or the error, a gateway that stays down while polling is logged once rather than every poll, and polling stops on close/redeploy. The read selector covers every read the bundledtesla-fleet-apiPowerwall client already has: live status (its cloud-shapedlive_statusbuilt from aggregates, status and grid status, withnullwhere the gateway has no source), meters aggregates, system status, device controller, grid status, state of energy (app and raw scale), gateway config, Powerwall 3 components, firmware and backup events. Cloud event and command nodes are unchanged and nothing is merged into the cloudlive_status; one node with a read dropdown is the default design here and is easy to split into per-read nodes if preferred. Tests drive the node against the fake gateway, which now also answers the REST reads.