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

0 Members and 1 Guest are viewing this topic.

Offline Dr__Bob

  • Member
  • *
  • Posts: 23
Re: EasyWeatherIP and WS1001 Protocol
« Reply #25 on: February 26, 2017, 12:31:52 PM »
Are you running a firewall?  I had a similar issue on my Raspberry Pi that wouldn't let the response from the ws1001 console back in.  I had to open udp port 6000 and tcp port 6500 in order to get things working.

Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #26 on: February 26, 2017, 01:10:08 PM »
Ahh!  Dr__Bob, you were right on the nose!  It was the fedora system's firewall.  Made the appropriate settings, and it's communicating now!  I didn't realize it was a two-way conversation between the fedora and ws1001 device.  Figured it was fedora going and grabbing info from ws1001.  But, as you point out, it's two-way.

So, do we just keep the shell script running indefinitely, and it transfers the updating data as it comes in?  It looks like it's just bringing in one line at a time into the data file and overwriting the data already in there.  Or should we be running the script every minute act on that minute's data each time?  (Mind you, I haven't figured out yet what I'm going to do with the data.  Just wanted to first make sure I can connect.)  I'll have to paruse the the other posts on this and see more of how people are using the data.  Thanks again for fixing my connection issues!  --Kal!

Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #27 on: February 26, 2017, 01:16:28 PM »
Now that I have the script communicating (thanks Dr__Bob), has anyone modified the code to constantly pull in the data into the ewpdata.dat file and not have it overwritten (like it's doing for me), but instead, just keep a file building up with data?  --Kal

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 382
Re: EasyWeatherIP and WS1001 Protocol
« Reply #28 on: February 26, 2017, 01:20:21 PM »
maybe try stopping trying to connect...so that the console times out the connection and releases the port so you can start again

Offline wx5020

  • Member
  • *
  • Posts: 12
Re: EasyWeatherIP and WS1001 Protocol
« Reply #29 on: February 26, 2017, 01:41:37 PM »
Kal,

Yes, if you don't want to overwrite the output file, change the following instruction (line 301),

if(open(EWP, ">", $ewcumulusfile)) {

to

if(open(EWP, ">>", $ewcumulusfile)) {

Keep in mind that Cumulus reads only the last line of the output file (ewpdata.dat). Also, the file will continue to grow at the rate of one line every 12 seconds.

-Bill


Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #30 on: February 26, 2017, 01:47:28 PM »
Perfect Bill!  That was it.  (Funny, I was just reading through the perl script file before your reply to see if I could find the write to the data file so I could put in a >>, and you just made it easier! It's working!  (And growing!)  Thanks!  Kal

Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #31 on: February 26, 2017, 02:19:59 PM »
I also notice that if I have an EasyWeatherIP connection to the ws1001, I cannot connect with the ws1000wxdata script (timeouts.)  Once I release the EasyWeatherIP-to-ws10001 connection, the script starts to connect and transfers data.  So, one active connection to the ws1001 at a time, then?  --Kal

Offline wx5020

  • Member
  • *
  • Posts: 12
Re: EasyWeatherIP and WS1001 Protocol
« Reply #32 on: February 26, 2017, 02:29:28 PM »
Yes, as far as I know, the ws1001 console can handle only one TCP connection at a time.

-Bill

Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #33 on: February 26, 2017, 02:34:04 PM »
So, if the console can only handle one TCP connection at a time, can one connect to it with EasyWeatherIP or the perl script or even something else, and still have the console continuously communicating with Weather Underground?   --Kal

Offline Dr__Bob

  • Member
  • *
  • Posts: 23
Re: EasyWeatherIP and WS1001 Protocol
« Reply #34 on: February 26, 2017, 03:01:32 PM »
The connection through the EasyWeatherIP protocol and the connection to WU are independent.  I've been running Aussie Susan's implementation (for weewx) for over a month now (and I was using WX5020's before that) and, at the same time, having the console upload to WU.  I have noticed a potential interference in that on occasion (maybe every couple of weeks or so) the console will hang, and neither EasyWeatherIP nor WU get any data.  And by "hanging" the console doesn't get any updates either, with everything (including the time) frozen.  The only way around that is a console power cycle.  I've changed the update period on Susan's program to only grab the data from the console every 15 seconds and, based on very limited statistics, the console might be working OK now.

Offline kalel410

  • Member
  • *
  • Posts: 9
  • Ambient WS-1001 Wifi Owner
Re: EasyWeatherIP and WS1001 Protocol
« Reply #35 on: February 26, 2017, 03:05:48 PM »
Good info, Dr__Bob.  Thanks!  --Kal

Offline Aussie Susan

  • Member
  • *
  • Posts: 38
Re: EasyWeatherIP and WS1001 Protocol
« Reply #36 on: February 26, 2017, 08:51:09 PM »
I've changed the update period on Susan's program to only grab the data from the console every 15 seconds and, based on very limited statistics, the console might be working OK now.
I've updated the code so that the update period is a parameter now.
Still trying to get time to polish this up for release.
Susan

Offline pimohdaimaoh

  • Senior Contributor
  • ****
  • Posts: 160
  • "Be aware to our nature"
    • PIMOHWEATHER
Re: EasyWeatherIP and WS1001 Protocol
« Reply #37 on: February 27, 2017, 07:19:27 AM »
Hello,


Where should I install these files? and can this be applicable to WS-2902? Sorry im newbie here. thanks

my weather site is currently under test and construct :)

http://pimohweather.webutu.com/wxindex.php
« Last Edit: February 27, 2017, 11:40:03 AM by pimohdaimaoh »

My test Site:
http://pimohweather.webutu.com
My CWOP ID: EW0758

Offline gillesroszak

  • Contributor
  • ***
  • Posts: 114
  • Qui trop écoute la météo, passe sa vie au bistrot.
    • meteokerbach
Re: EasyWeatherIP and WS1001 Protocol
« Reply #38 on: June 06, 2017, 12:34:10 PM »
I wrote a Perl program that gets the real-time weather data from the Ambient WS1001 console and writes an
output file that can be read by the Cumulus weather station program. The program establishes a TCP connection with the console and reliably gets the real-time data.

See:

https://github.com/wrbelfield/ws1001wxdata

Bill



Hi,

I downloaded your perl program but i don't know how to use it. can you explain it to me please ?
How should i set up cumulus  software ?
For running your program should i use a command line and which one?
Thanks in advance



Offline wx5020

  • Member
  • *
  • Posts: 12
Re: EasyWeatherIP and WS1001 Protocol
« Reply #40 on: June 08, 2017, 05:38:37 PM »

>I downloaded your perl program but i don't know how to use it. can you explain it to me please ?
>How should i set up cumulus  software ?
>For running your program should i use a command line and which one?
>Thanks in advance

The perl program, ws1001wxdata, can be run on Linux or Windows. See the example shell script, run_ws1001wxdata.sh, for running the program on Linux. The program can be executed on Windows by running the following command:

perl ws1001wxdata.pl msg-udp-srch.dat msg-tcp-nowrec-req.dat ewpdata.dat

It's necessary to have Perl installed on your system. For Windows you could use ActivePerl (Perl version 5.20.1).

Cumulus must be configured to read the file, ewpdata.dat, which ws1001wxdata.pl writes out every 12 seconds. You can set this up in Cumulus by selecting 'station' in the Configuration menu. Then select 'EasyWeather' under station type. Enter the full path of the file, ewpdata.dat, in the Easyweather.dat box under settings. Select the EasyWeather interval to be 0.100 minutes. Cumulus will then read ewpdata.dat every 6 seconds.

Weather data values received from the WS-1001 console are expected to be given in US units (not metric). If you are using metric data values the program would need to be modified.

Please download the latest version of ws1001wxdata which I recently updated.

Bill

Offline gillesroszak

  • Contributor
  • ***
  • Posts: 114
  • Qui trop écoute la météo, passe sa vie au bistrot.
    • meteokerbach
Re: EasyWeatherIP and WS1001 Protocol
« Reply #41 on: June 08, 2017, 07:07:38 PM »
thanks for your reply but i have a problem.
when i input the command i got this message(see below) what can be wrong ?
all the files are there in the folder ws1001wxdata-master. I can't understand.


C:\>perl ws1001wxdata-master\ws1001wxdata.pl msg-udp-srch.dat msg-tcp-nowrec-req.dat ewpdata.dat
*** ws1001wxdata.pl started Fri Jun  9 01:00:42 2017
ws1001wxdata-master\ws1001wxdata.pl: ERROR Could not open input file, msg-udp-srch.dat. No such file or directory

Offline wx5020

  • Member
  • *
  • Posts: 12
Re: EasyWeatherIP and WS1001 Protocol
« Reply #42 on: June 08, 2017, 08:06:36 PM »
You need to specify the parent directory of the input and output files:

C:\>perl ws1001wxdata-master\ws1001wxdata.pl ws1001wxdata-master\msg-udp-srch.dat ws1001wxdata-master\msg-tcp-nowrec-req.dat ws1001wxdata-master\ewpdata.dat

Or, you could run the program in the directory, ws1001wxdata-master:

C:\>perl ws1001wxdata.pl msg-udp-srch.dat msg-tcp-nowrec-req.dat ewpdata.dat

-Bill

Offline gillesroszak

  • Contributor
  • ***
  • Posts: 114
  • Qui trop écoute la météo, passe sa vie au bistrot.
    • meteokerbach
Re: EasyWeatherIP and WS1001 Protocol
« Reply #43 on: June 09, 2017, 03:27:08 AM »
Ok thank you Bill i will try it  and let you know


Gilles
« Last Edit: June 09, 2017, 03:33:40 AM by gillesroszak »

Offline gillesroszak

  • Contributor
  • ***
  • Posts: 114
  • Qui trop écoute la météo, passe sa vie au bistrot.
    • meteokerbach
Re: EasyWeatherIP and WS1001 Protocol
« Reply #44 on: June 09, 2017, 03:31:53 PM »
HI
No problem for connecting to the ws 1001 now but i get pressure data totally false.look at the attached file.

Pressure is 24467 hPa !!!!!!

how can i resolve that

 [ You are not allowed to view attachments ]

Offline wx5020

  • Member
  • *
  • Posts: 12
Re: EasyWeatherIP and WS1001 Protocol
« Reply #45 on: June 09, 2017, 06:45:55 PM »
Hi Gilles,

By default, ws1001wxdata expects the weather data values received from the WS-1001 console to be given in US units (not metric). I just uploaded a new version of the program that provides the option of handling the console data given in metric units (which is what you are using for your weather station). Download this new version from

https://github.com/wrbelfield/ws1001wxdata

and run the program using the -m option:

perl ws1001wxdata.pl -m msg-udp-srch.dat msg-tcp-nowrec-req.dat ewpdata.dat

Cumulus should then display the data correctly.

Bill


Offline gillesroszak

  • Contributor
  • ***
  • Posts: 114
  • Qui trop écoute la météo, passe sa vie au bistrot.
    • meteokerbach
Re: EasyWeatherIP and WS1001 Protocol
« Reply #46 on: June 10, 2017, 06:25:16 AM »
OK Bill Thanks a lot


Gilles

Offline Blisk

  • Member
  • *
  • Posts: 18
Re: EasyWeatherIP and WS1001 Protocol
« Reply #47 on: September 11, 2017, 09:10:53 AM »
Is anyone of you tried to send those data to weewx?
I try to put my weather station data on web page, but looks like weewx pulling it from weather station.
So I ma stuck on this one. Don't know if weewx can be installed on windows since it is in written perl?
Any advice is appreciated.

Offline mwall

  • Contributor
  • ***
  • Posts: 122
Re: EasyWeatherIP and WS1001 Protocol
« Reply #48 on: September 11, 2017, 10:51:46 AM »
Don't know if weewx can be installed on windows since it is in written perl?
Any advice is appreciated.

weewx will run on windows, but you'll have to use the windows branch since syslog is not available on windows:

https://github.com/weewx/weewx/tree/windows

it seems to work with network-based drivers and the dyacon driver, but the usb drivers have not been tested extensively on windows.  until someone steps up to be the 'windows expert', you won't get much support; if you have problems, you're on your own!

btw, weewx is written in python, not perl.

m

 

anything