KEMBAR78
API and MQTT Documentation SMAPPEE | PDF | Computer Engineering | Computing
0% found this document useful (0 votes)
322 views27 pages

API and MQTT Documentation SMAPPEE

Uploaded by

sachinsuyal1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
322 views27 pages

API and MQTT Documentation SMAPPEE

Uploaded by

sachinsuyal1992
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 27

Smappee API

Documentation

English – Version 2.0 – August 2020


Table of contents
1. Overview 3
2. REST API 4
3. MQTT 9

Smappee API – Documentation - English 2


1. Overview
The Smappee API facilitates easy integration with other HEMS/BMS systems. This allows ESCOs and OEM
partners to combine Smappee data with other data, creating added value for their business and their
customers. Both API methods are described in this document.

The Smappee API supports 2 communication protocols:


1. REST API (polling principle – cloud to cloud communication): used to obtain historical data on demand.
2. MQTT (push-principle – device to local or cloud communication): used to acquire real time data
automatically.

Smappee API – Documentation - English 3


2. REST API
In this chapter, we give more information about the data you can gather using the Smappee REST API. Find a
detailed overview here: https://smappee.atlassian.net/wiki/spaces/DEVAPI/overview

To use the API, you need the following login details:


• Client ID & Secret: gives you access to the API environment.
• User name and password:
- Basic user: with this type of account, you can access the data of the locations specifically
shared with your account
- Partner API user: with this type of account, you can access the data of all installed monitors
linked to your organisation (newly installed monitors are added automatically).

The REST API service is available for all Smappee Infinity installations including a Smappee gateway.
(Genius and Connect series).

Overview of the Smappee API Methods


General
• ‘Get Servicelocations’: get an overview of all the Smappee monitors (locations) linked to a specific user
account.
• ‘Get Metering Configuration’: view detailed information about a specific location (Smappee monitor).

Measurement values
• ‘Get Electricity Consumption’: view the electricity consumption data of Smappee monitors for a specified
time range.
• ‘Get Switch Consumption’: view the consumption data of Smappee Switches.
• ‘Get Sensor Consumption’: view the data measured by Input modules or Smappee Gas & Water monitors.
(Smappee Infinity modules that use a sensor to gather consumption data)

NILM
• ‘Get Events’: get an overview of all the detected events of appliances.
• ‘Get Cost Analysis’: view the energy consumption data per appliance during a specified time range.

Comfort Plug, Switch and Output module


• ‘Actuator ON and OFF’: control Comfort Plugs or Switches connected to the Smappee monitor (on or off).
• ‘Get Actuator state’: see whether Switches or Output Modules are turned on or off.
• ‘Set Actuator state’: set the state of a specific Switch, Comfort plug or Output Module.

Location management
• ‘Create service location’
• ‘Delete service location’
• ‘Update service location’
• ‘Share access to a service location’

Smappee API – Documentation - English 4


Detailed description
• ‘Get Service locations’: get an overview of all the Smappee monitors (locations) linked to a specific user
account. Upon request, you can get access to a dedicated account that contains all current and new
monitors installed by your company. Please contact your trusted Business Developer or
info@smappee.com request a Smappee Partner API account.
• ‘Get Metering configuration’: access the following detailed data of a Smappee monitor:
- View general information:
o Location name, as specified in the user account in the Smappee App.
o Time zone
o Physical location (longitude, latitude), as specified in the user account in the Smappee App.
o Electricity tariff and currency
- Get an overview of appliances that are automatically detected by Smappee’s NILM Technology. The
names of the appliances and the appliance type are specified in the user account in the Smappee App.
- Actuators: get an overview of the Output modules, Comfort Plug(s) and Switch(es) connected to the
Smappee monitor. The names of the controlling components are specified in the user account in the
Smappee App.
- Sensors: get an overview of the Smappee Gas & Water(s) connected to the Smappee monitor.
- Channel Configuration: get an overview of each measured load (CT) and its configuration, called
‘measurements’:
o Name
o Input type (consumption, production, storage, submeter)
o Phase

Measurement values
• ‘Get Electricity Consumption’: view the electricity consumption and production data for a specified time
range. View the data according to the following types of aggregation:
Interval Data Retention Unit

5,10,15,20,30 minute 31 days (1 month) Energy - Wh

Hourly 90 days Energy - Wh

Daily 365 days (1 year) Energy - Wh

Monthly 5 years Energy - Wh

TIP: multiply the values by 12 to convert the 5-minute interval from Energy [Wh] to Power [W].

- Access the following electricity consumption data:


o Total consumption (active power)
o Total production (solar)
o Always on consumption
o Grid import and export
o Self-consumption and -sufficiency factor
o Active & reactive power per input (CT)
o Current per input (CT). When you have a Power Quality Licence, min/max values are included.
o Voltages per phase. When you have a Power Quality Licence, min/max values are included.
Do you want to access min/max values? Contact your trusted Business Developer or
info@smappee.com and order a Power Quality Licence.

Smappee API – Documentation - English 5


• ‘Get Switch Consumption’: view the consumption data of Smappee Switches connected to a Smappee
monitor for a specific time range.

View the data according to the following types of aggregation:


- 5 min interval (only available for the last 31 days)
- Hourly interval
- Daily interval
- Monthly interval
- Quarterly interval

Access the following electricity consumption data:


- Active & reactive power

• ‘Get Sensor Consumption’: view the configuration of the sensor (pulses) and the gas and/or water
consumption data of Smappee Gas & Waters connected to the Smappee.

View the data according to the following types of aggregation:


- 5 min interval (only available for the last 31 days)
- Hourly interval
- Daily interval
- Monthly interval
- Quarterly interval

Access the following gas and water consumption data:


- Timestamp (UTC stamp)
- Values of input 1
- Values of input 2
- Temperature (°celsius multiplied by factor 10)
- Relative humidity (%)
- Battery level (%)

NILM
• ‘Get Events’: get an overview of the appliance events detected by the Smappee monitor and get an
overview of the (active) power per detected appliance:
- View the active power value (watts) as a result of the appliance event. This value is positive when the
appliance was switched on (power increase of the appliance). This value is negative when the
appliance was switched off (power decrease of the appliance).
- View the total power (watts) after the appliance event. This value indicates the total load of the
complete installation and the current status of the total load of the installation when the appliance is
switched on.

• ‘Get Cost Analysis’: get a breakdown of the energy consumption per appliance for a specified time range.

View the data according to the following types of aggregation:


- Monthly interval
- Yearly interval

Smappee API – Documentation - English 6


Comfort Plug, Switch and Output module
• ‘Actuator ON/OFF’: control Comfort Plugs or Smappee Switches connected to the Smappee monitor. The
possible states are on or off.

You can control the state for a specific time range or permanently. You can turn Comfort Plugs and
Switches on or off for intervals of 300, 900, 1800 or 3600 seconds. Any other time interval results in
changing the state for an undetermined period of time.

• Get ‘Actuator State’: see whether Switches are turned on or off. The possible states are ‘ON_ON’ or
‘OFF_OFF’.

• Set Actuator State: set the state of a specific Switch, Comfort plug or Output Module.

Service Location Management (advanced)


• Create service location: add a new service location to the account.
• Delete service location: remove an existing service location from the account.
• Update service location: update an existing service location.
• Name
• Geo location: longitude and latitude
• Share access to a service location.

Note: you need to have a Smappee partner API account to carry out the actions described above.
Contact your trusted Business Developer or info@smappee.com to request access to these actions.

Smappee API – Documentation - English 7


FAQ: How to link the measured data to your loads.
Map the configuration of a service location (Smappee monitor) to know what measured data belongs to what
load.

• The ‘Get Metering Configuration’ call contains the overview of each measurement and each load
configuration.
Resource URL:
https://app1pub.smappee.net/dev/v3/servicelocation/[SERVICELOCATIONID]/meteringconfiguration

Access the following data:


- Name: general name, as specified by the installer
- Input type: consumption, production, storage, submeter
- Phase (A,B,C), stands for L1, L2, L3
- Consumption Index (CT id): Number of CT for reference in Get Consumption.

Note: consumption Index 1 corresponds to the 2nd value in the Get Consumption call

• ‘Get Electricity Consumption’ contains the electricity consumption and production data for a specified
time range for each of the inputs (CTs).

Smappee API – Documentation - English 8


3. MQTT
In this chapter, we describe how to use the MQTT functionality of the Smappee monitor.

The MQTT service is only available for Infinity installations including a Smappee Genius as gateway.
The MQTT service is not available for Infinity installations with a Connect series module as
gateway.

MQTT Technology
“MQTT is a Machine-to-Machine (M2M)/Internet of Things connectivity protocol. It was designed as an
extremely lightweight publish/subscribe messaging transport. It is useful for connections with remote
locations where a small code footprint is required and/or network bandwidth is at a premium.” (“What is
MQTT”, n.d.)*

General
The Smappee Infinity sends out messages to multiple MQTT Topics that can be picked up by an external MQTT
broker or by a broker in the local network that is subscribed to the MQTT Topics of interest.
The Smappee Infinity is also equipped with a local MQTT broker.

Principle
• The Smappee device constantly pushes MQTT data (topics).
• The server, which is equipped with an MQTT broker, is ‘subscribed’ to a set of Smappee data and redirects
the data to a specified location or platform.
• The server hosting the MQTT broker can be located in the local network, cloud or other server.

Application
1. The data is exchanged via an external MQTT broker (most frequently used).

2. Node Red via a local MQTT broker embedded in the Smappee Genius.

* Source: What is MQTT. (n.d.). retrieved from http://mqtt.org/

Smappee API – Documentation - English 9


Smappee MQTT Topics Overview
The MQTT details are listed further in the document.

• “uuid” is the unique identifier of the service location


• “node id” is the unique identifier of the plug

Data holder Topic & message content

• Config: contains the meta data of the service location (serial


number, owner, language, NILM version, etc.)
• Channel Config:
o contains the meta data of all the Smappee hardware
(active CT Hub and CT inputs, Smappee Gas & Water
and Smappee Switch)
o available consumption data for each data source
Configuration (active, reactive, current, volt, min/max, etc.) and its
corresponding unit, phase.
o Calculated values and its properties (total
consumption, production, always-on)
• Sensor Config: contains the meta data of all Smappee Gas &
Waters connected to the Smappee Genius.
• Home Control Config: contains the meta data of all the
Smappee Switches connected to the Smappee Genius.
Contains real-time data of all active [W], reactive power [Var], current
Realtime energy data
[dA], voltage [V] data and frequency [µHz]. The data is published every
(1-second data)
second.
• Describes the state of the connection between the Switch and
the Genius
• Relay state: on or off with timestamp
• Set state: which relay state is set
State of the Smappee Switch
• Trigger: describes the event that will trigger the Smappee
Switch according to the Smappee Automations in the App.
• Scheduler: describes how the Switch is automated according to
the Smappee Automations in the App.

Reports if Smappee has detected whether someone is present at the


Presence reporting
location based on consumption.

Smappee API – Documentation - English 10


How to obtain the UUID?
To obtain the Service location UUID you can choose one of the following options:
1. Via the Smappee Dashboard:
Go to https://dashboard.smappee.net and add a Location configuration card.

2. Via a one-time REST API call:


Go to https://smappee.atlassian.net/wiki/spaces/DEVAPI/pages/526483487/Get+Servicelocations

3. Use a MQTT wildcard as the UUID.


Match the Configuration Topic results to the serial number you need.
(https://www.hivemq.com/blog/mqtt-essentials-part-5-mqtt-topics-best-practices)

Setup your Smappee monitor


The MQTT-Broker location is set up on the Smappee monitor using the Expert Portal. Follow these steps:
1. Log in to the Expert Portal of the Smappee monitor: determine the IP address of the Smappee
monitor in the Smappee App. Go to Settings > Your Smappee monitors > Smappee Infinity > Infinity
Components > Smappee Genius.

Note: your tablet or laptop must be connected to the same network as the Smappee monitor to
be able to use the Expert Portal.

Smappee API – Documentation - English 11


Smappee API – Documentation - English 12
2. Fill in the URL mentioned in your web browser: http://<IP-address>/smappee.html

3. Click ‘Logon/logoff’ and fill in the ‘admin’ password and click ‘logon’.

4. Click ‘Advanced’.
5. Fill in the location of the external MQTT Broker with either an IP address or domain and
authentication (if applicable).

6. To save the settings, click ‘Apply changes and restart monitor’.

Smappee API – Documentation - English 13


MQTT Topics Details
Get an overview of the detailed documentation on the different MQTT topics per data holder type:
• uuid: the unique identifier of the service location
• node id: the unique identifier of the plug

Configuration - Retained

Topic name Description Example content

{
"utcTimeStamp":1593704282477,
"deviceUuid":"9930aed6-7f28-4eb9-9ac0-5f5b085f26aa",
"serialNumber":"5010000004",
"serviceLocationUuid":"d578830e-7d3c-4221-9ad5-
servicelocation/<u Contains the meta information of the
2c8866b0c5ef",
uid>/config service location as key/value pairs
"serviceLocationId":11899,
"firmwareVersion":"V4.7.0-SNAPSHOT",
"aggregationPeriodSeconds":300,
"timeZone":"Europe/Brussels"
}

{
"utcTimeStamp":1593704283324,
"dataProcessingSpecification":{
"serviceLocationId":11899,
"phaseType":"THREE_STAR",
"dataSources":[
{
"busAddress":{
"serialNumber":"5500000006",
"inputIndex":0

},
"type":"SCT2_50A",
"reversed":false,
servicelocation/<u
Contains the channel configuration "version":4,
uid>/channelConfig
of the Smappee Genius "name":"CTHub-5500000006",
V2
"nilm":true,
"measurementType":{
"commodity":"ELECTRICITY",
"measurementKind":"ACTIVE_POWER",
"unit":"WATT",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.37.128.38"
}

},
{
"serialNumber":"3004001110",

Smappee API – Documentation - English 14


"sensorId":8,
"version":4,
"name":"Froggy-0",
"nilm":false,
"measurementType":{
"commodity":"NATURALGAS",
"measurementKind":"VOLUME",
"unit":"CUBICMETER",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"7.58.0.42"

}
},
{
"serialNumber":"4006001315",
"monitorId":3,
"version":4,
"name":"Leaf-3",
"nilm":false,
"measurementType":{
"commodity":"ELECTRICITY",
"measurementKind":"ACTIVE_POWER",
"unit":"WATT",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"1.37.0.38"
}
],
"measurements":[
{
"version":2,
"type":"CT",
"name":"GridA",
"formula":"$5500000006/0$",
"publishIndex":0,
"flow":"CONSUMPTION",
"connectionType":"GRID",
"publishedMeasurementTypes":[
{
"commodity":"ELECTRICITY",
"measurementKind":"ACTIVE_POWER",
"unit":"WATT",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.37.128.38"

},
{
Smappee API – Documentation - English 15
"commodity":"ELECTRICITY",
"measurementKind":"REACTIVE_POWER",
"unit":"VOLTAMPEREREACTIVE",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1003.128.63"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"VOLTAGE",
"unit":"VOLT",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.158.128.29"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"VOLTAGE_MIN",
"unit":"VOLT",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1015.128.29"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"VOLTAGE_MAX",
"unit":"VOLT",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1016.128.29"
},
{
"commodity":"ELECTRICITY",
"measurementKind":"VOLTAGE_HARMONIC",
"unit":"VOLT",
"index":5,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1020.5.128.29"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"VOLTAGE_HARMONIC",
"unit":"VOLT",
Smappee API – Documentation - English 16
"index":6,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1020.6.128.29"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"CURRENT",
"unit":"AMPERE",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.4.128.5"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"CURRENT_MIN",
"unit":"AMPERE",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1017.128.5"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"CURRENT_MAX",
"unit":"AMPERE",
"index":0,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1018.128.5"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"CURRENT_HARMONIC",
"unit":"AMPERE",
"index":2,
"phase":"PHASEA",
"channel":0,
"mRID":"1.1021.2.128.5"
},
{
"version":2,
"type":"LEAF",
"name":"Leaf-3",
"formula":"$4006001315/0$",
"publishIndex":-1,
"publishedMeasurementTypes":[
Smappee API – Documentation - English 17
{
"commodity":"ELECTRICITY",
"measurementKind":"ACTIVE_POWER",
"unit":"WATT",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"1.37.0.38"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"REACTIVE_POWER",
"unit":"VOLTAMPEREREACTIVE",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"1.1003.0.63"

},
{
"version":2,
"type":"FROGGY",
"name":"Froggy-8",
"formula":"$3004001110/0$",
"publishIndex":-1,
"publishedMeasurementTypes":[
{
"commodity":"AIR",
"measurementKind":"TEMPERATURE",
"unit":"DEGREESCELSIUS",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"4.46.0.23"

},
{
"commodity":"ELECTRICITY",
"measurementKind":"DCVOLTAGE",
"unit":"NOTAPPLICABLE",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"1.159.0.0"

},
{
"commodity":"AIR",
"measurementKind":"RELATIVEHUMIDITY",
"unit":"HUMIDITY",
"index":0,
Smappee API – Documentation - English 18
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"4.156.0.281"

},
{
"commodity":"NATURALGAS",
"measurementKind":"VOLUME",
"unit":"CUBICMETER",
"index":0,
"phase":"NOTAPPLICABLE",
"channel":0,
"mRID":"7.58.0.42"
}

{
"utcTimeStamp":1593704283203,
"gwSensors":[
{
"gwSensorChannelsConfig":[
{
"leakIntervals":1,
"maxPulses":0,
"ppu":100.0,
"uom":"m3",
"enabled":true,
"type":"GAS"
},
{
"leakIntervals":0,
"maxPulses":0,
servicelocation/<u "ppu":1.0,
uid>/sensorConfig "uom":"NONE",
"enabled":false,
"type":"NONE"
},
{
"leakIntervals":0,
"maxPulses":0,
"ppu":1.0,
"uom":"NONE",
"enabled":false,
"type":"OUTPUT"
},
{
"leakIntervals":0,
"maxPulses":0,
"ppu":1.0,
"uom":"NONE",

Smappee API – Documentation - English 19


"enabled":false,
"type":"WATER"
},
{
"leakIntervals":0,
"maxPulses":0,
"ppu":1.0,
"uom":"NONE",
"enabled":false,
"type":"ELECTRICITY"
},
{
"leakIntervals":0,
"maxPulses":0,
"ppu":1.0,
"uom":"NONE",
"enabled":false,
"type":"CUSTOM"
}
],
"sensorId":8,
"serialNumber":"3004001110"
}
],
"switchSensors":[
{
"name":"Rain water pump",
"serialNumber":"4006001315",
"sensorId":3
},
{
"name":"Washing machine",
"serialNumber":"4006001341",
"sensorId":4
},
{
"name":"Standard coffemaker",
"serialNumber":"4006001413",
"sensorId":2
},
{
"name":"Tumble dryer",
"serialNumber":"4006001417",
"sensorId":1
}
]
}

{
servicelocation/<u
"utcTimeStamp":1593704286280,
uid>/homeControl
"switchActuators":[
Config
{

Smappee API – Documentation - English 20


"nodeId":3,
"name":"Rain water pump",
"serialNumber":"4006001315"

},
{
"nodeId":4,
"name":"Washing machine",
"serialNumber":"4006001341"

},
{
"nodeId":2,
"name":"Standard coffemaker",
"serialNumber":"4006001413"

},
{
"nodeId":1,
"name":"Tumble dryer",
"serialNumber":"4006001417"

],
"smartplugActuators":[

],
"maximumAmpere":40
}

Smappee API – Documentation - English 21


Real-time energy data (1-second data) – Not retained

Topic name Description Example

{
"totalPower":134,
"totalReactivePower":10,
"totalExportEnergy":86400,
"totalImportEnergy":13453862400,
"monitorStatus":0,
"utcTimeStamp":1594201361000,
"measuredFrequency":49993068,
"channelPowers":[
{
"publishIndex":0,
"formula":"$5500000006/0$",
"power":12,
"exportEnergy":0,
"importEnergy":1651784400,
"phaseId":0,
"current":3
Contains the real-time power values.
Note that this information is published
},
every second.
{
Where:
"publishIndex":1,
- Power in W (watt)
"formula":"$5500000006/1$",
- Energy in J (joule, Ws) (not persistent,
"power":14,
reset to 0 on every software restart)
servicelocation/<u "exportEnergy":0,
- Frequency in µHz
uid>/realtime "importEnergy":1145653200,
- Voltage in V (volt)
"phaseId":1,
- Current in dA (deciampère)
"current":2
- Totals are the aggregated values
considering the channel configuration
},
- For a Smappee Genius, the import and
{
export Energy is an index and goes up every
"publishIndex":2,
3600ws
"formula":"$5500000006/2$",
"power":109,
"exportEnergy":0,
"importEnergy":2697822000,
"phaseId":2,
"current":7

},
{
"publishIndex":3,
"formula":"$5500000005/0$",
"power":1,
"exportEnergy":0,
"importEnergy":980042400,
"phaseId":0,
"current":3

Smappee API – Documentation - English 22


},
{
"publishIndex":4,
"formula":"$5500000005/1$",
"power":2,
"exportEnergy":0,
"importEnergy":187300800,
"phaseId":1,
"current":1

},
{
"publishIndex":5,
"formula":"$5500000005/2$",
"power":0,
"exportEnergy":86400,
"importEnergy":539319600,
"phaseId":2,
"current":0

},
{
"publishIndex":7,
"formula":"$5500000399/0$",
"power":0,
"exportEnergy":0,
"importEnergy":0,
"phaseId":0,
"current":0

},
{
"publishIndex":8,
"formula":"$5500000399/1$",
"power":0,
"exportEnergy":0,
"importEnergy":0,
"phaseId":1,
"current":0

},
{
"publishIndex":9,
"formula":"$5500000399/2$",
"power":0,
"exportEnergy":0,
"importEnergy":0,
"phaseId":2,
"current":0

},
{
Smappee API – Documentation - English 23
"publishIndex":14,
"formula":"$5500000005/3$",
"power":12,
"exportEnergy":0,
"importEnergy":757947600,
"phaseId":1,
"current":1

},
{
"publishIndex":11,
"formula":"$5600000091/0$",
"power":11,
"exportEnergy":0,
"importEnergy":1652619600,
"phaseId":0,
"current":3

},
{
"publishIndex":12,
"formula":"$5600000091/1$",
"power":14,
"exportEnergy":0,
"importEnergy":1139464800,
"phaseId":1,
"current":2

},
{
"publishIndex":13,
"formula":"$5600000091/2$",
"power":109,
"exportEnergy":0,
"importEnergy":2701908000,
"phaseId":2,
"current":7

],
"voltages":[
{
"voltage":239,
"phaseId":0

},
{
"voltage":240,
"phaseId":1

Smappee API – Documentation - English 24


},
{
"voltage":240,
"phaseId":2

]
}

Smappee API – Documentation - English 25


Smappee Switch state – Retained
Topic name Description Example

{
"value":"CONNECTED",
Contains whether the Switch that is "since":1516355163247
connected to this service location is }
servicelocation/<u connected (1), disconnected (0), or {
uid>/plug/<node unreachable (2). You can also retrieve the "value":"DISCONNECTED",
id>/connectionStat timestamp for when the status of the Switch "since":1516355163247
e changed. The timestamp is the number of }
milliseconds that have passed since Jan 1st, {
1970 (UTC). "value":"UNREACHABLE",
"since":1516355163247
}

{
Contains whether the Switch that is
"value": "ON",
servicelocation/<u connected to this service location is
"since": 1505479692000
uid>/plug/<node switched on or off. You can also retrieve the
}
id>/state timestamp for when the Switch turned on
{
or off. The timestamp is the number of
"value": "OFF",
milliseconds that have passed since Jan 1st,
"since": 1505479692000
1970 (UTC).
}

{
"value": "ON",
servicelocation/<u
Turns the Switch that is connected to this }
uid>/plug/<node
service location on or off. {
id>/setstate
"value": "OFF",
}

{
"triggerId": 3,
Reports a trigger action
"label": "New Trigger 3",
- triggerId assigned by the backend during
"controllableNodeIds": [2],
configuration
"type": "ACTIVE_POWER_ABOVE",
- controllableNodes may be empty or use
servicelocation/<u "longitude": 0.0,
nodeId from homeControlconfig
uid>/trigger "latitude": 0.0,
- all other values according to the
"radius": 0,
configuration of the trigger
"delay": 0,
- Not all values are used for specific trigger
"action": "ON",
types
"threshold": 100.0
}

{
Reports a scheduler action "schedulerId": 2,
- schedulerId assigned by the backend "label": "New Trigger off",
during configuration "controllableNodeIds": [],
servicelocation/<u
- controllableNodes may be empty or use "hour": 9,
uid>/scheduler
nodeId from homeControlconfig "min": 10,
- all other values according to the "day": "ALL_DAYS",
configuration of the trigger "action": "OFF"
}
Smappee API – Documentation - English 26
Presence reporting – Retained

Topic name Description Example content

Contains a flag that indicates whether the


{
servicelocation/<u Smappee monitor that is activated on the
"value": true
uid>/presence service location detected a presence based
}
on the actual consumption.

Smappee API – Documentation - English 27

You might also like