![]() |
Class: Weather - Printable Version +- Charmed Quark Systems, Ltd. - Support Forums and Community (https://www.charmedquark.com/vb_forums) +-- Forum: General Discussion (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=3) +--- Forum: Device Classification (https://www.charmedquark.com/vb_forums/forumdisplay.php?fid=14) +--- Thread: Class: Weather (/showthread.php?tid=8815) |
Class: Weather - Dean Roddey - 04-10-2014 General Description This thread is for discussion of the Weather device class. This class defines a basic set of fields that any weather source should be able to provide, not a local weather station but an online weather source.  It includes current condition information, plus forecast information for at least a small number of days (which a local station wouldn't provide.) Any given source might conceivably support many more data values, but this device class must stick to what is likely to be widely supported, so that it can be used generically. Fields Provided The fields provided by this device class have pre-determined names, and these MUST be implemented as indicated here. They are all prefixed by the device class prefix in the form: WEATH#fieldname where WEATH# indicates it is a field of this device class, and fieldname meets the general requirements of CQC field names. There will never be multi-unit considerations for this type of device class. Most such sources will either allow the user to indicate standard vs. metric units for any units that have those options, or will inherently support one or the other based on non-CQC configuration options. It is assumed below that all such values are displayed in the user's selected units. The WEATH# prefix is left off of the field names below for brevity. For the forecast day fields, they will be replicated at least three times (for three days of forecast information), though there may be more available.
This device class does not expect there to ever be multiple weather sources within one controllable device, server, etc... at least not any that are considered to be of a piece. Weather Condition Codes Some user interface widgets assume that the icon fields of drivers that implement this class will have specific values, so that they can display predefined representations of the weather conditions. Some weather sources may have more and some may have less that this device class supports, but all must be mapped to this set of condition codes:
Class: Weather - Dean Roddey - 04-10-2014 (Reserved 1) Class: Weather - Dean Roddey - 04-10-2014 (Reserved 2) Class: Weather - Dean Roddey - 04-10-2014 A first whack at a Weather device class, which is essentially a subset of the Weather Underground driver, which is stuff that would have worked with the older Weather Channel driver as well, so hopefully it's generic enough that it'll work with other sources in the future. I updated the WU and weather device simulator to support this, as well as the original V1 version of the WU driver as well. The only difference is the field prefix on those fields that fall within the device class. The fields and their attributes and meanings are all still the same. This will let me move forward on weather in the new auto-gen stuff. Class: Weather - dgage - 04-30-2014 Awesome Dean. This was a big one for me as my wife is constantly paying attention to the weather, primarily for kids going to school. I also have my RadioRa2 temperature controls coming in this week. I received my Irrigation Caddy last week. So I think I'm about ready to make my first interface in CQC about a year and a half after purchasing. ![]() Class: Weather - Dean Roddey - 04-30-2014 I added current and forecast precipitation fields to the device class, since they are so important for things like irrigation control. If the source doesn't provide them, the driver sets them to zero, but it allows them to be there where available. I also, for the V2 version, corrected the old spelling mistake, i.e. PrecipProb instead of PercipProb. The V1 version was left alone for backwards compatibility. If anyone has been using the V2 driver, and the precip fields, this will be breaking change, but this is a beta thing so sometimes this happens. It needs to be updated now before it goes out officially. Just update to use the new (correctly spelled and class prefixed) version of the field. RE: Class: Weather - Dean Roddey - 10-11-2018 I updated this class to support a 'FCDayCount' field. Different sources provide different numbers of days of forecast data. A minimum of three is required, but there can be more. Tools like the auto-gen system need to know how many to generate support for. Since this is an addition, it should be totally backwards compatible; but, AFAIK, I'm the only one who has ever done a V2 compliant weather driver, and I will update those drivers to match. |