Type Definitions
discoverInfo
Properties:
Name | Type | Description |
---|---|---|
discoverInfo |
object | Object containing system information |
discoverInfo is an object containing Smile P1 device information.
Example
// status
{ product: 'smile',
version: '3.3.6',
lan_ip: '',
wifi_ip: '192.168.1.2',
timestamp: '2019-07-20T14:58:38+02:00',
zoneinfo: '',
rest_root: '/',
server_timestamp: '2019-07-20T12:58:38+00:00' }
discoverOptions
Properties:
Name | Type | Description |
---|---|---|
id |
string | The short ID of the Smile P1. |
Set of configurable options to use during discovery
Example
// discovery options
{ id: 'hcfrasde' }
interfaceStatus
Properties:
Name | Type | Description |
---|---|---|
interfaceStatus |
object | Object containing interface information |
interfaceStatus is an object containing network interface information. Note: Only for V3 firmware!
Example
// status
{ eth0:
{ type: 'lan', name: 'eth0', mac: '7825427AB576', state: 'down' },
wlan0:
{ type: 'wlan',
name: 'wlan0',
power: { unit: 'dBm', value: 21 },
rate: { unit: 'Mb/s', value: 58.5 },
standard: '802.11bgn',
mac: '7825427AB5B1',
encryption: 'wpa2-psk',
mode: 'client',
proto: 'dhcp',
mask: '255.255.255.0',
noise: { unit: 'dBm', value: -95 },
gway: '192.168.1.1',
ssid: 'MyWifi',
channel_width: { unit: 'MHz', value: 20 },
bcast: '192.168.1.255',
signal_strength: { unit: 'dBm', value: -60 },
state: 'up',
channel: 9,
link_quality: '50/70',
ip: '192.168.1.10',
frequency: { unit: 'GHz', value: 2.452 } } }
logsOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
from |
string |
<optional> |
start of logs in zulu time '2019-07-01T22:00:00.000Z'. Defaults to this month. |
|
to |
string |
<optional> |
end of logs in zulu time '2019-07-31T22:00:00.000Z'. Defaults to this month. |
|
type |
string |
<optional> |
'electricity_consumed'
|
meter type(s) to include e.g. 'electricity_consumed,electricity_produced,gas_consumed'. |
interval |
string |
<optional> |
'P1D'
|
interval of logs e.g. 'P1D', 'PT1H','PT15M' or 'PT300S'. Defaults to 1 day ('P1D'). |
logClass |
string |
<optional> |
'IntervalLogFunctionality'
|
class(es) to include e.g. 'IntervalLogFunctionality,CumulativeLogFunctionality,PointLogFunctionality' |
Set of configurable options to use during logs retrieval
Example
// logs retrieval options
{ from: '2019-07-20T22:00:00.000Z',
to: '2019-07-21T22:00:00.000Z',
type: 'electricity_consumed,electricity_produced'},
interval: 'PT5M',
logClass: 'IntervalLogFunctionality, PointLogFunctionality'
}
meterLogs
Properties:
Name | Type | Description |
---|---|---|
meterLogs |
object | Object containing logs |
meterLogs is an object containing Smile P1 historic log information.
Example
// meterLogs
{ interval_log:
{ id: 'a17aa51dda834556905f3ea1689d18f7',
unit: 'Wh',
type: 'electricity_consumed',
interval: 'PT15M',
last_consecutive_log_date: '2019-08-24T17:45:00+02:00',
updated_date: '2019-08-24T17:45:00+02:00',
period:
{ start_date: '2019-07-21T00:00:00.000+02:00',
end_date: '2019-07-21T23:00:00.000+02:00',
interval: 'PT1H',
measurement:
{ '0':
{ log_date: '2019-07-21T00:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 228 },
'1':
{ log_date: '2019-07-21T01:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 214 },
'2':
{ log_date: '2019-07-21T02:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 197 },
'3':
{ log_date: '2019-07-21T03:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 202 },
'4':
{ log_date: '2019-07-21T04:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 218 },
'5':
{ log_date: '2019-07-21T05:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 196 },
'6':
{ log_date: '2019-07-21T06:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 209 },
'7':
{ log_date: '2019-07-21T07:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 154 },
'8':
{ log_date: '2019-07-21T08:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 262 },
'9':
{ log_date: '2019-07-21T09:00:00.000+02:00',
tariff: 'nl_peak',
value: 38 },
'10':
{ log_date: '2019-07-21T09:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 756 },
'11':
{ log_date: '2019-07-21T10:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'12':
{ log_date: '2019-07-21T10:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'13':
{ log_date: '2019-07-21T11:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'14':
{ log_date: '2019-07-21T11:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'15':
{ log_date: '2019-07-21T12:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'16':
{ log_date: '2019-07-21T12:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'17':
{ log_date: '2019-07-21T13:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'18':
{ log_date: '2019-07-21T13:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'19':
{ log_date: '2019-07-21T14:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'20':
{ log_date: '2019-07-21T14:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'21':
{ log_date: '2019-07-21T15:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'22':
{ log_date: '2019-07-21T15:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'23':
{ log_date: '2019-07-21T16:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'24':
{ log_date: '2019-07-21T16:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'25':
{ log_date: '2019-07-21T17:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'26':
{ log_date: '2019-07-21T17:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'27':
{ log_date: '2019-07-21T18:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'28':
{ log_date: '2019-07-21T18:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'29':
{ log_date: '2019-07-21T19:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'30':
{ log_date: '2019-07-21T19:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 132 },
'31':
{ log_date: '2019-07-21T20:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'32':
{ log_date: '2019-07-21T20:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'33':
{ log_date: '2019-07-21T21:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'34':
{ log_date: '2019-07-21T21:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'35':
{ log_date: '2019-07-21T22:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'36':
{ log_date: '2019-07-21T22:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 },
'37':
{ log_date: '2019-07-21T23:00:00.000+02:00',
tariff: 'nl_peak',
value: 76 },
'38':
{ log_date: '2019-07-21T23:00:00.000+02:00',
tariff: 'nl_offpeak',
value: 176 } } } } }
meterReadings
Properties:
Name | Type | Description |
---|---|---|
pwr |
number | power consumption total in Watt. e.g. 3030 |
l1 |
number | phase 1 power (Watt), e.g. 1129 |
l2 |
number | phase 2 power (Watt), e.g. 1129 |
l3 |
number | phase 3 power (Watt), e.g. 1129 |
v1 |
number | phase 1 voltage (Volt), e.g. 238 |
v2 |
number | phase 2 voltage (Volt), e.g. 238 |
v3 |
number | phase 3 voltage (Volt), e.g. 238 |
i1 |
number | phase 1 current (Ampere), e.g. 5.01 |
i2 |
number | phase 2 current (Ampere), e.g. 5.01 |
i3 |
number | phase 3 current (Ampere), e.g. 5.01 |
net |
number | energy meter total (consumption - production) in kWh. e.g. 7507.336 |
p2 |
number | P2 consumption counter (high tariff). e.g. 896.812 |
p1 |
number | P1 consumption counter (low tariff). e.g. 16110.964 |
n2 |
number | N2 production counter (high tariff). e.g. 4250.32 |
n1 |
number | N1 production counter (low tariff). e.g. 1570.936 |
tm |
number | time of retrieving info. unix-time-format. e.g. 1542575626 |
gas |
number | counter gas-meter (in m^3). e.g. 6161.243 |
gtm |
number | time of the last gas measurement. unix-time-format. e.g. 1542574800 |
meterReadings is an object containing power and gas information.
Example
// meterReadings
{
pwr: -437,
l1: -83,
l2: -117,
l3: -236,
v1: 237,
v2: 233,
v3: 239,
i1: -0.35,
i2: -0.5,
i3: -0.99,
net: -6131.015,
p2: 5000.127,
p1: 9086.173,
n2: 13660.827,
n1: 6556.488,
tm: 1676472900,
gas: 4129.74,
gtm: 1659171300
}
sessionOptions
Properties:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
id |
string | The short ID of the Smile P1. |
||
host |
string | The url or ip address of the Smile P1. |
||
port |
number |
<optional> |
80
|
The port of the Smile P1. Defaults to 80. TLS/SSL will be used when setting port to 443. |
timeout |
number |
<optional> |
10000
|
http(s) timeout in milliseconds. Defaults to 10000ms. |
reversed |
boolean |
<optional> |
false
|
Reverse the peak and offPeak meters. Required in Belgium. |
meterMethod |
number |
<optional> |
1 for fw2, 2 for fw 3. Will be automaically determined if undefined. |
Set of configurable options to set on the router class
Example
// session options
{ id: 'hcfrasde',
host:'192.168.1.50',
port: 443,
timeout: 5000 }
statusV2
Properties:
Name | Type | Description |
---|---|---|
statusV2 |
object | Object containing system information |
statusV2 is an object containing Smile P1 device information. Note: Only for V2 firmware!
Example
// status
{ system:
{ product: 'smile',
mode: 'p1',
version: '2.1.13',
kernel: 'Linux 3.8.11, May 19 14:10:38 CEST 2016',
date: '2019-06-14T10:34:21+0200',
uptime: ' 7:23, load average: 0.14, 0.19, 0.22' },
application:
{ p1_logger: 'running',
last_telegram: ' CEST',
last_parse_time: 'Tue Jun 11 23:06:38 2019 CEST' },
network:
{ hostname: 'smile7ac5b6',
type: 'WiFi (wireless)',
ip_address: '192.168.1.2',
mac_address: '78:25:42:7A:B5:B1',
ssid: 'MyWifi',
mode: 'sta',
link_quality: -35 } }
statusV3
Properties:
Name | Type | Description |
---|---|---|
statusV3 |
object | Object containing system information |
statusV3 is an object containing Smile P1 device information. Note: Only for V3 firmware!
Example
// status
{ id: '48ac7095f50c4cf19fdfe7d1b66f99ae',
created_date: '2019-07-01T08:18:25.458+02:00',
modified_date: '2019-07-20T13:58:01.642+02:00',
deleted_date: undefined,
name: undefined,
description: undefined,
enabled: true,
firmware_locked: false,
prevent_default_update: false,
last_reset_date: '2019-07-01T08:18:25.458+02:00',
last_boot_date: '2019-07-20T13:48:20.466+02:00',
vendor_name: 'Plugwise',
vendor_model: 'smile',
hardware_version: 'AME Smile 2.0 board',
firmware_version: '3.3.6',
mac_address: 'C49300062A32',
short_id: 'hcfrasde',
send_data: true,
anonymous: false,
lan_ip: undefined,
wifi_ip: '192.168.1.2',
hostname: 'smile082d76',
time: '2019-07-20T13:58:05+02:00',
timezone: 'Europe/Amsterdam',
ssh_relay: 'disabled',
project:
{ id: '123306def5eb4172ae74435aea21e753',
name: '-- Stock',
description: 'Stock which was previously called fulfillment',
is_default: false,
visible_in_production: true,
deleted_date: undefined,
modified_date: '2019-07-20T13:32:44.070+02:00',
created_date: '2014-11-19T17:45:10+01:00' },
gateway_environment:
{ id: '00ab027855a44586845028294226da06',
savings_result_value: undefined,
longitude: undefined,
thermostat_model: undefined,
city: undefined,
country: undefined,
electricity_consumption_tariff_structure: undefined,
electricity_production_peak_tariff: undefined,
central_heating_model: undefined,
household_children: 0,
thermostat_brand: undefined,
electricity_production_off_peak_tariff: undefined,
central_heating_installation_date: undefined,
postal_code: undefined,
electricity_consumption_off_peak_tariff: undefined,
latitude: undefined,
gas_consumption_tariff: undefined,
modified_date:
{ '0': '2019-07-20T13:32:50.059+02:00',
'1': '2019-07-20T13:32:50.059+02:00' },
electricity_production_tariff_structure: undefined,
housing_construction_period: 'unknown',
electricity_production_single_tariff: undefined,
electricity_consumption_peak_tariff: undefined,
electricity_consumption_single_tariff: undefined,
central_heating_brand: undefined,
housing_type: 'apartment',
currency: 'EUR',
savings_result_unit: undefined,
household_adults: 0,
central_heating_year_of_manufacture: undefined,
deleted_date: undefined,
created_date: '2019-07-01T08:07:56+02:00' },
features:
{ remote_control:
{ id: '15f73deb7f6e49df8b2510b816997165',
activation_date: '2019-07-03T08:59:26+02:00',
validity_period: undefined,
valid_to: undefined,
valid_from: undefined,
grace_period: undefined,
deleted_date: undefined,
modified_date: '2019-07-20T13:32:44.111+02:00',
created_date: '2019-07-03T08:59:26+02:00' } } }
wifiScanInfo
Properties:
Name | Type | Description |
---|---|---|
wifiScanInfo |
array | Array containing interface information |
wifiScanInfo is an array containing wifi station information. Note: Only for V3 firmware!
Example
// scanInfo
[ { ssid: 'myWifi',
mac: '7825427AB5B1',
encryption: 'wpa2-psk',
quality: '63/70',
signal_strength: { unit: 'dBm', value: -47 },
channel: 5 },
{ ssid: 'myWifigast',
mac: '7825427AB5EA',
encryption: 'wpa2-psk',
quality: '48/70',
signal_strength: { unit: 'dBm', value: -62 },
channel: 9 },
{ ssid: 'REMOTE85',
mac: '001DC904DB32',
encryption: 'wpa2-psk',
quality: '23/70',
signal_strength: { unit: 'dBm', value: -87 },
channel: 3 },
{ ssid: 'GoogleHome2732.o',
mac: 'F68FCA78294C',
encryption: 'open',
quality: '59/70',
signal_strength: { unit: 'dBm', value: -51 },
channel: 5 } ]