Here's the Ecowitt Protocol Simulator. The attachment contains the html, and php files, as well as a text copy of this post. I would appreciate feedback as to the data sent by the wh41, wh43, wh55, and wh57 sensors. an explanation, data limits, and the number of decimal places sent are needed. I don't have these sensors, and only found a few hints as to their output on the 'net. For example, I found the wh57 sends:
- lightning: integer, 0 ~ 50, distance to storm front in Km (confirmed)
- lightning_time: integer, 0 ~ 86400000, UTC time of day of the lightning strike (not confirmed)
- lightning_num: integer, 0 ~ ??, lightning count (not confirmed; is this for the storm, hour, or some other period?)
- wh57batt: integer, 1~5, battery level, 1=low battery (confirmed)
| | Sample POST Output (from gwrx.php):
PASSKEY = 6DB5CB9D897958D3AE20C78D6B9D9E2C stationtype = GW1000B_V1.6.3 dateutc = 2020-10-01 11:31:16 tempinf = 71.6 humidityin = 45 baromabsin = 29.790 baromrelin = 29.580 temp1f = 72.4 humidity1 = 63 batt1 = 0 pm25_ch1 = 32.0 pm25_avg_24h_ch1 = 29.0 pm25batt1 = 5 soilmoisture1 = 37 Siolbatt1 = 1.6 leak_ch1 = 1 leakbatt1 = 5 lightning = 7 lightning_time = 41476065 lightning_num = 1 wh57batt = 5 freq = 915M model = GW1000_Pro
|
gwrx.php:Dumps the post data to a file, with a blank line between data packets. This requires a php enabled web server. Be sure to set the name and full path to your destination file on line 6 ("e:\\newfile.txt", "a"). The "a" opens the file to have data added to it, or creates the file if it does not exist.
This is useful to check the output of the GW1000, or an simulator.
ecosim.html:This is useful in the design of a Personal Weather Station or data logger for the Ecowitt protocol. It is easily extensible for new sensors. It works in Firefox, not in IE. It may or may not work with other browsers.
The target is set to "gwrx.php". This can be changed on line 16 (tgt_path).
Data for the Ecowitt GW1000 is always sent.
Selections are provided for the Firmware Revision, MAC Address, and fre4quency of the unit.
All min, max, and pulse values are limited to that of their respective sensors where known. They are checked upon leaving the field as follows:
sensor min <= display min <= display max
display min <= display max <= sensor max
display min <= pulse <= display max
The Pulse/Run/Stop button:
Pulse - sends a single data packet
Run - sends the number of packets specified by Update, starting with the pulse value.
- The step for values is 10% of the displayed max - min. This can be changed in line 13 (step_percent)
Stop - Ends multi-packet "Run"
Update drop down selects whether packets are to be sent once, five, or ten times; or continuously.
Time Stamp Interval selects the change in time stamps for the packets. This is not the time between sending the packets. The time between sending packets can be changed on line 15 (send_interval).
Sensors are sent only if their checkboxes are checked.
In the outdoor sensor group, you can only check the items in a single line. If an item in another line is selected the item(s) in the other lines will be de-selected.
Only one PM25 sensor can be selected for each address. Selecting a wh41 address will disable the wh43 at that address, and vice versa.
When multiple sensors of the same type are selected they are offset by (sensor # - 1)((max-min) / max number of sensors).
Battery levels are set to a good level for the checked sensors initially. During run, each battery has a 15% chance of failure per packet. This can be changed on line 14 (batt_fail).
EDIT: Change line 172 to
data["soilbatt" + i] = new Nested_obj (1.6, -7778, 1.6, 1.1); There was a misprint in the documentation I received.