jim-easterbrook / pywws

Python software for USB Wireless WeatherStations
https://pywws.readthedocs.io/
GNU General Public License v2.0
204 stars 62 forks source link

Live wind data to Weathercloud service #82

Closed craigusus closed 4 years ago

craigusus commented 5 years ago

Hi, Would it be possible that 'Live' wind data could be sent to Weathercloud? From what I can see in weathercloud.py only 'wspdavg', 'wspdhi', and 'wdiravg' data is sent. Could 'wspd' and 'wdir' be added to weathercloud.py?

ie PiWeatherUK only shows Average wind speed, direction and the gust. The live info is ghosted out as it is not being received.

Thanks,

jim-easterbrook commented 5 years ago

The values sent are from the 'live' data. I only have a copy of v0.6 of their API, which is extremely brief and doesn't define the difference between wspd and wspdavg.

atrophicshiner commented 5 years ago

My understanding of their API was the wind averages for weathercloud were meant to be over 10 minute intervals, the pywws module should really be sending the data as the current/live values. This would then mean the average graphs would be ghosted.

jim-easterbrook commented 5 years ago

OK, that seems reasonable. I'll change it.

craigusus commented 5 years ago

Thanks for the replies... This was the response from Weathercloud:

Hi Craig, Thank you for using Weathercloud. The wspdavg and wdiravg are the 10-min average wind speed and direction values. Jim can calculate these 2 parameters or send the wspd and wdir values also as wspdavg and wdiravg. He will find all the information in the API Documentation that we sent him. Regards,

The Weathercloud team

So would Weathercloud calculate the 10 average from the uploaded 'live' data or would pywws have to do this before uploading?

jim-easterbrook commented 5 years ago

Data is only uploaded to Weathercloud every 10 minutes (limit set in their API). If using logged data pywws would only have two values (for most users) with which to calculate an average. It's not really practical to provide 10-minute averages of any data.

craigusus commented 5 years ago

@jim-easterbrook Thanks for the replies and the explanations.

ashenshugarRET commented 5 years ago

Dear Craig and Jim,

Review the message thread and the response from Weathercloud, would it be possible to send the wind speed and direction data as both the averaged (wspdavg and wdiravg) and live (wspd and wdir) instead of replacing the former with the latter, I'm not sure how this change in data uploading would affect graphing and trending etc.

Thanks

Richard

jim-easterbrook commented 5 years ago

The data from pywws isn't really an average though. The station is believed to do some sort of averaging over the previous 48 seconds, but no one's experiments were conclusive about what it does. There's no way pywws can produce a legitimate 10-minute average.