127 lines
3.4 KiB
Markdown
127 lines
3.4 KiB
Markdown
# Froggit Weather Station Protocols for Custom Server
|
||
|
||
This documentation explains how to receive data from a Froggit weather station using your own server. It covers two protocols: **Ecowitt** (POST requests) and **Wunderground** (GET requests).
|
||
|
||
### Hardware:
|
||
|
||
- DP2000 7-In-1 Y-Edition Wifi/Lan Wireless Weather Station: [Product Link](https://www.froggit.de/dp2000-7-in-1-y-edition-wifi-lan-wireless-weather-station.html)
|
||
- It is recommended to put the Gateway into a VLan
|
||
|
||
## Setup
|
||
|
||
1. **Power the Gateway**: Connect the Gateway to a power source, and after a short period, a new Wi-Fi network (GW2000X-WIFIXXXX) should appear.
|
||
2. **Connect to the Gateway’s Wi-Fi**: Use the Gateway’s Wi-Fi to connect and open `192.168.4.1` in your browser.
|
||
3. **Select Connection Type**: In the “Local Network” tab, select your preferred connection type: **WiFi** or **Ethernet** (via cable).
|
||
4. **Configure Protocol**: Under the "Weather Services" tab, choose the desired protocol type: **Ecowitt** or **Wunderground**.
|
||
|
||
**Ecowitt Example**:
|
||
|
||

|
||
|
||
**Wunderground Example**:
|
||
|
||

|
||
|
||
## PHP Code
|
||
|
||
The `both.php` file supports both **Ecowitt** and **Wunderground** protocols.
|
||
|
||
## Example Protocol Data
|
||
|
||
### Ecowitt (POST)
|
||
|
||
- **HTTP Method**: POST
|
||
- **Data Format**: URL-encoded body
|
||
|
||
#### Example POST Data:
|
||
|
||
```php
|
||
[PASSKEY] => 123*****************************
|
||
[stationtype] => GW2000A_V3.2.4
|
||
[runtime] => 296
|
||
[heap] => 110140
|
||
[dateutc] => 2025-05-08 16:00:56
|
||
[tempinf] => 69.26
|
||
[humidityin] => 61
|
||
[baromrelin] => 28.804
|
||
[baromabsin] => 28.804
|
||
[tempf] => 69.44
|
||
[humidity] => 60
|
||
[vpd] => 0.290
|
||
[winddir] => 69
|
||
[windspeedmph] => 0.00
|
||
[windgustmph] => 3.36
|
||
[maxdailygust] => 11.41
|
||
[solarradiation] => 0.15
|
||
[uv] => 0
|
||
[rainratein] => 0.000
|
||
[eventrainin] => 0.000
|
||
[hourlyrainin] => 0.000
|
||
[dailyrainin] => 0.000
|
||
[weeklyrainin] => 0.000
|
||
[monthlyrainin] => 0.000
|
||
[yearlyrainin] => 0.000
|
||
[totalrainin] => 0.000
|
||
[wh65batt] => 0
|
||
[freq] => 868M
|
||
[model] => GW2000A
|
||
[interval] => 8
|
||
```
|
||
|
||
### Wunderground (GET)
|
||
|
||
- **HTTP Method**: GET
|
||
- **Data Format**: URL parameters (Query Parameters)
|
||
- **Protocol**: https://support.weather.com/s/article/PWS-Upload-Protocol?language=en_US
|
||
|
||
#### Example GET Data:
|
||
|
||
```php
|
||
[ID] => 1
|
||
[PASSWORD] => 1
|
||
[tempf] => 69.44
|
||
[humidity] => 60
|
||
[dewptf] => 55.04
|
||
[windchillf] => 69.44
|
||
[winddir] => 69
|
||
[windspeedmph] => 0.00
|
||
[windgustmph] => 0.00
|
||
[rainin] => 0.000
|
||
[dailyrainin] => 0.000
|
||
[weeklyrainin] => 0.000
|
||
[monthlyrainin] => 0.000
|
||
[yearlyrainin] => 0.000
|
||
[solarradiation] => 0.15
|
||
[UV] => 0
|
||
[indoortempf] => 69.26
|
||
[indoorhumidity] => 61
|
||
[baromin] => 28.804
|
||
[lowbatt] => 0
|
||
[dateutc] => now
|
||
[softwaretype] => GW2000A_V3.2.4
|
||
[action] => updateraw
|
||
[realtime] => 1
|
||
[rtfreq] => 5
|
||
```
|
||
|
||
---
|
||
|
||
## PHP Code Overview
|
||
|
||
The provided PHP code extracts data from incoming **POST** (Ecowitt) and **GET** (Wunderground) requests and normalizes the values before storing them into an SQLite database.
|
||
|
||
### Key Mapping from Wunderground to Ecowitt:
|
||
|
||
```php
|
||
$WUNDERGROUND_TO_ECOWITT = array(
|
||
'tempf' => 'tempf',
|
||
...
|
||
);
|
||
```
|
||
|
||
---
|
||
|
||
## Conclusion
|
||
|
||
This setup allows you to receive weather station data from either **Ecowitt** or **Wunderground** protocols, process it on your custom server, and store the data in an SQLite database for further analysis. The PHP code provided normalizes the data and ensures compatibility with both protocols.
|