yup - that's me.  Sorry I can't help you much on this one, but there are a 
lot of folks in the WF forums who wrote other websockets listeners so 
perhaps that might be the best place.  I think there are a variety of 
forked weewx drivers as well but I haven't looked into them in any detail 
since the original driver was rock solid for me (until I sold+gifted my WF 
gear :-)

I'm assuming you want the websockets stuff so you can grab the few elements 
of calculated data only present via their servers ?

I'm not certain your last statement re: the UDP driver is accurate.  My 
recollection is that it's just a listener that stays open, although I think 
it has some stuff in it to reopen a new connection if there's a timeout or 
something.   Code is at github (link) 
<https://github.com/captain-coredump/weatherflow-udp/blob/master/bin/user/weatherflowudp.py>
 if 
anybody else is interested in taking a look.


On Friday, May 6, 2022 at 10:33:42 AM UTC-7 [email protected] wrote:

> Thanks Vince, are you the same Vince from the WF forum?
>
> I'll drop a note there as well.  I think I know who you're talking about 
> and I cloned their repo to review it.  That said, i wasn't able to get it 
> to run so I'm not sure if they completed it.
>
> I think my biggest problem is I'm using the ws.run_forever method and 
> that's "capturing" the execution and not letting go of it.  I want to find 
> out if there's a way, maybe using yield, to open the socket once, keep it 
> going and let the main Weewx thread just get the iterable/data back.
>
> The weatherflow UDP driver re-opens the connection every five minutes or 
> so and I'd like to avoid that.
>
> More to come.
>
> Billy
>
> On Thursday, May 5, 2022 at 7:36:52 PM UTC-7 [email protected] wrote:
>
>> I think somebody else was working a while back on a combination driver 
>> that could get WS and/or UDP data.  You might want to ask around over at 
>> the WF Forums to see how far they got.
>>
>> On Tuesday, May 3, 2022 at 9:49:38 PM UTC-7 [email protected] wrote:
>>
>>> Hi,
>>>
>>> I'm trying to write a driver for my Tempest WS.  I currently have the 
>>> UDP driver from captain-coredump up and running (thank you!) on a pi but 
>>> I'd like to pump data straight from the websockets API into weewx also.  I 
>>> may expand it to capture archive packets from the rest API also.
>>>
>>> The prototype is here... https://github.com/livysdad27/tempestAPI
>>>
>>> I borrowed a LOT from captain-coredump's driver.  Where I'm struggling 
>>> is with the getLoopPackets generator.  I've attempted to use the on_message 
>>> handler for this but have read in another thread that it doesn't work well 
>>> due to running in a separate thread.  My websockets code is a bit simple 
>>> and I'm not completely sure how drivers get called for sure. 
>>>
>>> Is it even realistic to try and run a websocket-client app 
>>> implementation with "run_forever" and expect it to work correctly with 
>>> weewx?  My suspicion is weewx is starting, entering the websocket app and 
>>> sitting there forever because I don't get report or other messages after it 
>>> kicks off.
>>>
>>> Super grateful for any help/pointers!
>>>
>>> Billy
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/weewx-development/407aa490-4505-4372-b908-baaa627ccb9cn%40googlegroups.com.

Reply via email to