Sending WS 2902 directly to RPi (Internet independency)

770 views
Skip to first unread message

Daniel West

unread,
Apr 30, 2018, 11:03:45 AM4/30/18
to weewx-user
Greetings all, I have to give the obligatory noob alert, so thank you in advance for patience and help.

Ill start with my end goal:
I would like my RPi to receive my WS 2902 sensor values as CSV, TXT, anything really. These values will be used to determine if/when GPIO's can be triggered. It is highly preferable to be able to bypass any actual uploading to the internet. I see that it may possible from the intake strategies section of the weeWX GitHub. 

On to my problem:
I installed weeWX following this installation guideI get all the way down to "Checking connectivity to your weather station" but then it fails with "Timed out too many times" continuously. I have attached a snippet of my user.log and my weewx.conf files. 

Guidance for end goal:
Once I see weeWX working I can focus on my desired intake strategy (unless its just as easy to do at the same time). What do I need to achieve my goal? Aside from what I have installed from the installation guide, I essentially have whatever comes with Debian stretch. Ive seen mentions of iptables but I'm not really sure what that involves. I am using an Arris TG1682G (aka XB3, from Comcast). But I also have a spare Linksys WRT54G with DD-WRT on it. The WRT would ultimately be the desired router to use.

I should mention, I have gotten the Ambient Weather API to work, I can receive my sensor values and save them into a txt file. If it is possible to cut out the internet connection that would be neat. 

Thank you again for the help!

Daniel
snipofUser.log
weewx.conf

Daniel West

unread,
Apr 30, 2018, 11:43:14 AM4/30/18
to weewx-user
Wow, sorry about the font changes... That's what I get for copying and pasting

Lorin Tremblay

unread,
Apr 30, 2018, 6:09:25 PM4/30/18
to weewx-user
I've been at this for a couple of days even maybe weeks with partial success.....
So far i'm using the weewx extension interceptor to capture the TCP traffic and feed the interceptor.

My biggest problem is to create a script on the router to intercept the data. I have tried some many ways with only partial success and have been posting all over to try and get some assistance since I'm like you sort of a NOOB...

If you don't mind sharing how you use your api key to capture to file the info, would be great, that I'll try more stuff to finally get this working...

Also from what I understand you will need to continuously upload your data to the ambient website and the pull it back from there again, but not sure about that, will be able to establish that once I see how you use the api key.

If we can share our ressource to get this working i'll be a happy man ;)

Daniel West

unread,
Apr 30, 2018, 6:25:47 PM4/30/18
to weewx-user

Creating a script on the router goes way over my head, wasnt aware that was really a thing. I cant capture the TCP traffic oddly enough. I thought I had everything set in my weewx.conf file set correctly but I suppose not. 

Ive attached my super simple script to capture the info through AW's API. Follow the Ambient Weather API link, under Authentication it tells you how to get the two keys I used in my script, you must have an account and your WS uploading to ambientweather.net. They asked me for the MAC address of my WS 2902. 

I would agree with your assumption. In stead of pulling information from the station itself I am actually pulling it from the website. Im wondering if I have to spoof that, again, waaaaay over my head. 

Thanks a bunch :D

p.s. Ive only known one other Tremblay so I have to ask. Are you related to a Joe Tremblay that served in the US Navy?
AWAPI.py

Douglas Krug

unread,
Aug 8, 2018, 3:15:13 PM8/8/18
to weewx-user
Did you figure out how to get weather data from ambientweather.net to weewx? I'm not a developer, so totally useless in that area.

I run a home automation system called Hubitat which runs local groovy code and can connect to cloud sources when required by the device. One of the users has created an app he calls Weather Switch that can turn on switches (virtual or real) based on weather data pulled from Weewx. I have it working but the issue is I lose connection with Ambientweather.net when I do that, and I really like their dashboard and features. If it were possible to get weather data from ambient to weewx, then it could be uploaded to any number of places, as well as be used by Weather Switch on Hubitat and other home automation systems via Weewx.

There is a node.js project out there that pulls from ambientweather.net and uploads to PWSWeather, but that's not useful to me. Perhaps someone that understood the code could figure out what's needed from that example though.

Daniel West

unread,
Aug 8, 2018, 3:26:25 PM8/8/18
to weewx...@googlegroups.com
Hey Douglas,

I never did have luck with that. Honestly, I gave up. I tried using my DD-WRT but never had luck. My understanding is that the weather station needs an internet connection to even begin pushing weather information out. Could never get beyond that.

I decided to just stick with the internet dependency. I am currently using the Ambient Weather API, which pulls my uploaded weather station data from their site and then stores it in a txt document. I'm currently on summer break and working an internship so I havent had time. Class is starting up again soon so all I need to do now is slice the txt document for the info im looking for.

Hadnt heard of Hubitat, I will definitely look into that!

--
You received this message because you are subscribed to a topic in the Google Groups "weewx-user" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/weewx-user/b1ibAW3kTKg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to weewx-user+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Douglas Krug

unread,
Aug 8, 2018, 5:25:40 PM8/8/18
to weewx-user
Thanks for quick reply Daniel. If you're just trying to get data into Weewx and don't care about being connected to Ambientweather.net, then this information helped me immensely.


I tried using Patrick's socket logger, but couldn't get anywhere with that. Where the help came in was the firewall script for DD-WRT. I ended up using Matthew Wall's interceptor driver for weewx, together with Patrick O'brien's instructions for the router, and after beating my head against the wall for many previous weeks (months actually) I was finally able to get it working.
Reply all
Reply to author
Forward
0 new messages