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.
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
- 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_infoin a browser on the same network — it returns a JSON blob. - Go to Devices → Add Device and choose Ecowitt (Local Gateway).
- Enter the gateway IP Address. No credentials are required.
- Save. The driver polls
/get_livedata_infoand immediately publishes every reading as a device attribute. - (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
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
| Attribute | Type | Required | Description |
|---|---|---|---|
ip | string | yes | LAN IP of the gateway / console. |
port | int | no | Gateway HTTP port. Default 80. |
status_interval | int | no | Poll interval in ms. Default 30000, minimum 10000. |
firmware_version | string | (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:
| Key | Source | Meaning |
|---|---|---|
outdoor_temperature, outdoor_humidity | main array | Outdoor T / RH. |
dew_point, wind_chill, heat_index | main array | Derived comfort values. |
wind_speed, wind_gust, wind_direction, wind_gust_max_daily | main array | Wind. |
solar_radiation, uv_index, uv_raw | main array | Sun. |
indoor_temperature, indoor_humidity | WH25 / console | Indoor T / RH. |
barometric_relative, barometric_absolute | WH25 / console | Pressure. |
rain_rate, rain_event, rain_day, rain_week, rain_month, rain_year | rain gauge | Tipping-bucket rain. piezo_rain_* for a haptic gauge. |
temp_ch1…8, humidity_ch1…8 | WH31 | Extra room T / RH channels. |
soil_ch1…8 | WH51 | Soil moisture (%). |
leak_ch1…4 | WH55 | Water leak: 0 dry, 1 leak. |
pm25_ch1…4 | WH41 / WH43 | PM2.5 (µg/m³). |
co2, co2_pm25, co2_pm10, co2_temperature, co2_humidity | WH45 | 5-in-1 air quality combo. |
lightning_distance, lightning_count | WH57 | Lightning. |
sensor_<id> | main array | Any unrecognised firmware field, raw. |
Zone
Zones need only an Address equal to a reading key. As it polls, the driver writes:
| Attribute | Meaning |
|---|---|
state | The raw reading value. |
temperature | Alias written when the reading key contains temp. |
humidity | Alias 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
| Command | Args | Notes |
|---|---|---|
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_command | path | GET 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 / yearare named; less-common rain ids (hourly, running totals) appear asrain_<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, captureget_livedataand it can be mapped in a future release.
Troubleshooting
| Symptom | Check |
|---|---|
| Connect logs a timeout | Wrong IP, or the gateway is on an isolated VLAN. Confirm http://<ip>/get_livedata_info is reachable from the GEM host. |
| No attributes appear | Old 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 missing | Confirm it is paired to the gateway in WS View and its battery is good (get_sensors). |
Related Documentation
- Devices
- Zones
- Ambient Weather — a comparable cloud-based weather-station integration.