Project

General

Profile

OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081)

Added by SevenW about 6 years ago

I have implemented OOK decoders for the Fine Offset WH1080-series and OEM versions: Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081, ….
I have implemented two versions: One uses the signal level (0 or 1) and the other not, as is common in the current OOK decoders. Using the signal level makes it more tolerant to variations on bit timing for the Alecto type of transmissions. The decoders.h file is compatible with that of the ookRelay2. Incidentially, I also added a Oregon Scientific V1 version for the THN128, which I happend to have in the house.

In the attached program both types of Alecto decoders are active. The decoders do check the CRC themselves, and only crc ok packages are reported. The data is also send into the JeeNode SensorNetwork as NODE=23, GROUP=5.

I started working with the RFM12B DATA connected to on of the external ATMega interrupts. This works well. I also tried other pins, with little or no success. So please advice me if something is wrong in the code.

Interrupts:
The RFM12B DATA-pin can be connected to digital, analog or interrupt inputs of the JeeNode ports, with different results:
IRQ: (EXTINT_1) works well.
DIO: captures one in ten or one in twenty of transmissions.
AIO: did not get this working with comaprator or pin-change interrupt.
The RFM12B DATA connection can be set with a #define:
//Set the RFM12B to ATMega connection.
#define OOK_INT 3 //3 = D3 = ext int 1 = JeeNode P1-4 IRQ
//4 = D4 = JeeNode P1 - DIO
//7 = D7 = JeeNode P4 - DIO
//14 = A0/D14 = Jeemode P1 - AIO
//17 = A3/D17 = Jeemode P4 - AIO

For further details on this connection see http://jeelabs.org/2011/01/27/ook-reception-with-rfm12b-2/ but preferably solder the resistor or plain wire to an I-pin iso an A-pin.

The Alecto WS3000 is not tested. It has 9-byte packages. I have tested it with Alecto WS-4000 10-byte types, which work well. So let me know if you get signals from WS3000 stations.

These are my results, with an unmodified RFM12B (Carrsi=4.7nF):

1970-01-01 00:37:48 ID: 31, T= 6.0`C, relH= 40%, Wvel= 2.3m/s, Wmax= 5.0m/s, Wdir=NW , Rain= 241.8mm
1970-01-01 00:37:56 ID: EC, T= 6.3`C, relH= 44%, Wvel= 3.4m/s, Wmax= 5.4m/s, Wdir=SE , Rain= 22.2mm
1970-01-01 00:41:48 Time synchronized with DCF77: 2013-03-16 20:03:29
2013-03-16 20:03:37 Time synchronized with DCF77: 2013-03-16 20:03:37
2013-03-16 20:04:16 Time synchronized with DCF77: 2013-03-16 20:04:17
2013-03-16 20:04:25 Time synchronized with DCF77: 2013-03-16 20:04:25
2013-03-16 20:05:04 Time synchronized with DCF77: 2013-03-16 20:05:05
2013-03-16 20:05:13 Time synchronized with DCF77: 2013-03-16 20:05:13
2013-03-16 20:06:00 Time synchronized with DCF77: 2013-03-16 20:06:01
2013-03-16 20:06:40 Time synchronized with DCF77: 2013-03-16 20:06:41
2013-03-16 20:06:49 Time synchronized with DCF77: 2013-03-16 20:06:49
2013-03-16 20:07:28 ID: 31, T= 5.9`C, relH= 43%, Wvel= 2.7m/s, Wmax= 4.4m/s, Wdir=S , Rain= 241.8mm
2013-03-16 20:07:36 ID: EC, T= 6.2`C, relH= 45%, Wvel= 2.7m/s, Wmax= 4.4m/s, Wdir=SE , Rain= 22.2mm
2013-03-16 20:08:16 ID: 31, T= 5.9`C, relH= 43%, Wvel= 3.7m/s, Wmax= 5.7m/s, Wdir=SW , Rain= 241.8mm
2013-03-16 20:08:24 ID: EC, T= 6.2`C, relH= 45%, Wvel= 3.0m/s, Wmax= 4.7m/s, Wdir=W , Rain= 22.2mm

SevenWatt.


Replies (21)

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW about 6 years ago

The program compiles against the JeeLib RF12mod branch. To use it with the standard JeeLib, make the following changes in two files:
replace:
> rf12_restore( … );
with:
> rf12_initialize( … );

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by WilcoE about 6 years ago

Hi SevenW,

i miss this topic, You know i have the WS3000 in the garden next to me.
Do i need some hardware modification on my JeeNode to make this working?

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW about 6 years ago

@WilcoE: I thought your neighbor had the FSK version. But you can always try the OOK (older models?) as well. You need a hardware mod, although a simple one. Forget about the capacitor mod. You only need to wire a RFM12B pad to the IRQ pin of any of the four ports (does not matter which on, as the are all the same). See this picture http://jeelabs.org/wp-content/uploads/2011/01/dsc\_2427.jpg (original post referred to in topic start).
Only: wire it to the I-pin (IRQ) iso the A-pin for reliable operation. And in stead of the 100ohm resistor, it can also be done with a plain wire. The resistor is to protect the port and RFM12B in case of bad programming.

SevenW

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

Hello experts,

I’m trying to read data from a DKW2012 with an 868mhz Jeenode and the software from Sevenwatt (https://github.com/SevenW/wirelessweather).

Although the DCF77 packets are processed properly (with correct time information), I’m experiencing problems with the environmental data:

2013-06-17 18:04:04 Time synchronized with DCF77: 2013-06-17 18:04:05 
2013-06-17 18:04:05  pkt_cnt: 4 ok_cnt: 4 pkt: 6C1A980405138617BF

Non-DCF77 packets like these:

2013-06-17 18:08:04  pkt_cnt: 4 ok_cnt: 4 pkt: 5C10A829030B080739
2013-06-17 18:08:04 WS3000 ID: C1, T= 16.8`C, relH= 41%, Wvel=  1.0m/s, Wmax=  3.7m/s, Rain= 616.5mm

Are not processed properly. Although the crc8 matches the contents (hence the ok_cnt), I’m having trouble decoding these to get values matching the indoor-unit.
Anyone out there with a success story decoding info from a Alecto DKW-2012?

My Jeenode is vanilla, no capacitor modified or resistor from the receiver to an IRQ pin. Are any of those modifications necessary?
As the DCF packets are received/decoded properly, I’m assuming the ‘data’ packets are received properly too, kinda confirmed by the matching crc8.

Until now I’ve tried almost every documented protocol found on forums/github, but I’m at a total loss here.

Any suggestions (except for the obvious and buying a ws4000?)

Thanks, Eric.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW almost 6 years ago

Hi Eric,

Can you give me your estimates of what the readings should be at the time of the measurement?

From other weather stations I know that the temperature decoding varies. The rain is cumulative, and your indoor station calculates and displays differences with older readings.

Regards,
SevenW

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

Yes I can. I’ve attached my spreadsheet as html to this message, the top rows are raw measurements and the readings from my indoor-unit are on the right.
The bottom part is a protocol I was trying to apply.

Eric.

data.html (116 KB) data.html

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW almost 6 years ago

Hi Eric,

And there is of course the obvious other issue with receiving weather stations: Are you sure you receive your own weather station and not another one? I receive four of them, from my neighborhood!
You could try to block your wind speed sensor and see whether either your indoor station or the jeenode setup shows zero windspeeds. Or pull batteries.

Your base station may have an intermittent (bad) reception of the signal. It masks it by happily displaying values for a while. Worst case your base station is tuned to a neighbors sensor unit.

You are using the FSK-receive function with the github code. The resistor mods do not apply to the FSK receive function!

I also implemented a OOK version (see start post of this thread). This may get you signals from other stations. In this case you should connect RFM12B DATA to a I-port of the Jeenode (any I will do). This can be directly, without resistor. I did not apply a C-mod to my RFM12B, and I am able to receive two OOK stations.

Regards,
Frank

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by martynj almost 6 years ago

@SevenW,  you wrote 
> This can be directly, without resistor. …. and I am able to receive two OOK stations.

Missing out the resistor certainly works - its function is solely as protection for the RFM12B module in case that input pin gets programmed as an output by mistake.   If the driving code is still in debug mode, it is a worthwhile precaution to take.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW almost 6 years ago

Checking your raw data it appears to me that you are receiving a WS3000 (10 bytes of data), while the DKW2012 is supposed to have 11 bytes of data. It confirms my guess that you receive another station. Try the OOK version.

Regards,
SevenW

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

@SevenW:

  • I’m pretty confident the data is received from MY setup, when the batteries are removed from the outdoor part the indoor unit isn’t updating the display and reception on the jeenode halts.
  • All three subjects (jeenode, indoor-unit, outdoor-unit) are pretty close to each other on my workbench, I don’t think any neighbor device is interfering.

About the DKW2012 being a FSK or OOK unit I’m pretty clueless, but using the other sketch and adding the resistor I’ll try this evening.
Does the data, from the spreadsheet look funny to you or might this be valid data? Considering the valid reception of dcf77 I’m assuming the received data is valid.

Eric

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

I’ll modify things and will give the OOK version a go tonight. Thanks for the pointers, I’ll report any progress again.

And thanks for the code :-)

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

I’ve added the resistor and changed the code to the contents of WeatherStationOOK.zip [above].

After altering rf12_data_int() in RF12helper.h I see pulses logged over the serial interface, but nothing is logged in pollOOK().
When using the FSK version, DCF packets got decoded ok and the crc did match the contents of the packets. Now it looks like nothing is valid.

Pulse trains look like these: http://pastebin.com/XkgzUfPg

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

Sorry to waste everyone’s time, I DO receive some neighbors data. * blush *

Still don’t know why my dkw2012’s data isn’t decoded/received with either FSK or OOK…
So, if there is anyone with a success story with a Alecto DKW2012, please let me know.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW almost 6 years ago

@Eric:
Did you check the logging you posted in pastebin? One of the active decoders has found a signal, somewhere halfway the log:

1970-01-01 00:07:05 f=868360, G=4, BW=1 ALEV2a__ A3828F2B000000060AD9
20-1970-06-01 00:07:05 ID: 38, T= 25.5`C, relH= 43%, Wvel= 0.0m/s, Wmax= 0.0m/s, Wdir=SW , Rain= 1.8mm

This is a WS4000/DKW2012 signal, including the wind direction. The leading 0xFF byte is not logged, I use it as detection byte. It is the 11-byte message.

I have also made a sketch that receives intermittently the FSK and the OOK signals with one RFM12B on 868MHz. I can clean that code and post it on github if there is some interest in it.

SevenW

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens almost 6 years ago

@SevenW,

No! When I noticed a couple of hundred lines with pulse-widths I just ctrl-a’ed and pasted the entire buffer.
Those readings match exactly what I was expecting.

And yes, a version switching between FSK and OOK would be great. That would allow me to receive both my DKW2012 and the neighbors unit.

Thanks for your patience :-)

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens over 5 years ago

Just to close this issue, I’m using the OOK version from the zip file from SevenWatt with an Alecto DKW2012.
Until yesterday, while playing with an Alecto WS3600 I never received anything from the DKW2012. Yet, with an extended serial cable between my JeeNode and the RaspberryPi, all of a sudden data was received.

With a short (<10 cm) cable between the RPI and the Jeenode, reception was not possible. Changing the short connection with a longer (>50 cm) shielded cable (leftover USB cable), I’m still able to receive data without any problems.

So, the above code is working great with an Alecto DKW2012 and distortion by other hardware/power supply does interfere a lot.

Eric.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW over 5 years ago

@Eric: Out of curiosity: What antenna are you using? A 86mm wire directly on the jeenode/RFM12B? I can imagine that a more remote antenna also would have doen the trick.
Interesting result anyways. My serial cable is about 15cm, and working great. On another setup, with a STM32 controller, it is a lot more noisier.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by limpens over 5 years ago

Antenna is the standard small piece, I guess it is about 86mm long. Perhaps the usb WiFi dongle is generating lots of noise.
It would be nice to have both the RPI and the Jeenode in a single box, but this works :-)

Eric.

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SabineT 12 months ago

SevenW wrote:

I have implemented OOK decoders for the Fine Offset WH1080-series and OEM versions: Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081, ….

Will this work with a RFM69CW as well?

Sabine

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SevenW 12 months ago

Yes, sure. Using old school jeelib:
https://github.com/SevenW/embapps/tree/master/ArduinoRFM69

Same repository also contains some implementations for LPC8xx, STM32 and raspberry pi.

SevenW

RE: OOK 868MHz weather stations on JeeNode (Alecto WS4000, WS3000, DKW2012, Fine Offset WH1080, WH1081) - Added by SabineT 12 months ago

Thanks! I will look on it. My final goal is to receive my WH1080 station and send the data to a MQTT broker.

Regards, Sabine

    (1-21/21)