Wetterstationen.info Startseite - Impressum  

 
Komplette entschlüsselung für WS-2300?
Gehe zu Seite zurück  1, 2, 3, 4, 5, 6, 7, 8  weiter
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 17.04.03 - 20:48    Titel: »Zitat  

Hej All
New small discovery

Current Time
Address: 0x200, Length 3
Command: 82 8A 82 82 CE
Answer: 33 GH IJ KL cs

Decoding:
GH = Current time: Seconds BCD coded
IJ = Current time: Minutes BCD coded
KL = Current time: Hours BCD coded

Or in more plain terms
Current time = KL:IJ:GH

Regards Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 00:58    Titel: »Zitat  

The previous posting I sent is valid but it seems you should only use it for the seconds.
The rest of the data can be unreliable it seems.
The PC program only fetch two bytes giving minutes and seconds.

I have now found a better command.
This gives current time, date and weekday.

Address: 0x23B, length 6
Command: 82 8A 8E AE DA
Answer: 36 GH IJ KL MN OP QR cs

Decoding:

33 - Header/3 data bytes
GH - Current Time: BCD coded minutes
IJ - Current Time: BCD coded hours
K - Current date: BCD coded 1s
L - Current weekday: Mo=1, Tu=2, We=3, Th=4, Fr=5, Sa=6, Su=7
M - Current month: BCD coded 1s
N - Current date: BCD coded 10s
O - Current year: BCD coded 1s
P - Current month: BCD coded 10s
Q - Unknown
R - Current year: BCD coded 10s
cs - Checksum

In more human language current time is: GH:IJ
Current date is (format dd-mm-yy): NK-PM-RO

PS.
If you read even more bytes you find additional bytes describing the date.
I noticed that if you manually set the date these bytes change.
But they did not change over midnight. I think it is a temporary storage for when you set the date manually.
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 03:16    Titel: »Zitat  

I got the crazy idea to video film the Windows program during startup. I could see that each set of data arrive in sequence so I decided to find out exactly which and if it is consistant. I found out that it is consistant.

The data is shown in this sequence

1. Wind data
2. Rain
3. Indoor Temperature
4. Outdoor Temperature
5. Indoor Humidity
6. Outdoor Humidity
7. Windchill
8. Dewpoint
9. Tendency incl forecast symbol
10. Pressure current
11. Pressure min/max
12. All bottons

I hope this helps in the searching through Portmon log files.

As far as I can see we are still far from there.
I cannot make the wind data fit. But I need some more wind outside to test further. Is the wind speed really only one byte?

We still need to find the data for dewpoint and windchill.

And naturally we need to find the addressing system for all the historic data.

And then there are all the alarms.

Centauri made a list of commands that get date/time. What is the format for the replies?

The reset of max/min. Does that give any replies?

The last command for the min/max resets - what is the system for that? I see values like 42, 82, 6A, 4A, 4E. Did you find out what this means?

I have come very far with my C program.
It is still not able to retry when the reading fails. I will work on that tomorrow.
The first version 0.1 where you have to run the program again when it fails is on my website for those that are interested.

To build it just run 'make'.
To use it.
./ws2300 hexadr number_of_bytes
Example
./ws2300 2fb 5

http://www.lavrsen.dk/sources/weather/ws2300-0.1.tar.gz

Enjoy
Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 03:20    Titel: »Zitat  

I forgot to say.
The program is made to run on COM2.
To run COM1 change the line

#define DEVICENAME "/dev/ttyS1"
to
#define DEVICENAME "/dev/ttyS0"

Remember to change access rights to the device so that non-root has read/write access to either /dev/ttyS0 or 1.

Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 15:53    Titel: »Zitat  


Updated Wind info

I wanted to find out if the wind speed was 8 bits as Cantauri indicated or more as the max spec for windspeed in the WS2300 specifies. So I had to confirm my theory.
How do you make a hurricane in your living room?
First I tried with fans and blowing until my face turned blue. That only gave a small breeze. So I have to be more inventive. The mill has a small ring magnet, clearly visible. On the housing there is a small hall element that measures the magnet pulses when the mill rotates.
A tone generator and a coil and I had my own severe storm. The WS2300 overflows at 50 m/s or 500 dm/s equal to binary value 1F4. The 1 is as I though the nipple just above at address 52B.
When overflowing address 527 goes from 0 to 3.

This all gives this updated info about the current wind.

Wind
Command: 82 96 8A 9E CE
Answer: 33 GH IJ KL cs

Decoding:
33 Header/3 data bytes
G - Minimum code - see below
H - 0 when normal, 3 when overflow
IJ - Windspeed - binary coded, LIJ(binary)/10 [m/s]
K - Direction (K*22,5°) - see below
L - Windspeed - binary coded, upper 4 bits, only LSB used.
cs - Checksum

G:
0 - minimum = 0
1 - minimum = --,- (undefined)
2 - minimum = OFL (overflow)

K: 4 bit binary * 22.5° - examples shown below
0 - 0° (North)
1 - 22,5°
2 - 45°
3 - 67,5°
4 - 90° (East)
8 - 180° (South)
C - 270° (West)

The 3 nipples LIJ is the windspeed binary coded in tenths of a meter/second.
Windspeed = (L*256 + I*16 + J*1)/10 [m/s]
L is the most significant bit (can only be 0 or 1), J is the 4 least significant bits.
The data is only valid when the byte GH = 00.

I found out more, I will post an extended Wind version in a few minutes
Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 16:08    Titel: »Zitat  

Wind 2
Address: 0x527, length 6
Command: 82 96 8A 9E DA
Answer: 36 GH IJ KL MN OP QR cs

Decoding:
33 Header/3 data bytes
G - Minimum code - see below
H - 0 when normal, 3 when overflow
IJ - Windspeed - binary coded, LIJ(binary)/10 [m/s]
K - Direction (K*22,5°) - see below
L - Windspeed - binary coded, upper 4 bits, only LSB used.
MN - Direction, 2 measurements ago, 1 measurement ago
OP - Direction, 4 measurements ago, 3 measurement ago
Q - Not used
R - Direction, 5 measurements ago
cs - Checksum

G and K. Same as above.

The nipples M, M, P, O, R contains the previous 5 wind directions before the current. So a total of 6 directions are stored. Each time a new measurement is taken the number are pushed into this FIFO buffer and the oldest is thrown away. The station uses this information to display the small arrows on the wind direction display.

Who finds the next info
Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
lightweather2300





Anmeldung: 02.04.2003
Beiträge: 13

Beitrag Verfasst am: 18.04.03 - 21:31    Titel: »Zitat  

Hi
Nice for wind direction and speed at adress 0x527
I missed the fifo buffer for 6 dirs.
more about wind
0x512 seems for alarms speed setting
0x4EC seems for Min and Max values and Dates
0x4EC , 15
3F AB CD EF GH IJ KL MN OP QR ST UV WX YZ ab cd CS
lowest speed seems near GH EF
Hightest speed seems near KL IJ
Date for low
I think UV is for year (YY)
QR is for day (DD)
ST is for month (MM)
OP is for hour (HH)
MN is for min (MM)
Date for Hightest speed
ab for day
cd for month
YZ for hours
WX for mins
It would be fine if a fifo would exist like for directions ?
Claude
»Profil   »Private Nachricht   »E-Mail
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 18.04.03 - 22:11    Titel: »Zitat  

Thanks for the nice info Claude. I will play with that. Meanwhile here is my next discovery.

Windchill

Address 0x3A0, Length 7
Command: 82 8E AA 82 DE
Answer: 37 GH IJ KL MN OP QR ST cs

Decoding:
H - Error flags. Flag details unknown but 0 means that data are valid
IJG - Windchill - BCD coded offset 30. Windchill = IJG - 30 [C]
KL - Unknown
PMN - Windchill minimum - BCD coded offset 30. Windchill_min = PMN-30 [C]
O - Unknown
R - Unknown
STQ - Windchill maximum - BCD coded offset 30. Windchill_max = PMN-30 [C]
cs - Checksum

I still have not found the exact meaning of the error flags and I cannot be 100% sure that it is error flags. But everytime I have seen a value different than 0 the station says OFL and the windchill value makes no sense. So I think the idea is to check for the H nipple and ignore data if it is not zero. But it is still a guess.

The KL nipples change from time to time but I have found no meaning in the values seen.

Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
lightweather2300





Anmeldung: 02.04.2003
Beiträge: 13

Beitrag Verfasst am: 18.04.03 - 23:23    Titel: »Zitat  

Hi,
Hi Kenneth,
I have seen (but not sure(:==(( )
when the remote sensors are not wired or powered
(and station displays --)
GH = 0xAA
IJ = 0xAA
It seems to be same for all C temperatures,Dew point etc.
I was so thinking:
WC = (IJ+(GH/100))-30
WCMax = (ST+ (QR/100))-30
WCMin = (PM+ (NK/100)) -30
But it is true my compute misses OFL.
And L remains unexplained ..
What is your mind ?
Is BCD for Binary Coded Decimal and (IJ+GH/100) could be good for that or do i miss something ?
best regards,
Claude

»Profil   »Private Nachricht   »E-Mail
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 19.04.03 - 00:01    Titel: »Zitat  

I doubt the value are with two decimals.
I see only 1 decimal in the PC program and on the display.
I noticed also the AA when the connection is lost (which happens even with wired connection - I think it is the wind detector that sends garbage back sometime).
And I also once saw 25.5 m/s with the H byte different from 0. When values are valid then the H nipple seems 0.
The O and R seems to be always zero so I think they just not used.

Let me know if you observe other funny things.

Here in Denmark it is rising pressure and sunshine. I have not yet found a way to simulate low pressure. Maybe a plastic container sealed and ...

Maybe we can help each other.

I am looking at the address 26B length 1
Command 82 8A 9A AE C6.

I am sure this is the tendency and forecast data. I read the value 0x12 now.
It would be a help if someone with falling or steady pressure AND/OR rain or cloudy symbol to tell me what read out on that address.

My guess is that one nipple is rising/falling and the other is forecast (3 values: sun, cloudy or rain).

Did anyone decode the dew point?
It is address 3CE length 7.

Kenneth


[ Diese Nachricht wurde geändert von: Lavr am 2003-04-19 00:05 ]

[ Diese Nachricht wurde geändert von: Lavr am 2003-04-19 00:12 ]
»Profil   »Private Nachricht   »E-Mail   »Website
lightweather2300





Anmeldung: 02.04.2003
Beiträge: 13

Beitrag Verfasst am: 19.04.03 - 00:30    Titel: »Zitat  


>>I think they just not used.
I really don't know how we could test that
(decimals)

>>I am sure this is the tendency and forecast data. I read the value 0x12 now.

>>It would be a help if someone with falling or steady pressure AND/OR rain or cloudy symbol to tell me what read out on that address.

>>My guess is that one nipple is rising/falling and the other is forecast (3 values: sun, cloudy or rain).
right I found that
High nipple for tendency
0: = 1: Up 2: Down
low for icone
0: Rain 1:Cloud 2: Sun
each from 0 to 2 i think
I guess Dew Point WC TIn TOut are all the same format
as WC
I found
TIn 0x346,7
TOut 0x373,7


[ Diese Nachricht wurde geändert von: lightweather2300 am 2003-04-19 00:40 ]
»Profil   »Private Nachricht   »E-Mail
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 19.04.03 - 02:29    Titel: »Zitat  

I have been studying dewpoint.

Dew point seems be using two decimal places.

Dewpoint
Address 0x3CE, length 7
Command: 82 8E B2 BA DE
Answer: 37 GH IJ KL MN OP QR ST cs

Decoding:


37 - Header/7 data bytes
IJGH - Current dewpoint - BCD coded offset 30. Dewpoint = IJ.GH - 30 [C]
L - Unknown
PMNK - Minimum dewpoint - BCD coded offset 30. Dewpoint_min = PM.NK - 30 [C]
O - Unknown
STQR - Maximum dewpoint - BCD coded offset 30. Dewpoint_max = ST.QR - 30 [C]
cs - Checksum

Current dewpoint [°C] = (I*10 + J*1 + G/10 + H/100) - 30
or expressed as digits: IJ.Q - 30

Minimum dewpoint [°C] = (P*10 + M*1 + N/10 + K/100) - 30
or expressed as digits: PM.N - 30

Maximum dewpoint [°C] = (S*10 + T*1 + Q/10 + R/100) - 30
or expressed as digits: ST.Q - 30

This gives a dewpoint range from -30 °C to +69.9 °C
The stations seems to calculate the value by subtracting 30 and then throw away the last digit. It does not round to nearest tenth.

I will go back and study temperature and windchill again to see if there are two decimal places on some of them.

Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 19.04.03 - 03:47    Titel: »Zitat  

Updated rain
RE-UPDATED 20-APR-03.
Rain is with two decimals!
Earlier there was a nice helpful posting on rain. I have played further and here is an update

Rain 1 hour
Address: 0x4B4, length 11
Command: 82 92 AE 92 EE
Answer: 3B GH IJ KL MN OP QR ST UV WX YZ gh cs

Decoding:
3B - Header/11 data bytes
KLIJG.H - Current rain last hour - BCD coded [0.01 mm]. Rain = KLIJ.GH [mm]
QROPMN - Maximum one hour rain - BCD coded [0.01 mm]. Rain = QROP.MN [mm]
ST - Time for maximum value, minute in BCD
UV - Time for maximum value, hour in BCD
WX - Date for maximum value, date in BCD
YZ - Date for maximum value, month in BCD
gh - Date for maximum value, last two digits of year in BCD
cs - Checksum


Rain 24 hours
Address: 0x497, length 11
Command: 82 92 A6 9E EE
Answer: 3B GH IJ KL MN OP QR ST UV WX YZ gh cs

Decoding:
3B - Header/11 data bytes
KLIJGH - Current rain last 24 hours - BCD coded [0.01 mm]. Rain = KLIJ.GH [mm]
QROPMN - Maximum 24 hour rain - BCD coded [0.01 mm]. Rain = QROP.MN [mm]
ST - Time for maximum value, minute in BCD
UV - Time for maximum value, hour in BCD
WX - Date for maximum value, date in BCD
YZ - Date for maximum value, month in BCD
gh - Date for maximum value, last two digits of year in BCD
cs - Checksum


Rain Total
Address: 0x4D2, length 8
Command: 82 92 B6 8A E2 (total)
Answer: 37 GH IJ KL MN OP QR ST UV cs

Decoding:
38 - Header/8data bytes
KLIJGH - Total Rain - BCD coded [0.01 mm]. Rain = KLIJ.GH [mm]
MN - Time since total was reset, minute in BCD
OP - Time since total was reset, hour in BCD
QR - Date since total was reset, date in BCD
ST - Date since total was reset, month in BCD
UV - Date since total was reset, last two digits of year in BCD
cs - Checksum

The rain measurer can count in steps of approx 0.518 mm. It keeps the 2 decimals for better accumulated accuracy but the
resolution is in reality only about 0.5 mm.

Kenneth

[ Diese Nachricht wurde geändert von: Lavr am 2003-04-19 03:51 ]

[ Diese Nachricht wurde geändert von: Lavr am 2003-04-20 16:04 ]
»Profil   »Private Nachricht   »E-Mail   »Website
Lavr

1




Anmeldung: 17.04.2003
Beiträge: 60
Wohnort: Glostrup, Denmark

Beitrag Verfasst am: 19.04.03 - 04:37    Titel: »Zitat  

I have looked at the max wind speed.
It does not work. It is quiet. Not a wind. I have reset the max speed to zero and verified that it read zero on the PC program. After a few minutes the wind speed has been measured as 25.5 m/s. Always as 25.5!! And this is stored as the max value. That is utter garbage and clearly either a hardware error from the sensor or a software bug. It means that the max wind speed feature is useless and it also means that you should read windspeed more than once from your own program and throw away the higest values. Maybe you only have to throw away 25.5 m/s when it comes up.

Kenneth
»Profil   »Private Nachricht   »E-Mail   »Website
Centauri





Anmeldung: 27.12.2002
Beiträge: 12
Wohnort: Köthen - Sachsen/Anhalt

Beitrag Verfasst am: 19.04.03 - 09:04    Titel: »Zitat  

Hallo!

Ich habe bei mir auch wieder ein paar Dinge beobachtet. Wenn die Station neu angeschalten wird, habe fast keine Übertragungsfehler. Sobald die Station nach 15 min die DCF-Uhr synconisiert, vermehren sich die Fehler. Ich habe bei einem Abfrageintervall von 30s getestet. Die Station habe ich nun schon 3 mal neu angeschalten und jedes Mal ist das selbe zu beobachten.

Wenn ich über längere Zeit (30-60sek) keine Übertragung zustand bekomme, ändert sich danach meist die Werte von den Aussensensoren. Beim Wind ist das im Moment sehr gut zu beobachten.

cu
Marco
»Profil   »Private Nachricht   »E-Mail
Gehe zu Seite zurück  1, 2, 3, 4, 5, 6, 7, 8  weiter



Impressum / Datenschutz | Disclaimer / Haftungsausschluss | powered by phpBB, © 2001, 2002 phpBB Group
© 1999-2010 Tobias Gerstmaier. Alle Rechte vorbehalten. Alle Angaben ohne Gewähr.