On Sunday, August 6, 2017 at 1:35:40 PM UTC-4, Arthur Emerson wrote:

> WeatherFlow is finally about to ship their crowd-funded PWS. Their basic 
architecture is a
> wireless network hub device, with Bluetooth BLE links to one or more 
"Air" and "Sky" outdoor
> devices that each contain groups of sensors. They have already published 
all kinds of cloud
> API's (yawn), and are promising to publish their BLE API in the near 
future.
>
> TL;DR - They are also doing something that is interesting for easily 
capturing station data,
> namely broadcasting UDP packets (apparently as they arrive at their 
wireless network hub)
> onto the local network segment for any device to see. No fake DNS and web 
servers, no
> pass-through network ports, just listen for the UDP packets and decode 
the JSON goodness!
> I have simplified rtl_433 down to this:

> #!/usr/bin/python
>
> from socket import *
> s=socket(AF_INET, SOCK_DGRAM)
> s.bind(('255.255.255.255',50222))
> while True:
> m=s.recvfrom(1024)
> print m[0]

> This is what an output packet from an "Air" device should look like:

> 
{"serial_number":"AR-00009876","type":"obs_air","obs":[[1502287861,1009.30,21.90,85,0,0,3.46,1]],"firmware_revision":12}
>
> (All of their other status packets are pure JSON, but for some reason 
they chose to send out
> observations as a list in the "obs" field. The format is completely 
documented in their API docs.)
>
> Long story short, this shares so much in common with the SDR broadcast 
decoder that I'm
> wondering if this SDR station code should be renamed to a medium-agnostic 
broadcast
> decoder, and encourage development of external programs other than 
rtl_433 as input?
>
> I'm not overly familiar with all of the available weewx station input 
types, but seeing the
> simplicity of grabbing broadcast packets off of the wire I think that I 
may actually start to
> send similar packets from my growing collection of DIY IoT sensors and 
use this same
> basic format. Hence, thinking that the sensor-mapping feature in the SDR 
station code
> is way more flexible than my half-finished station driver with everything 
hard-coded. If
> there's a more appropriate way of doing this, I'm all ears..... 

Reply via email to