Recently, I was looking for an outside temperature sensor. Preferably in an instrument shelter, as my whole garden has direct sunlight during most of the day. I ended up buying the Alecto WS-5500, which is actually a rebranded Fine Offset WH2900. It has a decent temperature sensor and also supports uploading data to a configurable HTTP endpoint.
The inside unit that comes with the WS-5500 can be configured using the WS View Android application. It’s able to upload data to a custom HTTP endpoint, provided that you use the same protocol used by either Weather Underground or Ecowitt.net.
Weather Underground uses a HTTP GET request. This makes for rather long URLs since we have to put all the data into query parameters. In addition, the configured password is also visible in the URL and thus saved in my access logs. I didn’t want to go down this path.
Ecowitt uses POST requests which seems more sane.
The Ecowitt protocol
Data is sent through a POST request in standard
application/x-www-form-urlencoded encoding. Looks like the contents depends on what sensors are connected to your weather station. I’ve found examples that contained other fields than I found in the data sent by the WS-5500.
For anyone else that wants to write a script to capture data from the all-in-one Alecto WS-5500 or Fine Offset WH2900, the fields below are sent in the POST request when Ecowitt protocol is selected:
stationtype=EasyWeatherV1.5.9 model=WS2900_V2.01.12 freq=868M wh65batt=0 dateutc=2021-06-21 20:16:45 tempinf=70.9 humidityin=59 baromrelin=29.944 baromabsin=29.841 tempf=59.2 humidity=86 winddir=355 windspeedmph=2.9 windgustmph=4.5 maxdailygust=12.5 rainratein=0.000 eventrainin=0.000 hourlyrainin=0.000 dailyrainin=0.000 weeklyrainin=0.000 monthlyrainin=0.000 totalrainin=0.000 solarradiation=0.00 uv=0
As we use different units in Belgium, I used these conversions:
- Temperature in °C:
(fahrenheit - 32.0) * (5.0 / 9.0)
- Pressure in hPa:
inches * 33.6585
- Speed in km/h:
mph * 1.60934
- Rain in mm (or l/m^2):
inches * 25.4