autolog wrote:Hi Dave,
Fantastic effort creating this so quickly.
Hey, thanks. The guts of the WUnderground plugin worked here, so it wasn't too tough of a lift. It also gave me a chance to rework some legacy things that had been bothering me.
Display Units in Edit Device Settings. What are the available choices for say rainfall? I would like to have it in millimetres.
The Display Units settings in all devices are strings that are appended to the UI value of select states. So temperature of 12.3 could become '12.3 ÂșC' or whatnot. This setting doesn't affect the underlying state value.
What is Index?
That needs better help bubbles. Index will adjust things like Ozone and UV, It's the same string appending setting as above. This actually may be an unneeded setting for Indexes.
How does the plugin know to display the temperature in degrees C as opposed to F. It is doing it in C which is OK for me, but I just wondered.
This highlights a notable difference between the Weather Underground API and the Dark Sky API. Weather Underground sent both Imperial and Metric measures in each response. Dark Sky, on the other hand, sends only one at a time. So there were a couple ways to go on this:
- Offer one setting for all devices (this is what I chose). I reckoned that the number of users that would want both simultaneously might be small.
- Offer per-device settings: this would require multiple API calls per refresh as well as a necessary way to track internally which call applies to which device.
- Offer one setting for all devices with an override (and doing all the conversions internally).
In direct answer to your question, there are several choices within the plugin configuration dialog: Automatic (based on lat/long), Canadian, Metric (SI), UK, and US. I suppose that users wanting something different than the built-in methods could use a Device Extensions workaround... The various settings are explained in greater detail in the Dark Sky API docs.
I have (or did have) a PWS linked to Weather Underground. Is there anyway that the plugin could work with data retrieved from a PWS?
I think that would be a heavy lift given the potential differences between weather stations. The GhostXML plugin might be a good choice for this... Let's talk.
Thanks again for your efforts on this and can I complement you on the standard of documentation in your Wiki
Thanks for that. Like my code, it can always get better, so if you see anything that's not clear or could be expanded upon, please let me know.