Page 1 of 1

Include in Cumulus "Arduino Weather Station"

Posted: Thu 24 Mar 2011 8:40 pm
by Auriolws
Hi..

My Auriol Weather Station doesnt have a pc connection, i´m writing a code for a Arduino (microcontroller) to receive the RF data from the weather station and serial print it..the code is almost complete.

Example of my code:
Image

With the Arduino and my weather station i can receive:
-Rain data (usually sent every 37seconds)
-Wind direction and wind gust (usually sent every 31seconds)
-Wind average (31seconds)
-Temperature and Humidity (31seconds or if the data changed)


The Arduino communicate with a computer through serial (but it´s connected through USB), i can use any serial program (Hyperterminal, Putty, etc) to monitor the data (using standard serial configuration, 9600 etc etc)...is it possible to include Arduino in Cumulus?


My idea is simple but i dont know if its possible:
There are some Arduino codes for other weather stations (Lacrosse, home-made Arduino Weather Stations, etc), if it will be possible to include the Arduino and someone wants to add their Arduino weather station to Cumulus, all it needs is change the Arduino code slightly to Cumulus receive it.

I can serial print anything..example: if Cumulus will understand better T30.1H22.8; i can change the code to serial print that way.

Sorry if my text is a bit confusing :)


Thanks

Re: Include in cumulus "Arduino Weather Station"

Posted: Thu 24 Mar 2011 8:45 pm
by steve
Auriolws wrote:is it possible to include Arduino in Cumulus?
Yes, it's possible to add any device for which the protocol is known. But it would have to prioritised with everything else; I have a long list of planned work already!

Re: Include in cumulus "Arduino Weather Station"

Posted: Thu 24 Mar 2011 8:55 pm
by mcrossley
If you save the data to an EasyWeather.dat format data file, then Cumulus could be used as-is couldn't it? See thread: https://cumulus.hosiene.co.uk/viewtopic.p ... ile+format

Re: Include in cumulus "Arduino Weather Station"

Posted: Thu 24 Mar 2011 9:10 pm
by Auriolws
steve wrote: Yes, it's possible to add any device for which the protocol is known. But it would have to prioritised with everything else; I have a long list of planned work already!
I understand :)

When (if) you wish to add Arduino to Cumulus, just send me a PM. I´ll change the code to be compatible with Cumulus.

I´ll appreciate a lot..
mcrossley wrote:If you save the data to an EasyWeather.dat format data file, then Cumulus could be used as-is couldn't it? See thread: viewtopic.php?f=4&t=4344&hilit=easyweather+file+format
From what i read it´s perfectly possible, but i need a way to convert the serial data in real time..

Re: Include in cumulus "Arduino Weather Station"

Posted: Thu 24 Mar 2011 10:41 pm
by mcrossley
If you don't have anything else then you could revert to VBScript (though using VB.Net or C# would be better). A framework something like this (untested) sample?

Code: Select all

Dim fs, comPort, outFile, s
Set fs=CreateObject("Scripting.FileSystemObject")
Set comPort = fs.OpenTextFile("COM1:9600,N,8,1", ForReading)

Do While comPort.AtEndOfStream <> True
	s = comPort.ReadLine 
	Set outFile = objFSO.OpenTextFile("C:\EasyWeather.dat", ForWriting, True)
	'Need to format the data into Easy Weather file format
	'Here just write out what comes in as an example
	outFile.WriteLine(s)
	outFile.Close
	WScript.Sleep(100)
Loop

comport.Close

Re: Include in cumulus "Arduino Weather Station"

Posted: Fri 25 Mar 2011 9:45 pm
by Auriolws
Thanks for replying

I´m just using Eltima RS232 Data Logger to see the data in a TXT.

Since Visual Studio can read directly serial it shouldn't be too hard to receive data and convert it to easyweather.dat.

Will that sketch work on VS?

I´m still very green in programming.

Re: Include in cumulus "Arduino Weather Station"

Posted: Fri 25 Mar 2011 10:52 pm
by mcrossley
It may need a bit of tweaking to convert to VB.Net. BUTyou would want to look at using System.IO.Ports to open/read the comm port (a google will find lots of sample source) if you are using VS.

Re: Include in cumulus "Arduino Weather Station"

Posted: Sat 26 Mar 2011 2:14 pm
by TgT
You could also reprogram your arduino to send data via serial in some already known protocol e.g. wmr928
Then selecting wmr928 station in Cumulus and you're done

That's just theoretical way though ;)

Re: Include in cumulus "Arduino Weather Station"

Posted: Sun 27 Mar 2011 2:54 am
by Auriolws
mcrossley wrote:It may need a bit of tweaking to convert to VB.Net. BUTyou would want to look at using System.IO.Ports to open/read the comm port (a google will find lots of sample source) if you are using VS.
There are a couple of tutorials in Arduino website to work with VB or VS..will look later.

Basically my best option is to write a "converter", which can receive serial data and output to a easyweather.dat according to the easyweather.dat template?
TgT wrote:You could also reprogram your arduino to send data via serial in some already known protocol e.g. wmr928
Then selecting wmr928 station in Cumulus and you're done

That's just theoretical way though ;)
I also thought in converting the arduino code to serial output other Cumulus supported weather station, but when i saw how the protocol is in the link you provided (great info!)..its way too much for me, it will require to convert the RF protocol from my weather station to the serial protocol of wmr928 :shock:

Re: Include in cumulus "Arduino Weather Station"

Posted: Tue 29 Mar 2011 4:50 pm
by Auriolws
Just testing the pluviometer with the easyweather.dat file:

-The arduino is sending this

Code: Select all

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, RAIN, 0, 0, 0, 0,
-Using Elmita Data Logger its logging to easyweather.dat

Code: Select all

 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.00, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.00, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.00, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.00, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2.00, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.20, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.20, 0, 0, 0, 0,
 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3.20, 0, 0, 0, 0,
When i started Cumulus with the Data Logger already running, it update the "Rainfall" to 2.0...but it didint update anymore. To get an update i need to restart Cumulus and wait to receive a "new record".

Does Cumulus open only one time the easyweather file (at start) and wait for a new record?

Re: Include in cumulus "Arduino Weather Station"

Posted: Tue 29 Mar 2011 5:06 pm
by steve
Auriolws wrote:Does Cumulus open only one time the easyweather file (at start) and wait for a new record?
It watches the last entry in the file for the date or time changing and uses the data when it does.

Re: Include in cumulus "Arduino Weather Station"

Posted: Tue 29 Mar 2011 5:17 pm
by Auriolws
steve wrote: It watches the last entry in the file for the date or time changing and uses the data when it does.
1 - Transfer date
2 - Transfer time
3 - Reading date
4 - Reading time

from these easyweather fields, can i work with only one field?

Do i need to get the exact date/time format ( 2008-07-25 00:28:14), or can i just use a simple timer (it displays in seconds when the arduino was started) ?

Re: Include in cumulus "Arduino Weather Station"

Posted: Tue 29 Mar 2011 5:27 pm
by steve
It's the 'reading' ones; you can put anything you want in there as long as one or both of them changes with each new set of data.

Re: Include in cumulus "Arduino Weather Station"

Posted: Tue 29 Mar 2011 6:13 pm
by Auriolws
steve wrote:It's the 'reading' ones; you can put anything you want in there as long as one or both of them changes with each new set of data.
Thanks! :D

Its working great! I just put a "timer" in one of the "read" fields. Now i will work on the code to get the right rain data and adding more sensors (temperature/wind, etc).

For Arduino users, just an example:

Code: Select all

         Serial.print(" 0"","" 0"","" 0"","" 0"","" ");
         Serial.print(lastReadMills/1000); //time in seconds since arduino was started 
         Serial.print(","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" 0"","" ");
         Serial.print(rain); //rain data
         Serial.print(","" 0"","" 0"","" 0"","" 0"",");
         Serial.println("");
the result

Code: Select all

 0, 0, 0, 0, 35, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 6.20, 0, 0, 0, 0,
 0, 0, 0, 0, 72, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.40, 0, 0, 0, 0,
 0, 0, 0, 0, 109, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 7.40, 0, 0, 0, 0,

Re: Include in Cumulus "Arduino Weather Station"

Posted: Wed 27 Apr 2011 9:59 am
by richms
In line with what has been posted here, my neighbour has now gone and bought a full on fine offset station, and I have already got some of the outdoor temperature sensors from them around the house.

I have in the past had an arduino recieving my sensors and then a nasty hack of some python sending it up to pachube.

Anyway, now that there is a weather station that is in theory in range (have to test that later but it should be good as its only 40m or so and I can move the reciver if needed) I was wanting to add weather data to what I log.

Anyone have any details of the RF protocol used by the fine offset gear? I sorted out the temperature sensors by tapping into one of the transmitters and recording the data line and looking at it in audasity, but obviously that is not an option when I dont own the station ;) and the 433MHz reciever just gets a barrage of noise when there isnt an actual transmission.

I would be interested in seeing how this works out since sending the data somewhere a bit more useful and hopefully using something more reliable than a kludged script from something else would be good too, but first I need to get the recieving working.