Core API

HomeAutomation.HomeGenie Domain

Statistics Module


HomeAutomation.HomeGenie/Statistics

This module implements commands related to HomeGenie statistics engine.

Global.CounterTotal

Get the total counter value for the parameter specified by <parameter_id>.
Only parameters using a unit rate of 1 second can be used with this function. For example the Meter.Watts parameter (that stores Watt samples at discrete-time intervals), will give a valid result of total Watt-hours counter.

Syntax

/api/HomeAutomation.HomeGenie/Statistics/Global.CounterTotal/<parameter_id>
GET /api/HomeAutomation.HomeGenie/Statistics/Global.CounterTotal/Meter.Watts

Response

[{ "ResponseValue" : "16149.229" }]

Global.TimeRange

Get the start and end date, expressed as UNIX timestamps, of the statistics database.

Syntax

/api/HomeAutomation.HomeGenie/Statistics/Global.TimeRange
GET /api/HomeAutomation.HomeGenie/Statistics/Global.TimeRange

Response

[{
    StartTime : '1423354875609.340', 
    EndTime : '1423735858381.750' 
}]

Parameter.List

Get the list of different parameters stored in the statistics database.

Syntax

/api/HomeAutomation.HomeGenie/Statistics/Parameter.List
GET /api/HomeAutomation.HomeGenie/Statistics/Parameter.List

Response

[
    'Conditions.PressureMb',
    'Conditions.TemperatureC',
    'Conditions.TemperatureF',
    'Conditions.UV',
    'Conditions.WindKph',
    'Meter.Watts',
    'Sensor.Luminance',
    'Sensor.Temperature'
]

Parameter.Counter

Get the <parameter_id> hour by hour counter of the module specified by <module_domain>:<module_address>. Days interval must be passed with <start_date> and <end_date> as UNIX timestamps.

Syntax

/api/HomeAutomation.HomeGenie/Statistics/Parameter.Counter/<parameter_id>/<module_domain>:<module_address>/<start_date>/<end_date>
GET /api/HomeAutomation.HomeGenie/Statistics/Parameter.Counter/Meter.Watts/HomeAutomation.ZWave:13/1423609200000/1423609200000

Response

[[ 
    [1423699200000.000,43.181], // h 00
    [1423702800000.000,21.248], // h 01
    [1423706400000.000,40.360], // h 02
    [1423710000000.000,50.729], // h 03
    [1423713600000.000,21.439], // h 04
    [1423717200000.000,21.488], // h 05
    [1423720800000.000,21.403], // h 06
    [1423724400000.000,21.139], // h 07
    [1423728000000.000,21.202], // h 08
    [1423731600000.000,21.247], // h 08
    [1423735200000.000,21.028], // h 10
    [1423738800000.000,79.945], // h 11
    [1423742400000.000,82.712], // h 12
    [1423746000000.000,88.977], // h 13
    [1423749600000.000,86.001], // h 14
    [1423753200000.000,60.348], // h 15
    [1423756800000.000,88.318], // h 16
    [1423760400000.000,89.479], // h 17
    [1423764000000.000,81.934], // h 18
    [1423767600000.000,57.276], // h 19
    [1423771200000.000,86.447], // h 20
    [1423774800000.000,49.171], // h 21
    [1423778400000.000,24.966], // h 22
    [1423782000000.000,22.068]  // h 23
]]

Parameter.StatsHour

Get the <parameter_id> hour by hour value statistics of the module specified by <module_domain>:<module_address>. Days interval must be passed with <start_date> and <end_date> as UNIX timestamps.

Syntax

/api/HomeAutomation.HomeGenie/Statistics/Parameter.StatsHour/<parameter_id>/<module_domain>:<module_address>/<start_date>/<end_date>
GET /api/HomeAutomation.HomeGenie/Statistics/Parameter.StatsHour/Sensor.Temperature/HomeAutomation.ZWave:23/1423609200000/1423609200000

Response

[
    // MIN
    [ [1423699200000.000,17.000],[1423702800000.000,16.111],[1423706400000.000,15.500],[1423710000000.000,15.222],[1423713600000.000,15.000],[1423717200000.000,14.722],[1423720800000.000,14.500],[1423724400000.000,14.222],[1423728000000.000,14.111],[1423731600000.000,14.000],[1423735200000.000,14.500],[1423738800000.000,14.611],[1423742400000.000,14.500],[1423746000000.000,15.000],[1423749600000.000,15.000],[1423753200000.000,14.833],[1423756800000.000,14.611],[1423760400000.000,14.333],[1423764000000.000,14.333],[1423767600000.000,15.000],[1423771200000.000,15.500],[1423774800000.000,16.222],[1423778400000.000,15.833],[1423782000000.000,15.333] ],
    // MAX
    [ [1423699200000.000,17.222],[1423702800000.000,17.222],[1423706400000.000,16.611],[1423710000000.000,16.000],[1423713600000.000,15.611],[1423717200000.000,15.333],[1423720800000.000,15.111],[1423724400000.000,15.000],[1423728000000.000,16.722],[1423731600000.000,16.611],[1423735200000.000,16.611],[1423738800000.000,16.500],[1423742400000.000,16.833],[1423746000000.000,16.722],[1423749600000.000,17.222],[1423753200000.000,17.111],[1423756800000.000,16.611],[1423760400000.000,16.833],[1423764000000.000,17.333],[1423767600000.000,18.111],[1423771200000.000,18.111],[1423774800000.000,17.611],[1423778400000.000,17.500],[1423782000000.000,17.111] ],
    // AVG
    [ [1423699200000.000,17.148],[1423702800000.000,16.769],[1423706400000.000,15.968],[1423710000000.000,15.579],[1423713600000.000,15.278],[1423717200000.000,15.056],[1423720800000.000,14.810],[1423724400000.000,14.578],[1423728000000.000,15.302],[1423731600000.000,15.361],[1423735200000.000,15.593],[1423738800000.000,15.367],[1423742400000.000,15.817],[1423746000000.000,15.898],[1423749600000.000,16.542],[1423753200000.000,15.903],[1423756800000.000,15.706],[1423760400000.000,15.800],[1423764000000.000,15.889],[1423767600000.000,16.509],[1423771200000.000,16.935],[1423774800000.000,17.167],[1423778400000.000,16.762],[1423782000000.000,16.322] ],
    // TODAY AVG
    [ [1423699200000.000,17.111],[1423702800000.000,16.750],[1423706400000.000,16.537],[1423710000000.000,16.333],[1423713600000.000,16.222],[1423717200000.000,16.083],[1423720800000.000,15.944],[1423724400000.000,15.833],[1423728000000.000,15.722],[1423731600000.000,15.611],[1423735200000.000,15.486],[1423738800000.000,15.333],[1423742400000.000,15.333],[1423746000000.000,15.426],[1423749600000.000,16.444],[1423753200000.000,0.000],[1423756800000.000,0.000],[1423760400000.000,0.000],[1423764000000.000,0.000],[1423767600000.000,0.000],[1423771200000.000,0.000],[1423774800000.000,0.000],[1423778400000.000,0.000],[1423782000000.000,0.000] ],
    // TODAY DETAIL
    [ [1423699345777.330,17.222],[1423700245777.540,17.000],[1423702945837.450,16.833],[1423703845853.990,16.833],[1423705045778.530,16.722],[1423706245778.750,16.611],[1423707445778.970,16.611],[1423708345779.080,16.500],[1423709545779.320,16.500],[1423710745779.570,16.333],[1423711645779.730,16.333],[1423712845779.990,16.333],[1423714045780.250,16.222],[1423714945780.400,16.222],[1423716145780.670,16.222],[1423717345780.890,16.111],[1423718246235.220,16.111],[1423719445781.370,16.111],[1423720646104.760,16.000],[1423721845965.340,16.000],[1423722745781.830,16.000],[1423723945782.090,15.833],[1423725145782.330,15.833],[1423726045782.520,15.833],[1423727245782.860,15.833],[1423728445783.110,15.722],[1423729645783.360,15.722],[1423730845783.630,15.722],[1423732045783.970,15.611],[1423733245784.160,15.611],[1423734445784.380,15.611],[1423735345784.480,15.611],[1423736545784.740,15.500],[1423737745784.930,15.500],[1423738645785.100,15.333],[1423739845785.350,15.333],[1423741945785.780,15.333],[1423743145786.000,15.333],[1423744345786.210,15.333],[1423746445786.570,15.333],[1423747646144.460,15.333],[1423748846095.080,15.611],[1423749745787.280,16.000],[1423750945787.530,16.500],[1423752145787.880,16.833] ]
]