Get Events

Description

Returns an overview of the appliance events reported on a specific service location. It is possible to filter on one or more appliances.

Resource URL

https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/events

HTTP method

GET

HTTP header

Authorization: Bearer [ACCESS_TOKEN]

 [ACCESS_TOKEN] being the access token received from the Get token or Refresh token authentication calls.

Parameters

Parameter

Type

Description

SERVICELOCATIONID

Path Parameter

The actual id of an accessible service location (see Get Servicelocations)

applianceId

Query Parameter

This parameter can be repeated and refers to an appliance id as described in the service location info (see Get Servicelocation Info)

from

Query Parameter

The UTC timestamp in milliseconds indicating the beginning of the requested period

to

Query Parameter

The UTC timestamp in milliseconds indicating the end of the requested period

maxNumber

Query Parameter

The maximum number of events that should be returned by this query

Example

https://app1pub.smappee.net/dev/v3/servicelocation/123/events?applianceId=1&applianceId=2&applianceId=3&applianceId=4&maxNumber=100&from=1388534400000&to=1391212800000

Result

[ {activePower: 340, totalPower: 1060, applianceId: 432, timestamp: 1391212532100}, {activePower: -120, totalPower: 720, applianceId: 472, timestamp: 1389215612400}, ... ]



Field

Description

activePower

Power value (Watt) as a result of the appliance event. Positive value in case the appliance is switched on, negative value in case the appliance is switched off.

totalPower

Total power (Watt) after the event.

applianceId

ID of the appliance.

timestamp

UTC timestamp in milliseconds. Events are ordered descending.





Content