Ecowitt
The Ecowitt integration lets Cloud Studio IoT read Ecowitt weather stations from the Ecowitt cloud, through its API v3. The stations keep publishing to ecowitt.net as they do today: there is no gateway to reconfigure and nothing to install on site. The platform also imports the history the Ecowitt cloud already holds.
Requirements
- An ecowitt.net account the stations publish to.
- The MAC address of each station, shown in the device list on ecowitt.net.
- Access to Gear Manager with permissions on the client.
- A device model for Ecowitt stations, with code
AWS-ECOWITT, whose parser script maps the API fields to endpoints.
1. Create the keys on ecowitt.net
Sign in to ecowitt.net with the stations' account, open your user profile from the account icon (top right) and create an Application Key and an API Key. Ecowitt explains it in How do I find my app & api keys?.
2. Set up the integration in Gear Manager
Open the client in Gear Manager and go to the Integrations tab. Under Ecowitt Weather Stations, fill in:
- Application Key: the application key you created on ecowitt.net.
- API Key: your account's API key.
- Polling interval (minutes): how often the stations are read. 5 by default.
- History start (YYYY-MM-DD): the date from which to import the data Ecowitt already holds. Leave it empty to import the last 12 months.
Save. The keys belong to the client: if you revoke them on ecowitt.net, the platform stops reading those stations.
3. Register the stations
Create one device per station with:
- Model: the device model for Ecowitt stations (code
AWS-ECOWITT). - Address: the station's MAC address, as ecowitt.net shows it.
The model's parser script receives the JSON the API returns and assigns each field to its endpoint: temperature, humidity, pressure, wind, rain, solar radiation, soil moisture channels and whatever else the station has. The platform asks for metric units: °C, hPa, m/s, mm and W/m². Vapour pressure deficit (VPD) is the exception: the API always returns it in inHg.
Stations do not have to report the same sensors, and the same channel (soil_ch1, temp_and_humidity_ch3) can measure different things on each one. That is why the mapping lives in the model's script and can be adjusted without a platform release.
4. History
Once a station is registered, the platform imports the history stored in the Ecowitt cloud from the configured start date (or the last 12 months), each reading with its original timestamp. It also works for stations registered later: the importer checks again every 6 hours. Ecowitt keeps 5-minute detail only for recent data; older ranges come at 30-minute intervals. The import moves slowly so it does not compete with live traffic, and if it is interrupted it resumes where it left off without duplicating data.
Check that it works
After the polling interval, the device shows its latest reading. A station that does not publish to ecowitt.net gets no new data, but it does not hold up the others. If the API answers with no data for a station, the platform treats it as "no data", not as an error.
Last updated on