Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Class: ResourceMonitor
#1
General Description

This thread is for discussion of the Resource Monitor device class. This is a very generalized class that can be used by any devices that report usage of some resource, power, water, etc... It can be used in the usual way, by just choosing the resources you wish to monitor, by selecting the appropriate fields. But it also will report via backdoor commands in a more generalized way that can be used by smart tools such as the CQC auto-generation system, allowing resources to be selected by name from among those available from the driver.

Fields Provided

[INDENT]Fields for this class MUST be in one of these forms:

RESMON#sub~fieldname
RESMON#fieldname


As long as the 'fieldname' portion follows the standard CQC field name conventions, that is all that is required from a field naming point of view.

The two forms are intended to deal with two different likely scenarios. If the device just offers completely configurable values that represent individual resources, then you would likely use the second form. The fields might be something like:

Code:
RESMON#RefrigWatts
    RESMON#Sub1_TotalWatts

and so forth. Each resource monitored are just separate things that aren't necessarily related. The whole field name would be user/device defined.

On the other hand, if the device provides multiple channels where the same information is provided for each channel, then the first form SHOULD be used, and the user/device provided name would be the sub~ part, and the field name part would be the name of the specific measurements, such as:

Code:
RESMON#Kitchen~TotalWatts
    RESMON#Kitchen~WattSeconds
    RESMON#Garage~TotalWatts
    RESMON#Garage~WattSeconds

In this case, there are two channels, which have been named Kitchen and Garage, and the device provides the same values for each channel, so the field names are just repeats of the same values, for each named channel.

Fields MUST be numeric, so Card, Int, or Float, and of course in some cases may be negative values, if the consumption is negative. They MUST be read only. If a usage counter reset capability exists, it is outside of this device class.
[/Indent]

Backdoor Commands/Queries

[INDENT]This device class defines a standard backdoor query via the QueryTextVal driver interface. The Value Id is "QueryResInfo" and the Data Name is "ResourceList", both case sensitive. The driver will return a double quoted comma list, where the first list is of short descriptions of the resources being monitors, and the second are the corresponding field for those resources. The descriptions provided by the driver should be very short and to the point, and include a name and units in parenthesis, e.g. "Refrigerator (KwH)", or "Irrigation (CuGal)" and so forth. There is no attempt to standardize the units, they are just for human consumption in selection lists.

The two lists are separated by a new line, which is a form understood by user interface list browsers. You can directly load such a list into a list browser and it will put the first list into the visible list and will store the second list into the hidden values. This allows you to make a connection between the selected item and the field that contains that information. Of course both lists must be of equal size and the xth item in both lists must represent the same resource.
[/INDENT]

Event Triggers

[INDENT]None at this time[/INDENT]
Dean Roddey
Explorans limites defectum
Reply


Messages In This Thread
Class: ResourceMonitor - by Dean Roddey - 06-24-2014, 06:16 PM
Class: ResourceMonitor - by Dean Roddey - 06-24-2014, 06:17 PM
Class: ResourceMonitor - by Dean Roddey - 06-24-2014, 06:18 PM
Class: ResourceMonitor - by Ron Haley - 06-24-2014, 06:42 PM
Class: ResourceMonitor - by Ron Haley - 06-24-2014, 07:06 PM
Class: ResourceMonitor - by Dean Roddey - 06-25-2014, 06:34 AM
Class: ResourceMonitor - by znelbok - 06-25-2014, 06:35 PM
Class: ResourceMonitor - by Dean Roddey - 06-26-2014, 05:35 AM
Class: ResourceMonitor - by Dean Roddey - 06-30-2014, 02:49 PM
Class: ResourceMonitor - by Dean Roddey - 07-18-2014, 01:09 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Class: Security Dean Roddey 34 35,403 01-02-2019, 12:26 PM
Last Post: Dean Roddey
  Class: Weather Dean Roddey 6 6,676 10-11-2018, 11:09 AM
Last Post: Dean Roddey
  Class: Thermostat Dean Roddey 17 26,449 01-29-2016, 10:15 AM
Last Post: Dean Roddey
  Class: SceneCtrl Dean Roddey 20 20,818 03-31-2015, 12:38 PM
Last Post: Dean Roddey
  Class: Irrigation Dean Roddey 8 9,522 01-28-2015, 12:09 PM
Last Post: Dean Roddey
  Class: NowPlaying Dean Roddey 8 9,774 09-23-2014, 02:01 PM
Last Post: Dean Roddey
  Class: Switcher Dean Roddey 9 10,606 08-20-2014, 08:17 AM
Last Post: Dean Roddey
  Class: Projector Dean Roddey 29 26,973 08-11-2014, 08:56 AM
Last Post: Dean Roddey
  Class: Lock Dean Roddey 5 7,185 07-31-2014, 01:24 PM
Last Post: Dean Roddey
  Class: ContactClosure Dean Roddey 7 8,732 07-31-2014, 10:14 AM
Last Post: Dean Roddey

Forum Jump:


Users browsing this thread: 1 Guest(s)