Skip to main content

Ecowitt (Local Gateway)

Read an Ecowitt Wi-Fi gateway or console directly over the LAN. Ecowitt is one of the most widely deployed prosumer environmental ecosystems: a gateway (GW1000 / GW1100 / GW2000 / GW3000) or an all-in-one console (WS-series) hosts a mix of wireless sensors — outdoor temperature / humidity, wind, rain, solar / UV, indoor temperature / humidity / barometric pressure, plus multi-channel add-ons for room temperature/humidity (WH31), soil moisture (WH51), water-leak detection (WH55), PM2.5 air quality (WH41/43), CO₂ (WH45), and lightning (WH57).

This driver uses the gateway's local HTTP API — no Ecowitt cloud account, no API key, no authentication. One gateway is the GEM device. Every reading present in the live payload is published as a device attribute, and any reading you want to chart or automate can also be pulled into a zone addressed by the reading key.

Local, read-only

This integration is read-only telemetry over the LAN. There are no control commands — Ecowitt sensors report; they are not actuated. The Ecowitt cloud API (api.ecowitt.net) is a separate thing and is not used here.

Prerequisites​

  • An Ecowitt Wi-Fi gateway or console on the same LAN as the GEM server, already joined to Wi-Fi through the WS View / WS View Plus app.
  • A stable IP for the gateway — add a DHCP reservation on the router so the address does not change.
  • LAN reachability from the GEM host to the gateway on TCP 80. If the gateway lives on an isolated IoT / guest VLAN, add a firewall exception so the GEM server can reach it.

Setup steps​

  1. In WS View, confirm the gateway is on Wi-Fi and note its IP address. You can sanity-check the API by opening http://<ip>/get_livedata_info in a browser on the same network — it returns a JSON blob.
  2. Go to Devices → Add Device and choose Ecowitt (Local Gateway).
  3. Enter the gateway IP Address. No credentials are required.
  4. Save. The driver polls /get_livedata_info and immediately publishes every reading as a device attribute.
  5. (Optional) Run get_devices to list the reading keys this gateway currently reports. Create a GEM zone per reading you want to surface, setting the zone Address to the reading key.

Units​

Units follow the gateway config, not GEM

The local API returns each value in whatever unit the gateway is set to in WS View — °F vs °C, mph vs km/h vs m/s, inHg vs hPa, in vs mm. The driver stores the numeric value as-is; there is no per-request unit override in the local API. Set the units you want in WS View before relying on the readings, or convert downstream in a macro.

Attributes​

Device​

AttributeTypeRequiredDescription
ipstringyesLAN IP of the gateway / console.
portintnoGateway HTTP port. Default 80.
status_intervalintnoPoll interval in ms. Default 30000, minimum 10000.
firmware_versionstring(auto)Populated from /get_version on connect.

Published readings​

The exact set depends on which sensors are paired to the gateway — only fields present in the live payload are written. Common keys:

KeySourceMeaning
outdoor_temperature, outdoor_humiditymain arrayOutdoor T / RH.
dew_point, wind_chill, heat_indexmain arrayDerived comfort values.
wind_speed, wind_gust, wind_direction, wind_gust_max_dailymain arrayWind.
solar_radiation, uv_index, uv_rawmain arraySun.
indoor_temperature, indoor_humidityWH25 / consoleIndoor T / RH.
barometric_relative, barometric_absoluteWH25 / consolePressure.
rain_rate, rain_event, rain_day, rain_week, rain_month, rain_yearrain gaugeTipping-bucket rain. piezo_rain_* for a haptic gauge.
temp_ch1…8, humidity_ch1…8WH31Extra room T / RH channels.
soil_ch1…8WH51Soil moisture (%).
leak_ch1…4WH55Water leak: 0 dry, 1 leak.
pm25_ch1…4WH41 / WH43PM2.5 (µg/m³).
co2, co2_pm25, co2_pm10, co2_temperature, co2_humidityWH455-in-1 air quality combo.
lightning_distance, lightning_countWH57Lightning.
sensor_<id>main arrayAny unrecognised firmware field, raw.

Zone​

Zones need only an Address equal to a reading key. As it polls, the driver writes:

AttributeMeaning
stateThe raw reading value.
temperatureAlias written when the reading key contains temp.
humidityAlias written when the key contains humidity or soil.

Zone address format​

The zone Address is a reading key exactly as listed by get_devices (which reflects what the gateway currently reports). Examples: outdoor_temperature, wind_speed, rain_rate, indoor_humidity, temp_ch1, soil_ch1, leak_ch2, pm25_ch1, co2, lightning_distance.

Commands​

CommandArgsNotes
get_livedata—Raw /get_livedata_info payload — the authoritative shape for debugging.
get_devices—List the reading keys currently reported (use as zone addresses).
get_sensors—/get_sensors_info pages 1–2: per-sensor battery and signal.
get_version—Gateway firmware version.
poll_now—Force an immediate poll and fan-out.
raw_commandpathGET any gateway path, e.g. /get_units_info.

Known limitations​

  • Read-only. Ecowitt sensors are not actuators; there are no control commands.
  • Units are the gateway's. See the Units note above — values are stored exactly as the gateway reports them.
  • Sensor-dependent attributes. An indoor-only console publishes no wind or rain; the driver writes only what is present.
  • Rain id coverage. event / rate / day / week / month / year are named; less-common rain ids (hourly, running totals) appear as rain_<id> raw rather than being guessed.
  • Firmware drift. Unrecognised main-array ids are published as sensor_<id> so a newer firmware field is preserved (never mislabeled). If you see one you care about, capture get_livedata and it can be mapped in a future release.

Troubleshooting​

SymptomCheck
Connect logs a timeoutWrong IP, or the gateway is on an isolated VLAN. Confirm http://<ip>/get_livedata_info is reachable from the GEM host.
No attributes appearOld firmware may return an unexpected shape. Run get_livedata to inspect the raw JSON.
Temperatures look wrong (C vs F)Set the desired units in WS View; the local API returns the gateway's configured units.
A sensor is missingConfirm it is paired to the gateway in WS View and its battery is good (get_sensors).
  • Devices
  • Zones
  • Ambient Weather — a comparable cloud-based weather-station integration.