Author Topic: WMR-89 hacking -> station now supported by Meteobridge  (Read 11948 times)

0 Members and 1 Guest are viewing this topic.

Offline docbee

  • Forecaster
  • *****
  • Posts: 669
    • smartbedded
Re: WMR-89 hacking
« Reply #25 on: January 10, 2018, 10:21:10 AM »
When you send me your mail address via pm, I give you a free license code.
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline marunio

  • Member
  • *
  • Posts: 7
Re: WMR-89 hacking
« Reply #26 on: January 10, 2018, 10:50:39 AM »
When you send me your mail address via pm, I give you a free license code.
Thank you!
I will.
Any chance of implementing this on Raspberry Pi? I like my wi-fi...

Sent from my LG-H812 using Tapatalk


Offline docbee

  • Forecaster
  • *****
  • Posts: 669
    • smartbedded
Re: WMR-89 hacking
« Reply #27 on: January 10, 2018, 12:01:50 PM »
Currently not planned. Meteobridge does run on WiFi enabled cheap devices. Even cheaper than a RPI.
founder of smartbedded.com - home of meteohub, meteoplug, meteobridge, meteostick

Offline Dams38

  • Member
  • *
  • Posts: 1
Re: WMR-89 hacking
« Reply #28 on: January 22, 2018, 03:40:43 PM »
For Linux I will have to modify the CP210x kernel driver to map one of the non-used standard speeds (like 50 baud) to the 128.000. I will give it a try the next days.

Hello, I'm owner of a WMR89 too, trying to extract data on linux.
I'm trying for several days to have the baudrate 128000 set, but not find the proper hint to recompile the cp210x module.I downloaded the latest driver on slicon labs and get proper .ko file. But Linux prevent me to set 128000.

Any tips to have this worked would be highly appreciated.

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #29 on: January 24, 2018, 12:42:19 PM »
thanks to all the contributors, I have this working in testing :)

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking
« Reply #30 on: January 29, 2018, 03:23:45 PM »
Did anyone implement weeWX support?

I keep prodding for data every 0.5s providing the receiving buffer is empty.
The device has its own timing for submitting data.
Pressure for example comes out every 15min, while others might be a few times within a minute.

I'm interested in your python csv export script, would you share the script?

Offline marunio

  • Member
  • *
  • Posts: 7
Re: WMR-89 hacking
« Reply #31 on: January 30, 2018, 07:40:38 PM »
I'm interested in your python csv export script, would you share the script?
I've PM'd you.

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #32 on: February 03, 2018, 08:49:47 AM »
Thanks,

I managed to get it working :-)

Offline marunio

  • Member
  • *
  • Posts: 7
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #33 on: February 03, 2018, 11:45:04 AM »
Awesome!

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #34 on: February 03, 2018, 04:37:28 PM »
I also have a (half)working weewx driver for the WMR-89, but I'm still missing the rain values

Code: [Select]
                        f2f2b11100000000000000260e01010d18011d
                        f2f2b111fffe001a001a00400e01010d180368  17:01
                        f2f2b111fffe0000001a00400e01010d18034e  18:01
                        f2f2b11100000000001a00400e01010d180151  18:45
                        f2f2b11100000000001a00400e01010d180151

I can guess the bytes but i didn't manage to translate them in the correct values, I only tried to guess with metric values, maybe its inches...
« Last Edit: February 03, 2018, 04:48:31 PM by fcauwe »

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #35 on: February 04, 2018, 03:12:35 AM »
its like the other data, but divide by 100 instead of 10
to get mm
i.e like
  temper:= (inbuffer[7]+((inbuffer[6])*256))/100;
for data type 177

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #36 on: February 04, 2018, 03:31:34 AM »
Thanks,
It's indeed inches and not mm, now i have it also working.

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #37 on: February 04, 2018, 12:22:49 PM »
all the data is metric though
or does it depend on how the units are set on the console?
for me its metric data no matter if I have F or C on the console..just tested that
« Last Edit: February 04, 2018, 12:25:07 PM by waiukuweather »

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #38 on: February 04, 2018, 03:10:52 PM »
I get the message accum 37,8 and past24h 4,3 mm on the screen of the console, and next package on the serial line is;
Code: [Select]
0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16
b1 11 ff fe 00 11 00 11 00 95 0e 01 01 0d 18 03 ab

If I get it right the past24 is stored in byte 6/7, in this case 0x11, or 17 decimal.
If I multiply it with 2,54, i get the right value 4,3 mm, or am I missing something.

I posted my code on github, thanks marunio, it saved a lot of time.
https://github.com/fcauwe/weewx/blob/master/bin/weewx/drivers/wmr89.py

« Last Edit: February 04, 2018, 03:15:09 PM by fcauwe »

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #39 on: February 04, 2018, 03:33:46 PM »
you multiply data position by 256
i.e its BCD
see my post above
its just a fluke you happen to be at rain value that works by a factor that is inches conversion at the moment

Offline fcauwe

  • Member
  • *
  • Posts: 6
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #40 on: February 04, 2018, 05:42:25 PM »
I did some more testing, with byte 4/5:
Code: [Select]
0  1  2  3  4  5  6  7  8  9  10 11 12 13 14 15 16
b1 11 ff fe 00 11 00 11 00 95 0e 01 01 0d 18 03 ab / console reading: 4,3 mm  - test 1
b1 11 ff fe 00 ca 00 db 00 5f 0e 01 01 0d 18 04 f8 / console reading: 116,3 mm - test 2
b1 11 ff fe 00 2a 00 3b 00 be 0e 01 01 0d 18 04 17 / console reading: 270,8 mm - test 3

 ](*,) You could be right, I also tried to simulate al lot of rain in test 2 & 3, to "overflow" the bytes, but the bytes don't overflow.
I don't see how bigger values are transferred, so I assume they are cut off.
For test 2: I get 0xCA, I guess is internally 0x01CA.
If I calculate it as 0x0CA00, I get 117,2 mm
If I calculate as 0x01CA * 0,254, I get 116,3 mm   <-- value on console

For test 3: I get 0x2A , I guess is internally 0x042A.
If I calculate it as 0x042A00, I get 272,8 mm
If I calculate as 0x042A * 0,254, I get 270,764 mm  <-- value on console
 
So I still assume the rain values are in inches :shock:, but it does not matter that much because it's only 1% error 
« Last Edit: February 04, 2018, 05:44:34 PM by fcauwe »

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #41 on: February 04, 2018, 08:37:19 PM »
why would it be in inches when all other data is metric and the other OS station types (eg wmr100/200) are mm for rain
note that you also need to divide by 100
here is my code again
 temper:= (inbuffer[7]+((inbuffer[6])*256))/100;

Offline waiukuweather

  • Forecaster
  • *****
  • Posts: 624
Re: WMR-89 hacking -> station now supported by Meteobridge
« Reply #42 on: March 04, 2018, 01:31:49 PM »
by bad, you were right, it is sending inches of rain
(which is weird, as all other data is metric)

 

anything