Global

Type Definitions

deviceInfo

Properties:
Name Type Description
info string

'ok'

name string

Type ID of the smart meter, e.g. 'KFM5KAIFA-METER'

serialElec string

serial number of the electricity meter, e.g. '98109215 '

gas array

slot: 0-3 for multiple gas meters. serial: serial number of the gas meter, e.g. '28011001147028281'

protocolVersion string

DSMR protocol version of the smart meter. e.g. '42', or '0' for unknown

uptime number

time since last BeeClear device startup in seconds, e.g. 1018445

hardware string

BeeClear device hardware version. e.g. '2'

firmware string

BeeClear device software version. e.g. '49.10_NL'

timeSync number

2 = NTP

setting.landcode string

Country code 'NL' or 'BE'

setting.user string

logged in user name

setting.auth string

logged in user role. 'admin' or 'user'

setting.metertype boolean

is DSMR3 meter

setting.mijnmeter boolean

local IP is published to beeclear.nl/mijnmeter

setting.showgas boolean

gas meter via P1 is enabled

setting.gasUseElekTime boolean

use elektricity timestamp to store gas data

setting.dubbeltariefmeter boolean

use dual tariff meter

setting.levering boolean

use production meter

setting.testfirmware boolean

use test fimrware during updates

setting.enableHttps boolean

HTTPS port 443 is enabled

setting.enableMqtt boolean

MQTT interface is enabled

setting.driefaseMeting boolean

3 phase meter is enabled

setting.rawlogging boolean

raw logging is enabled

setting.dsmrtime boolean

DSMR time is enabled

setting.certUse boolean

custom certificate is enabled

setting.tarief boolean

tariffs used to calculate energy cost

setting.starttime boolean

time of the oldest measurement stored on the SD-card. In unix-time-format. e.g. 1600866000

settings properties of the BeeClear device

Example
// deviceInfo
{
  info: 'ok',
  name: 'KFM5KAIFA-METER',
  serialElec: '98109215        ',
  gas: [ { slot: 0, serial: '28011001147028281' } ],
  protocolVersion: '42',
  uptime: 1018445,
  hardware: '2',
  firmware: '49.10_NL',
  timeSync: 2,
  setting: {
    landcode: 'NL',
    user: 'beeclear',
    auth: 'admin',
    metertype: true,
    mijnmeter: true,
    showgas: true,
    gasUseElekTime: false,
    dubbeltariefmeter: true,
    levering: true,
    testfirmware: false,
    enableHttps: true,
    enableMqtt: false,
    driefaseMeting: false,
    rawlogging: false,
    dsmrtime: false,
    certUse: false,
    tarief: {
      gas: 0.6,
      elekHoog: 0.19512,
      elekLaag: 0.17982,
      gasvast24h: 0,
      elekvast24h: 0
    },
    starttime: { gas: 1600866000, elek: 1600866000, elekw: 1600868110 }
  }
}

FWList

Properties:
Name Type Description
info string

'ok'

current string

installed firmware level, e.g. '49.10_NL'

firmwareNew string

new available stable firmware level, e.g. '49.10_NL'

firmwareTest string

new available unstable firmware level, e.g. 'soult_NL'

firmware[].file string

filename of downloaded firmware file, e.g. 'BeeClear_49.10_NL.bin'

firmware[].version string

version of downloaded firmware file, '49.10_NL'

FWList is an object containing current and downloadable firmware levels.

Example
// FWList
{
  info: 'ok',
  firmware: [
    { file: 'BeeClear_49.10_NL.bin', version: '49.10_NL' }
  ],
  firmwareNew: '49.10_NL',
  firmwareTest: 'soult_NL',
  current: '49.10_NL'
}

loggedIn

Properties:
Name Type Description
status number

HTTP(S) status response code, e.g. 200

message string

login message, e.g. 'Welkom'

access_token string

'toegang gegeven'

security number

0

meterReadingsShort is an object containing actual power and gas meter information.

Example
// loggedIn
{
  status: 200,
  message: 'Welkom',
  access_token: 'toegang gegeven',
  security: 0
}

meterReadingsFull

Properties:
Name Type Description
d number

time of the last measurement in unix-time-format. e.g. 1600798993

ed number

time of the last electricity measurement in unix-time-format. e.g. 1600798989

tariefStatus number

1 = off-peak (low tariff), 2 = peak (high tariff)

ul number

consumption counter low tariff in Wh. e.g. 12637314

uh number

consumption counter high tariff in Wh. e.g. 8553028

gl number

production counter low tariff in Wh. e.g. 4288455

gh number

production counter high tariff in Wh. e.g. 10048153

verbruik0 number

actual power consumption Phase 1 in Watt. -1 = not present

leveren0 number

actual power production Phase 1 in Watt. -1 = not present

verbruik1 number

actual power consumption Phase 2 in Watt. -1 = not present

leveren1 number

actual power production Phase 2 in Watt. -1 = not present

verbruik2 number

actual power consumption Phase 3 in Watt. -1 = not present

leveren2 number

actual power production Phase 3 in Watt. -1 = not present

u number

actual total power consumption in Watt. e.g. 814

g number

actual total power production in Watt

gas[].slot number

0 for a single gas meter. 0-3 for multiple gas meters

gas[].val number

gas-meter counter in liter (1000 * m³). e.g. 6399475

gas[].time number

time of the last gas measurement in unix-time-format. e.g. 1600797600

meterReadingsFull is an object containing actual power and gas meter information.

Example
// meterReadingsFull
{
  d: 1600798993,
  ed: 1600798989,
  tariefStatus: 2,
  ul: 12637314,
  uh: 8553028,
  gl: 4288455,
  gh: 10048153,
  verbruik0: 814,
  leveren0: 0,
  verbruik1: -1,
  leveren1: -1,
  verbruik2: -1,
  leveren2: -1,
  u: 812,
  g: 0,
  gas: [ { slot: 0, val: 6399475, time: 1600797600 } ]
}

meterReadingsShort

Properties:
Name Type Description
pwr number

power meter total (consumption - production) in Watt. e.g. 646

l1 number

power meter phase 1 (consumption - production) in Watt. e.g. 646

l2 number

power meter phase 2 (consumption - production) in Watt. e.g. 646

l3 number

power meter phase 3 (consumption - production) in Watt. e.g. 646

net number

energy meter total (consumption - production) in kWh. e.g. 7507.336

p2 number

energy consumption counter high tariff in kWh. e.g. 896.812

p1 number

energy consumption counter low tariff in kWh. e.g. 16110.964

n2 number

energy production counter high tariff in kWh. e.g. 4250.32

n1 number

energy production counter low tariff in kWh. e.g. 1570.936

tm number

time of retrieving info. unix-time-format. e.g. 1542575626

gas number

gas-meter counter in m³. e.g. 6161.243

gtm number

time of the last gas measurement in unix-time-format. e.g. 1542574800

meterReadingsShort is an object containing actual power and gas meter information.

Example
// meterReadingsShort
{
  pwr: 599,
  l1: 115,
  l2: 84,
  l3: 399,
  net: -2886.47,
  p2: 5351.641,
  p1: 5615.158,
  n2: 9541.804,
  n1: 4311.465,
  tm: 1684096238,
  gas: 5487.806,
  gtm: 1684096208
}

networkInfo

Properties:
Name Type Description
status string

'ok'

ip string

IP address of the BeeClear device on the network interface, e.g. '192.168.200.201'.

netmask string

e.g. '255.255.255.0'

proto string

obtain IP address. 'static', 'dhcp' or 'off'

hostname string

name of the BeeClear device in the local network, e.g. 'beeclear'

router string

router address used by the BeeCler device, e.g. '192.168.200.1'

dns string

dns server address used by the BeeCler device

link string

ethernet link state, e.g. 'up' or 'lowerlayerdown'

speed string

ethernet speed, e.g. '10'

duplex string

ethernet duplex, e.g. 'half'

mac string

MAC address of the BeeClear network interface, e.g. '64:51:7e:63:2b:a5'

mode string

WiFi mode. 'ap' = access point, 'sta' = client station

ssid string

WiFi SSID, e.g. 'BeeClear'

key string

WiFi password

encryption string

WiFi encryption mode, e.g. 'psk2+tkip+ccmp'

aan number

WiFi radio is on

aan string

WiFi wireless link state. e.g. 'down' or 'up'

signal string

WiFi channel info, e.g. 'channel 3 (2422 MHz), width: 20 MHz, center1: 2422 MHz',

networkInfo is an object containing information of the Ethernet and WiFi interfaces.

Example
// networkInfo
{
  eth: {
    status: 'ok',
    ip: '',
    netmask: '',
    proto: 'dhcp',
    hostname: 'beeclear',
    router: '',
    dns: '',
    status_ethernet: {
      ip: '192.168.200.201',
      netmask: '255.255.255.0',
      router: '192.168.200.1',
      dns: '192.168.200.1',
      link: 'up',
      speed: '10',
      duplex: 'half',
      mac: '64:51:7e:63:2b:a5'
    }
  },
  wifi: {
    status: 'ok',
    ip: '192.168.111.1',
    netmask: '255.255.255.0',
    proto: 'off',
    hostname: 'bcprod',
    mode: 'ap',
    ssid: 'BeeClear',
    key: 'power2you',
    encryption: 'psk2+tkip+ccmp',
    router: '',
    dns: '',
    status_info: {
      aan: 1,
      ip: '',
      netmask: '',
      router: '',
      dns: '',
      mode: 'sta',
      wstatus: 'down',
      signal: '',
      ssid: '',
      mac: '64:51:7e:63:2b:a4'
    }
  }
}

sessionOptions

Properties:
Name Type Attributes Default Description
username string <optional>
'beeclear'

The username

password string <optional>
'energie'

The password

host string <optional>
'beeclear.local'

The url or ip address of the Beeclear device.

port number <optional>
80

The port of the Beeclear P1. Defaults to 80. TLS/SSL will be used when setting port to 443.

useTLS boolean <optional>
false

use TLS (HTTPS).

timeout number <optional>
4000

http(s) timeout in milliseconds. Defaults to 4000ms.

reversed boolean <optional>
false

Reverse the peak and offPeak meters. Required in Belgium.

Set of configurable options to set on the class or during login

Example
// session options
{ username: 'beeclear',
  password: 'energie',
  host: 'beeclear.local,
  port: 443,
  useTLS: true,
  timeout: 5000 }

status

Properties:
Name Type Description
p1 number

P1 connection state. 0 = not connected, 1 = connected.

sdcardFree string

SD card free storage space, e.g. '99.9%'

sdcardTotal string

SD card total storage space, e.g. '15.47 GB'

status is an object containing P1 connection and SD-card status.

Example
// status
{ p1: 0, sdcard: 1, sdcardFree: '99.9%', sdcardTotal: '15.47 GB' }