Author Topic: EasyWeatherIP and WS1001 Protocol  (Read 15995 times)

0 Members and 1 Guest are viewing this topic.

Offline jeff.kowalski

  • Member
  • *
  • Posts: 3
Re: EasyWeatherIP and WS1001 Protocol
« Reply #50 on: October 12, 2018, 11:43:39 PM »
@wx5020
Hi Bill,

I love the perl script you wrote to get data from WS1001 consoles.
It has enabled me to create a similar system to retrieve weather for storage in influxdb and visualization in grafana.

I'm curious about the contents of msg-tcp-nowrec-req.dat and msg-udp-srch.dat.
How did you determine those?

From what I can tell, the format is similar to the header in the responses.
PC2000\0\0      - HP_HEAD null padded to 8 bytes
SEARCH\0\0      - HP_CMD null padded to 8 bytes
or
PC2000\0\0      - HP_HEAD null padded to 8 bytes
READ\0\0\0\0\0  - HP_CMD null padded to 8 bytes
NOWRECORD\0..\0 - HP_TABLE null padded to 24 bytes

Your msg-tcp-nowrec-req.dat is as I would expect: PC2000\0\0READ\0\0\0\0NOWRECORD\0\0\0\0\0\0\0\0\0\0\0\0\0

However, in your .msg-udp-srch.dat file, I see you have data in the areas where I would have expected padding nulls.
msg-udp-srch.dat:       PC2000\0\0SEARCH\0\0\0,Pw\0\0\0\0\0ݿw
Is that ",Pw" and "ݿw" data significant?  Was it empirically derived?  What does it mean?  Where did you find the description of these messages?

Thanks in advance for your help,
Jeff

Offline Aussie Susan

  • Senior Member
  • **
  • Posts: 75
Re: EasyWeatherIP and WS1001 Protocol
« Reply #51 on: October 14, 2018, 10:45:50 PM »
If you want a few more details on the packets passed back and forth, have a look at the header of the main Python file in the HP1000 driver on Github (https://github.com/AussieSusan/HP1000).
I've 'decoded' the ones that allow the driver to work.
Susan

Offline jeff.kowalski

  • Member
  • *
  • Posts: 3
Re: EasyWeatherIP and WS1001 Protocol
« Reply #52 on: October 15, 2018, 03:08:00 AM »
Thanks so much for your prompt reply Aussie Susan.

I've seen your code, which was very helpful.  Nonetheless, I don't understand the messages in Bill's example.
I was specifically asking about the non-null bytes of the transmissions.

In the UDP broadcast, his code sends:
PC2000^@^@SEARCH^@^@^@M-MM-}M-^T,M-{M-c^K^LM-{M-c^KPM-+M-%w^@^@^@^@^@M-]M-?w⏎
I would have expected "PC2000" and "SEARCH" each null-padded (^@) to 8 bytes, followed by 24 nulls, but there's "stuff".

Similarly, in the TCP request for current data, I see
PC2000^@^@READ^@^@^@^@NOWRECORD^@^@^@^@^@^@^@M-8^A^@^@^@^@^@^@⏎
Again here I would have expected "PC2000" and "READ" each null padded to 8 bytes, and "NOWRECORD" null padded to 24 bytes.

What's the extra stuff where I expected those trailing nulls in the 24 byte table field?  Does it have meaning?
Are there documents for any of this, or was it all empirically deduced?

Jeff

Offline Dr__Bob

  • Member
  • *
  • Posts: 26
Re: EasyWeatherIP and WS1001 Protocol
« Reply #53 on: October 15, 2018, 01:46:16 PM »
A long time ago, I asked Ed at Ambient Weather for some documentation.  He passed on the following two files, with no other information.  With Bill's help, along with a lot of help from Matthew Wall, I started to put together a driver.  But then, Susan beat me to the punch with her driver.  But yeah, it wasn't so easy trying to understand the protocol, with basically only those two files as guidance.  Some of it is empirical... [ You are not allowed to view attachments ]  [ You are not allowed to view attachments ]

Offline jeff.kowalski

  • Member
  • *
  • Posts: 3
Re: EasyWeatherIP and WS1001 Protocol
« Reply #54 on: October 15, 2018, 02:28:56 PM »
That is super-helpful, Dr_Bob!  Thank you!  I can see exactly what's going on in the SEARCH phase of the communication.
I can see from the sprintf_s calls that the data that trails the HP_TABLE is likely junk.  sprintf_s doesn't change anything after it writes just one null.
You included one file, but mentioned there were two.  What was the other file?  Was it a header describing the HEAD structure, or maybe the NOWRECORD phase of communication?

Offline Mandrake

  • Forecaster
  • *****
  • Posts: 1102
Re: EasyWeatherIP and WS1001 Protocol
« Reply #55 on: February 20, 2019, 11:15:22 AM »
Hi folks, I am just about to embark on the journey to a wifi only fine offset station as my old 9 year old USB station is dying.
I have ordered a HP2550 (WS2000) station from Ecowitt and was hoping that I can find a way to capture the data direct from the console in the manor suggested in this thread.
In that way I can keep some degree of continuity and keep Cumulus MX (pi based) working with an output in easyweather format it can read.
So the million dollar question is....does this script work for the newer consoles?
G1ZFO

Ecowitt HP2551A + WH65 Tri-Wing (Wunderground: IGUILDFO67)
Ecowitt GW1000 (Wunderground: IGUILDFO68)
Ecowitt GW1000 (Mk2) test environment driving CumulusMX on a RPi 3b
Ecowitt GW2000 (Test)
Ecowitt WS90 Wittboy - Test
Ecowitt WH51 (x6) Soil Moisture Sensor
Ecowitt WH41 PM2.5 AQM Sensor
Ecowitt WH31 (x8) Thermo/Hygro Sensor
Ecowitt WS80 Ultrasonic Anemometer (pre-prod test)
Ecowitt WH57 Lightning Sensor -test
Ecowitt WH32-EP (SHT35) + Davis 7714 Screen
Ecowitt WH45 CO2/PM2.5/PM10 -Test
Ecowitt WN34 Soil Temp Sensor -Test
Ecowitt WN34 Water Temp Sensor -Test
Ecowitt WN35 Leaf Moisture

Offline wx5020

  • Member
  • *
  • Posts: 14
Re: EasyWeatherIP and WS1001 Protocol
« Reply #56 on: March 07, 2019, 09:36:00 AM »
The interface program, ws1001wxdata.pl, is designed to communicate with the Ambient ws-100? consoles. It's based on the protocols used by the Ambient EasyWeather IP software (V3.0). So, I would expect that my program would work for any consoles that communicate with EasyWeather IP. I have an updated version of  ws1001wxdata.pl that runs reliably on the Raspberry Pi with CumulsMX. Let me know if you would like me to upload it.

-Bill

Offline Mandrake

  • Forecaster
  • *****
  • Posts: 1102
Re: EasyWeatherIP and WS1001 Protocol
« Reply #57 on: March 07, 2019, 10:04:28 AM »
Hi Bill, yes please to the latest version!

I have literally only just got my Ecowitt HP2550 (WS2000) station from FedEx today and will need to do some work to put it all together and the sensor array in its new home.
I have speculated from network scans that Galfert did that the newer devices are using a different port to talk. It also seems Easyweather has been ditched in favour of the Ws View android app (AWNET for Ambient). I suspect the other newer consoles all have the same capability as the HP1000 but we just need to tune the port that the software will talk to the console!

Anyway, once I have my new station all setup and I have some time I will do some tests with my Pi and your script to see if I can coax some data from it.
G1ZFO

Ecowitt HP2551A + WH65 Tri-Wing (Wunderground: IGUILDFO67)
Ecowitt GW1000 (Wunderground: IGUILDFO68)
Ecowitt GW1000 (Mk2) test environment driving CumulusMX on a RPi 3b
Ecowitt GW2000 (Test)
Ecowitt WS90 Wittboy - Test
Ecowitt WH51 (x6) Soil Moisture Sensor
Ecowitt WH41 PM2.5 AQM Sensor
Ecowitt WH31 (x8) Thermo/Hygro Sensor
Ecowitt WS80 Ultrasonic Anemometer (pre-prod test)
Ecowitt WH57 Lightning Sensor -test
Ecowitt WH32-EP (SHT35) + Davis 7714 Screen
Ecowitt WH45 CO2/PM2.5/PM10 -Test
Ecowitt WN34 Soil Temp Sensor -Test
Ecowitt WN34 Water Temp Sensor -Test
Ecowitt WN35 Leaf Moisture

Offline wx5020

  • Member
  • *
  • Posts: 14
Re: EasyWeatherIP and WS1001 Protocol
« Reply #58 on: March 13, 2019, 04:33:50 PM »
I recently updated the newest version.

https://github.com/wrbelfield/ws1001wxdata

When running on the raspberry pi, use the -p option to find the local host address automatically.
If you try it out with your new weather station, let me know how it works.

-Bill

Offline Mandrake

  • Forecaster
  • *****
  • Posts: 1102
Re: EasyWeatherIP and WS1001 Protocol
« Reply #59 on: March 14, 2019, 04:37:42 AM »
Thankyou Bill, I will give it a try when I get a moment.
I am uncertain that the WS2000/HP2550 will work though since they do not seem to provide live data to the phone app now that I have it to play with.
However the good news is that the Matchbox sized Gw-1000 IP logger does do live data so that means your script will definitely work if I get the correct port on the GW-1000 and Fine Offset have not changed the data stream.

I will let you know!
G1ZFO

Ecowitt HP2551A + WH65 Tri-Wing (Wunderground: IGUILDFO67)
Ecowitt GW1000 (Wunderground: IGUILDFO68)
Ecowitt GW1000 (Mk2) test environment driving CumulusMX on a RPi 3b
Ecowitt GW2000 (Test)
Ecowitt WS90 Wittboy - Test
Ecowitt WH51 (x6) Soil Moisture Sensor
Ecowitt WH41 PM2.5 AQM Sensor
Ecowitt WH31 (x8) Thermo/Hygro Sensor
Ecowitt WS80 Ultrasonic Anemometer (pre-prod test)
Ecowitt WH57 Lightning Sensor -test
Ecowitt WH32-EP (SHT35) + Davis 7714 Screen
Ecowitt WH45 CO2/PM2.5/PM10 -Test
Ecowitt WN34 Soil Temp Sensor -Test
Ecowitt WN34 Water Temp Sensor -Test
Ecowitt WN35 Leaf Moisture

Offline ricardosteffens

  • Member
  • *
  • Posts: 1
Re: EasyWeatherIP and WS1001 Protocol
« Reply #60 on: December 06, 2022, 04:24:38 PM »
Hello Guys... First of all, congrats about the achievement, work like a charm with my Misol HP2000. I just wondering how can I make a script, or a service to run directly on startup in Debian. Someone can help me?

Thanks