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 
<https://ambientweather.docs.apiary.io/#reference/ambient-realtime-api>, 
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?


On Monday, April 30, 2018 at 5:09:25 PM UTC-5, Lorin Tremblay wrote:
>
> 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 ;)
>
>
> On Monday, April 30, 2018 at 11:03:45 AM UTC-4, Daniel West wrote:
>>
>> 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 
>> <https://github.com/weewx/weewx/wiki/intake-strategies#configuration-6-driver-for-network-connected-data-source-using-local-api-sniffing-or-hijacking>
>>  section 
>> of the weeWX GitHub. 
>>
>> On to my problem:
>> I installed weeWX following this installation guide 
>> <http://landoflinux.com/linux_raspberry_pi_weather_station.html>. I 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 
>> <https://ambientweather.docs.apiary.io/#reference/ambient-realtime-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
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.
import requests
import textwrap

r = requests.get('https://api.ambientweather.net/v1/devices?' \
'applicationKey=my64charAppKey&' \
'apiKey=my64charAPIKey')
print 'request made'
    
r.text
data = textwrap.fill(r.text, 70)
print data

with open('wsdata.txt', 'w') as f:
    f.write(data)
print 'raw data saved'

Reply via email to