LoraWAN weather station

I’ve just received a nice new ‘headless’ weather station from China, and I am engaged in connecting to its RS485 feed and understanding the protocol. They supplied a RS485-UART USB stick with it, and after playing around with some containerised NodeRED flows which couldn’t read the USB finally just used PySerial and have started dumping the data. Although it is advertised with the tag line “we will supply the communications protocol” this wasn’t forthcoming so I just dumped the bits down on the screen and have started reading them. Apparently they are a Fine Offset type of station and equivalent to the WH2950 type, without the monitor or network link. It’s all down to me!

WeatherStation

The bytes look like this:

24 B3 7A 62 61 46 00 00 00 00 00 01 00 00 00 48 A3 $.zbaF………H.
24 B3 7A 62 61 46 00 00 00 00 00 00 00 00 00 D3 2D $.zbaF……….-
24 B3 7A 62 61 46 00 00 00 00 00 02 00 00 00 D4 30 $.zbaF……….0
24 B3 7A 62 61 46 00 00 00 00 00 00 00 00 00 D3 2D $.zbaF……….-

… which is fun. I quickly worked out that the standard size was 17 bytes, now I have run it through a hex dumper and started eye-balling the bytes. I may need to spin the anemometer to generate events to get readings, but this looks good.

I’ve also now connected it via a LoRaWAN link and have the data flowing back to me via MQTT. I need to compress the data as well as recording and averaging the readings, since the standard interval time of 16 seconds would exceed the fair-use policy of The Things Network. Meteorological masts (or ‘metmasts’) conform to an IEC standard, but mine can be much less rigorous than that: I’ve decided to take ten measurements and transmit the min/avg/max of them every 160 seconds. Given enough compression I think I can get the seven measurements (wind speed and direction, temperature, humidity, UV, lux, rainfall) into less than 10 bytes.

The git repo is up on BitBucket.

4 thoughts on “LoraWAN weather station

  1. Dear Doug Hall

    I have a similar – if not the same – MiSol weatherstation as you describe. However, I did not receive the hardware description but using your info helped me a lot. There are still some questions left, particularly regarding rain, wind and UV. The others I understand, I think. Could you provide me with a copy of the description (guess it is pdf)?
    Thanks in advance,
    Ger

  2. Hello Doug, first I would like to thank you sooooo much for all your work on this developement, you saved me weeks worth of work… I owe you a large beverage for sure!!

    I have the weather station installed, connected to an Advantech UNO-220 \ Raspberry Pi combination and that seems to be a nice fit. I have the data pulling due to your scripts and now have the data published into my MQTT server and am working on the Grafana dashboard next. Good fun!

    Question..
    Rainfall – Did you ever locate a way to “reset” the accumulation? I have been pondering installing a small circuit (and run the extra cable) that would cut the power supply and in effect “reboot” the unit. Its an ugly hack, but my current idea.

    Its all I can think off just now, just wnated ot say thank you again for your efforts!

    Best regards,
    Jeff
    Sandnes, Norway

    1. Thanks Jeff! You are most welcome. Very good fun – but no, I never found a way to reset the accumulation. I did find that the manufacturer responded well and sent on the specs of the fields, so perhaps that’s one avenue to inquire?

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s