Author Topic: Got my VP2 working with Moteino!  (Read 517 times)

0 Members and 1 Guest are viewing this topic.

Offline drsprite

  • Senior Member
  • **
  • Posts: 75
Got my VP2 working with Moteino!
« on: July 29, 2018, 09:56:43 PM »
I upgraded from my older Ambient station to a Davis VP2 in March and have been tinkering ever since to get it working with Moteino and a BME280 (for temp/humidity/pressure). For the last 2 months it's been pretty reliable. Finally figure I should share the setup.

With help from mccrossley's GitHub repo (which is a fork of kobuki's), I was able to modify the code to fit my needs. The Moteino is capturing real time data from the ISS every 2.5 seconds, and outputs to serial. The Pi is running a Python script I wrote that listens on serial, sanitizes some data, then uploads it to weewx, MQTT and HomeAssistant instantly. Works great!

The modifications I made to the Moteino code was to add a "data packet" which has the packet number, lost packet stats, etc.. The Python script uses that to help keep an eye on things (e.g. alert me if too many lost packets).

I like how I didn't have to modify the console to get this data. There are some ups and downs with doing it this way. The biggest upside was that this cost me roughly $30 (not including the Pi, and a few months of my spare time tweaking code). Downside, I wish I was able to connect to the console to keep it's clock in sync. but for $30, I'll take a drifting clock on the console.

weewx is running a forked version of their meteobridge driver. The only modification I made here is for the driver to listen on a socket server instead of serial since the Moteino is not directly plugged into my weewx server. I needed a middle man to pass data back and forth, and ncat has been working great for me for years with my Ambient station.

So the Moteino is sending data to weewx in realtime, then weewx publishes to MQTT, which is then auto-updating my weather website automatically every 2.5 seconds (without refreshing it). If you're curious, you can view that here. https://belchertownweather.com - Great stuff!

Next step is to work on moving off the breadboard and into a case of some sort and documenting some of the setup.

Anyways, just thought I'd share!

 [ You are not allowed to view attachments ]
« Last Edit: July 30, 2018, 11:40:55 AM by drsprite »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 353
    • Wilmslow Astro
Re: Got my VP2 working with Moteino!
« Reply #1 on: July 30, 2018, 11:26:57 AM »
Yay! My Motenio has been running since January 2017, it's emulating an ISS as I still use the console for data access.
Mark

Offline drsprite

  • Senior Member
  • **
  • Posts: 75
Re: Got my VP2 working with Moteino!
« Reply #2 on: July 30, 2018, 11:37:48 AM »
Yay! My Motenio has been running since January 2017, it's emulating an ISS as I still use the console for data access.

Your GitHub helped save me countless hours (and it seemed to work a little better than kobuki's... I'm seeing less dropped packets - not sure what the difference is), thank you for that!

Edit: Oops, read that backwards. Your Moteino s sending, not receiving?

For receiving: I was hoping to use a NodeMCU, but had a lot of interference, so I chose the Pi. I'm curious how other's have theirs setup (on a window sill like me?  :lol: )
« Last Edit: July 30, 2018, 11:51:57 AM by drsprite »

Offline mcrossley

  • Forecaster
  • *****
  • Posts: 353
    • Wilmslow Astro
Re: Got my VP2 working with Moteino!
« Reply #3 on: July 31, 2018, 05:15:18 AM »
My Moteino is doing both, it is receiving from two "ISS" units* and combing the data to emulate a single ISS that the console can understand.

* 1x real ISS transmitter with Temp + Hum + Rain, and 1x "Wind" transmitter with wind + Solar + UV
I wanted to get my solar sensors up on the roof with the wind sensors, and leave the temp/hum/rain low down.
Mark

Offline drsprite

  • Senior Member
  • **
  • Posts: 75
Re: Got my VP2 working with Moteino!
« Reply #4 on: August 08, 2018, 08:51:05 AM »
I purchased the Moteino M0 because I can attach the BME280 directly to the board. Looked at is as a way to compact my ISS receiver. It arrived the other day and the sketch wouldn't compile for it. I didn't realize the M0 is a different type of architecture using SAMD, and was hoping I could just "upgrade" my hardware. No such luck :)

After messing around, I found that the timer library used in DavisRFM69.cpp is the problem. I can get the sketch to compile now that the timers are gone, but haven't had much luck in receiving anything from the ISS. Do you know of a way to do timers on M0?

Hopefully there's a one-for-one timer library swap? I'm pretty new to it, so wanted to see if you had any guidance.

Offline ct

  • Contributor
  • ***
  • Posts: 101
Re: Got my VP2 working with Moteino!
« Reply #5 on: August 18, 2018, 06:00:59 AM »
This library https://github.com/michael71/Timer5 can be used on the SAMD.  I've used it successfully on the Adafruit M0.

Offline azchrisf

  • Cobra Weather Dominator Operator
  • Senior Contributor
  • ****
  • Posts: 239
    • Copperwood WX
Re: Got my VP2 working with Moteino!
« Reply #6 on: August 25, 2018, 09:03:17 AM »
Something I've kinda asked before - Please share the scripts if your are going to be posting "look what I did"-type threads if you can. Others could benefit from it that don't have the same level of programming skill, or get ideas from it.

 

anything