WXforum.net

Weather Related Organizations => CWOP Forum => Topic started by: k9mjm on February 18, 2020, 10:22:51 AM

Title: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: k9mjm on February 18, 2020, 10:22:51 AM
I was dismayed to find out that my new Ambient WS-2902A didn't have the capability of sending data directly to APRS. There were other posts describing methods for getting that data out of Ambient's REST API and into APRS, but all of them involved doing something like custom router firmware or running a script on a computer (single point of failure)...

I thought this was an excellent use for AWS Lambda. This lets you run your code in a high-availability environment, for free. You don't even have to pay for the electricity this runs on. Jeff Bezos has it covered. Steps to do it:


The AWS Lambda free usage tier includes 1M free requests per month and 400,000 GB-seconds of compute time per month. You will run 44,640 requests in a 31-day month (44,641 if they ever add a leap second in a 31-day month).

If you want the data copied to CWOP, my understanding is that you have to register your callsign with CWOP (I'll get on this today).

My next project: Decode the 915 MHz signal from the sensor array and push it to a local iGate on RF APRS on a solar-powered Arduino with an SDR receiver and a UV-5R transmitter.

Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: galfert on February 18, 2020, 10:55:59 AM
Very nice!

Users should note that if they don't have a ham call sign and are using a regular CWOP ID that they should change the upload server to cwop.aprs.net instead of rotate.aprs2.net (and then APRS passcode is -1)
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: k9mjm on February 18, 2020, 05:40:47 PM
I should mention that the Lambda environment does not seem to do any DNS caching... each sequential packet is routing through a random server through the load-balancing provided by rotate.aprs2.net. Both APRS and AWS provide you with some level of high availability. I don't know how HA the AmbientWeather.net API is, but they do allow you to pull more than one observation.

I could make this account for downtime on APRS and on AmbientWeather.net by tracking the last successful push to APRS and then pushing all available observations since that timestamp from AmbientWeather.net, since they let you pull the last 200+ observations. I'll worry about that when I see downtime in excess of 10 minutes.
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: k9mjm on February 24, 2020, 01:54:43 PM
Anyone using the above code, please note that I modified it this weekend to round windspeeds to the nearest integer mph. APRS does not accept fractional windspeeds.
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: N8RJC on May 06, 2020, 10:09:29 AM
Thank you for putting this together!  I just set mine up in AWS this morning and it worked beautifully.

One thing I noticed, is that it expects Latitude and Longitude as DMS formatted as DDMM.SS, whereas I assumed it was all decimal.  Going to have some bad position history on aprs.fi for a couple days  #-o
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: galfert on May 06, 2020, 11:05:34 AM
It is actually DDMM.mm

This online converter should help
https://www.directionsmag.com/site/latlong-converter/


Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: sz0wxc on December 08, 2020, 08:20:13 AM
Thanks for providing this code it worked great to get my WS-2902 to report to APRS and I don't even have to use a computer at home.

Any luck on decoding the signal from the 2902 to send direct from a radio?
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: galfert on December 08, 2020, 08:47:10 AM
Any luck on decoding the signal from the 2902 to send direct from a radio?

Sure, it's been done. Look up SDR rtl_433 and then you can feed WeeWX software. From there you can either send via APRS on the Internet or hook up a TNC with radio.
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: davidmc36 on December 08, 2020, 10:07:45 AM
Another awesome sounding project.

I have been meaning to get an Amateur license for a while now for some Drone Video use.

And I have a couple UV-5R's lol

At the price point I have been considering getting an Ambient station just for the display.  [tup]
Title: Re: Hook up your Ambient WS-2902A to APRS using serverless computing, free
Post by: santoro on August 20, 2021, 10:54:07 PM
I registered just to say thanks for this original post.  After futzing with my GPS coordinates a bit it works great.   I love the simplicity and creative thought.

Cheers OP!