Core API

HomeAutomation.HomeGenie Domain

Logging Module


HomeAutomation.HomeGenie/Logging

This module implements commands related to events occurring in HomeGenie.

RealTime.EventStream

Receives the real time event stream from HomeGenie. See W3C Server-Sent Events for furter informations.

Syntax

/api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream?lastEventId=<event_id>
GET /api/HomeAutomation.HomeGenie/Logging/RealTime.EventStream

Response

id: 1423676637695.2151
data: {"Timestamp":"2015-02-11T17:43:57.695215Z","Domain":"HomeAutomation.PhilipsHue","Source":"1","Description":"Virtual Module","Property":"Status.Level","Value":"1","UnixTimestamp":1423676637695.2151}

id: 1423676638583.4839
data: {"Timestamp":"2015-02-11T17:43:58.583484Z","Domain":"HomeAutomation.ZWave","Source":"48","Description":"ZWave Node","Property":"Meter.Watts","Value":"55.351","UnixTimestamp":1423676638583.4839}

id: 1423676639109.613
data: {"Timestamp":"2015-02-11T17:43:59.109613Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"Virtual Module","Property":"Status.Level","Value":"1","UnixTimestamp":1423676639109.613}

id: 1423676641028.0979
data: {"Timestamp":"2015-02-11T17:44:01.028098Z","Domain":"HomeAutomation.ZWave","Source":"44","Description":"ZWave Node","Property":"Meter.Watts","Value":"0.905","UnixTimestamp":1423676641028.0979}

id: 1423676641610.3191
data: {"Timestamp":"2015-02-11T17:44:01.610319Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"Virtual Module","Property":"Status.Level","Value":"0.553571428571429","UnixTimestamp":1423676641610.3191}

id: 1423676641614.81
data: {"Timestamp":"2015-02-11T17:44:01.61481Z","Domain":"HomeAutomation.PhilipsHue","Source":"2","Description":"Virtual Module","Property":"Status.ColorHsb","Value":"0.9915032679738545,0.8751902587519025,0.5535714285714286","UnixTimestamp":1423676641614.81}

Recent.From

Receive last events log starting from the specified <unix_timestamp> timestamp.

Syntax

/api/HomeAutomation.HomeGenie/Logging/Recent.From/<unix_timestamp>
GET /api/HomeAutomation.HomeGenie/Logging/Recent.From/1423677298564.359

Response

[
    {"Timestamp":"2015-02-11T17:55:02.777408Z","Domain":"HomeAutomation.ZWave","Source":"23","Description":"ZWave Node","Property":"Meter.Watts","Value":"28.482","UnixTimestamp":1423677302777.408},
    {"Timestamp":"2015-02-11T17:55:03.242287Z","Domain":"HomeAutomation.ZWave","Source":"42","Description":"ZWave Node","Property":"Meter.Watts","Value":"0","UnixTimestamp":1423677303242.2871},
    {"Timestamp":"2015-02-11T17:55:13.901089Z","Domain":"HomeAutomation.EnergyMonitor","Source":"1","Description":"Virtual Module","Property":"EnergyMonitor.KwLoad","Value":"0.197","UnixTimestamp":1423677313901.0891},
    {"Timestamp":"2015-02-11T17:55:13.906452Z","Domain":"HomeAutomation.EnergyMonitor","Source":"1","Description":"Virtual Module","Property":"EnergyMonitor.WattLoad","Value":"196.579","UnixTimestamp":1423677313906.4519},
    {"Timestamp":"2015-02-11T17:55:13.907439Z","Domain":"HomeAutomation.EnergyMonitor","Source":"1","Description":"Virtual Module","Property":"EnergyMonitor.OperatingDevices","Value":"6","UnixTimestamp":1423677313907.439},
    {"Timestamp":"2015-02-11T17:55:13.908288Z","Domain":"HomeAutomation.EnergyMonitor","Source":"1","Description":"Virtual Module","Property":"EnergyMonitor.OperatingLights","Value":"3","UnixTimestamp":1423677313908.2881},
    {"Timestamp":"2015-02-11T17:55:13.909187Z","Domain":"HomeAutomation.EnergyMonitor","Source":"1","Description":"Virtual Module","Property":"EnergyMonitor.OperatingSwitches","Value":"3","UnixTimestamp":1423677313909.187}
]

Recent.Last

Receive last events log occurred during the last <mseconds> milliseconds.

Syntax

/api/HomeAutomation.HomeGenie/Logging/Recent.Last/<mseconds>
GET /api/HomeAutomation.HomeGenie/Logging/Recent.From/10000

The response is a JSON array of events, like the one shown in the Recent.From example.