[ST Edge] Enphase IQ Gateway (local): solar, consumption, grid and IQ Battery over the local API

Edge driver for the Enphase IQ Gateway / Envoy with firmware 7 and 8. Reads the gateway locally over HTTPS with an owner token: no cloud polling, no bridge computer.

What you get

  • Solar: power (W) and lifetime energy (kWh)
  • Consumption: power and lifetime energy (needs consumption CTs)
  • Grid: power, positive = import, negative = export
  • IQ Battery: state of charge and power
  • Optional battery history graph: SmartThings draws no graph for battery %, so the setting Battery history graph can repeat it as a humidity reading (graph in %, the device then also counts as a humidity sensor) or as watts in an extra part Battery % (1 % = 1 W). Default off
  • Each as its own device, poll every 30 s (adjustable)

Before you start

  • Get an owner token at entrez.enphaseenergy.com: log in with your Enphase account, pick your system and gateway, Generate Access Token. Valid 12 months
  • Give the gateway a fixed IP (DHCP reservation)

Install

  1. Enroll your hub: SmartThings. Add a little smartness to your things. (Stoeckie Edge Drivers) and install Enphase IQ Gateway (local)
  2. Add device > Scan nearby. An “Enphase IQ Gateway” device appears
  3. Paste the token on the driver’s settings page on the hub. The address is in the hub log ([enphase] settings page: http://hub ip:<port>/). For security the page is open for at most 15 minutes: after the driver starts without a token, and after pressing Refresh on the gateway device
  4. The Solar, Consumption, Grid and Battery devices appear at the next poll

Source and README: GitHub - Stoeckie/smartthings-enphase-local: Local SmartThings Edge driver for the Enphase IQ Gateway (Envoy, firmware 7/8): solar, consumption, grid and IQ Battery with an owner token. · GitHub

Developer notes

  • The SmartThings app cuts text settings at 250 characters, owner tokens are about 400. That is why the token goes in through a small settings page on the hub; it is stored on the hub only.
  • On D8 firmware production.json can take 10 to 30 s, at night especially, and overlapping polls make the gateway stop answering. The driver reads /ivp/meters/readings instead (under 1 s), never overlaps polls and only falls back to production.json without CT meters.
  • Battery from /ivp/ensemble/secctrl (agg_soc) and /ivp/ensemble/power.

Running here with D8.3 firmware, CTs and two IQ Battery 5P. Feedback welcome, especially from systems without CTs or with older firmware.

Update (2026-11-01b): offline notification

SmartThings has no routine trigger for “device offline”. The Enphase IQ Gateway device now has a Connection status (Connected or Offline), so you can make a routine:

If Enphase IQ Gateway > Connection is Offline, then send a notification to members.

Short drops (a reconnect or one missed poll) are ignored: Connection only turns Offline after 2 minutes without a connection. Every drop is remembered: when the connection is back the device shows Last drop with the time (UTC), how long it lasted and the reason.

For a device that drops off now and then (like a robot on a weak wifi spot) set “How long does this status last” to a few minutes. The driver updates itself from the channel; the status shows after the next poll. README updated.

Security update (build 2026-11-02a): certificate pinning

The gateway uses a self signed certificate, so the driver could not tell it apart from another device on the same address, and it would have sent the owner token to it. The driver now remembers the gateway’s certificate at the first connection and refuses (without sending the owner token) when another certificate answers. Replaced the gateway? Enter the owner token again and the new certificate is trusted. The driver updates itself from the channel.

Tip: also a “back online” notification

If you made the Offline routine (Enphase IQ Gateway device, Connection is Offline, send notification), duplicate it in the app and change the condition to Connection is Connected, with a text like “Enphase IQ Gateway is back online”. Then you know the problem is over without opening the app. The device also shows Last drop (when, how long, why).

README updated with the same tip.

Update build 2026-11-08a: no more “not all status information updated yet”

The SmartThings app shows that message when an attribute has no value. On a device that never had a connection drop, Last drop was still empty. It now starts with “No drops yet”.

Code: GitHub - Stoeckie/smartthings-enphase-local: Local SmartThings Edge driver for the Enphase IQ Gateway (Envoy, firmware 7/8): solar, consumption, grid and IQ Battery with an owner token. · GitHub

Update build 2026-11-08b: no Offline notification for a short network outage

New setting Offline after (minutes), default 5. Connection only turns Offline after that many minutes without contact. Before it was 2 minutes, so a router or network update at night (a few minutes without network) gave an Offline notification even though nothing was wrong. A real outage still gives one.

Code: GitHub - Stoeckie/smartthings-enphase-local: Local SmartThings Edge driver for the Enphase IQ Gateway (Envoy, firmware 7/8): solar, consumption, grid and IQ Battery with an owner token. · GitHub

Update, build 2026-11-09b

  • Fixed: Only changed values go to the hub. The driver used to send every value again on every poll or report. Too many events make the hub drop events of a device, and the app then keeps a stale value (a switch that stays on, a slider that keeps its old position). Now a value is only sent when it changes, and after every driver start all values are sent once so the app catches up.
  • Security, settings page: the page on the hub where you paste the token now only answers under a secret address, printed in the hub log: [enphase] settings page: http://<hub-ip>:<port>/<secret>/. Before, anyone on your LAN could open it during the 15 minutes it was open and overwrite the gateway address and token (the driver would then talk to their device, or stop working). After 30 wrong addresses it closes.
  • Security, discovery: the token only goes to an address that answers /info like an IQ Gateway. Before, any http service with “envoy” in its name could get it.
  • Security: the driver remembers the certificate of the gateway with the first connection that carries the token. If that certificate can no longer be read later, the token is now not sent (before, the check was skipped).

Update: the hub picks up the new version from the channel by itself, or install it again from the channel.

Update, build 2026-11-09c

  • Fixed: routines no longer run again after a driver update or hub reboot. After a start the driver sent the first value of every attribute as a forced event (state_change), so routines and notifications on these devices ran again on every update. Now it first compares with what SmartThings already shows and only sends what differs.
  • Fewer events: power was rounded to 1 W and changed on almost every 30 s poll (about 12 events a minute in total; SmartThings asks about 1 a minute per device). Power now goes out when it changed by 25 W or 3 %, or after 5 minutes; energy at most every 5 minutes or per 0.1 kWh. A manual Refresh shows the current values at once.
  • The settings page closes its socket when it cannot start.

Update: the hub picks up the new version from the channel by itself, or install it again from the channel.

Head to the official portal for your MN Unemployment login today and take control. You’ve got this!