Smart Plug

Smart plug

 

Declaration of conformity


Download the declaration of conformity

Presentation


The SmartPlug  is  LoRaWAN class C device, it uses the main voltage as a power supply.

The SmartPlug includes an internal antenna.

The direct application for the SmartPlug is to control electrical devices thanks to their electric supplies, it can also measure the power consumption of the electric device plugged on it and measure and evaluate the quality of the electrical main where it is plugged to.

sp

Family code

The family code of the SmartPlug devices is: 50-70-003-xxx

Installation and use


Installation

The housing is intended to be installed inside or outside a building but to the shelter of a vertical splash water and direct sunlight.

Plug the SmarPlug into a wall socket, then plug an electrical device in it.

Propagation radio

In order for the sensor to function correctly, it is better to limit the number of obstacles in order to avoid excessive attenuation of the radio wave, it is also important to put the sensor as high as possible.

propagation-smartplug

Human Machine Interface


In order to switch the SmartPlug ON, plug it into a wall socket. The SmartPlug will automatically start.

One led can be seen on the device. This led can have 2 different colors:

  • Green: blinking until the association to a network is done.

 

association

  • Red: blinking when the user button is pressed

smartplug-ihm

 

 

One press on the User Button will change the state of the SmartPlug (ON/OFF).

If the SmartPlug is rebooted, it will keep the last state it was on.

  • It is possible to ask a ReAssociation procedure if no down frame is received by the sensor during a given periodicity (4 days by default) or if a given number (100 by default) or failure (no acquittement is received) are reached by sending an applicative frame to the sensor or by the IHM of the sensor.

The sensor keeps the AppEUi and DevAddr configured, Confirmed/Unconfirmed  configuration and all applicative configurations. On the other hand, LoRaWAN configuration (channel, datarate …) are lost.

ReAssociation Mode
Way to trigger itThree short press on the USER button or ZCL command from LoRaWAN cluster.
Effects on the sensorThe ASSO led (green) blinks as the “no commissioned sensor” led lightning.
  • A factory reset is available on nke Watteco’s sensors. It deletes all the applicative settings saved in the flash memory (i.e.: the configured batches and reports will be deleted).

The sensor keeps the AppEUi and DevAddr configured. On the other hand, LoRaWAN configurations (channel, datarate …) and applicative configurations are lost.

Factory reset
Way to trigger ittwo short presses and one long press for approximately 7 seconds on the USER button.
Effects on the sensorThe CONF led (red) and ASSO led (green) blink at the same time briefly. All the applicative settings (about batches and reports) are deleted. The blinking is illustrated below this table.

5

Applicative layer


Codec are available to decode frame: Downloads

The SmartPlug device is an awake device. It implements the “On/Off” cluster associated with the output controlled by the relay, the “Power Quality” cluster and the “Simple-Metering-Like” cluster.

The SmartPlug integrates the following clusters:

ClusterCluster nameManaged attributes
0x0000BasicAll
0x0050ConfigurationAll
0x8004LoRaWANAll
0x0006ON/OFFAll
0x0052Simple Metering LikeAll
0x8052Power QualityAll

Default configuration

A default configuration is set:

  • The device reports each 1 hour the simple metering (EndPoint 0 / Cluster Simple Metering /Attribut Current Metering).

Every change on the default configuration must respect the legal duty cycle. (For example the most restrictive in EU is 0.1%, so in SF12 it is around 1 frame each hour)

Use cases


The direct application for the SmartPlug is to control electrical devices thanks to their electric supplies. The SmartPlug is plugged inside a wall socket. Then the device to control has to be plugged in the SmartPlug’s socket. Once this quick installation is done, the electric device can be controlled through the LoRaWAN network to be either powered or not.

The SmartPlug  also measures the power consumption of the electric device plugged in it. The table below  summarizes all the value measured along with their unit.

Measure Unit
Active EnergyW.h
Reactive EnergyVAR.h
Accumulation durationNumber of sample
Active PowerW
Reactive Power VAR

The SmartPlug measures and evaluates the quality of the electrical main where it is plugged to. The table below represents  the available indicators provided by the SmartPlug to evaluate the quality of the main.

MeasureDescriptionUnit
FrequencyCurrent frequency seen by the SmartPlug(x+22232)(Hz/1000)
Frequency min.Minimum frequency seen by the SmartPlug (x+22232)(Hz/1000)
Frequency max. Maximum frequency seen by the SmartPlug(x+22232)(Hz/1000)
VRMS Current Root Mean Square Voltage of the main signal
seen by the SmartPlug
(V/10)
VRMS min.Minimum Root Mean Square Voltage of the main signal
seen by the SmartPlug
(V/10)
VRMS max.Maximum Root Mean Square Voltage of the main signal
seen by the SmartPlug
(V/10)
OverVoltageNumber Counter incremented by the SmartPlug each time a
voltage peak exceed the value set by the “Over voltage
Threshold” in the Power Quality Cluster
Counter
SagNumberCounter incremented by the SmartPlug each time the
main voltage is lower than the value set by the “Sag
voltage Threshold” for at least the number of half cycle
defined by the “Sag cycle Threshold” attribute in the
Power Quality Cluster
Counter
BrownoutNumberCounter incremented by the SmartPlug each time this
latter reboot
Counter

Frame examples


Standard report

Report

Report of the relay state of the remote SmartPlug

Applicative payload is: 11 0a 00 06 00 00 10 01

01: relay state ON

 

Configuration

Supply or unsupply the electric device plugged on the SmartPlug in electricity

→ As there is only one On/Off output, the End Point is 0 and Cluster “On/Off” is 0x0006.

Applicative payloads are:

11 50 00 06 00 

00 : switch OFF the relay 

11 50 00 06 01 

01: switch ON the relay 

11 50 00 06 02

02: Invert the relay state

 

Configure a standard report on the consumption of the remote SmartPlug

Timestamp and record the Active Energy  each time it decreases or increases of 10 W.h. A report has to be sent at least every 10 min.

→As there is only one measurement input, the End Point is 0, cluster “Simple Metering-Like” is 0x0052 and attribut “Current Metering” is 0x0000.

The maximum field has to be 0x800a to have a report every 10 minutes and the minimum field has to be 0x0000 to have a report immediately after the right variation.

 Applicative payload is: 11 06 00 52 00 00 00 41 00 00 80 0a 0c 00 00 0a 00 00 00 00 00 00 00 00 00 

00 00: minimum reporting interval (0 seconds)

80 0a: maximum reporting interval (10 minutes)

0c: Data length (12 bytes)

00 00 0a: variation of summation of the active energy (10 W.h)

→ Response: 11 07 00 52 00 00 00 00

 

Configure a standard report on the power quality measurements

Report all the measures allowing to evaluate the Power Quality (F, Fmin, Fmax, Vrms, Vrms min, Vrms max, Vpeak, Vpeak min, Vpeak max, OverVoltageNumber, SagNumber and BrownoutNumber). These values has to be reported at less each 20 minutes and a minimum timing of 1 minute between 2 reports has to be setted. Finally, an increase or a decrease of 10Vrms has to trigger a report. All other delta on the values should not trigger a report.

→ As there is only one measurement input, the End Point is 0, cluster “Power Quality” is 0x8052 and attribut “Current” is 0x0000.

The maximum field has to be 0x8014 to have a report all 20 minutes and the minimum field has to be 0x8001 to have a minimal timing of 1 min between two reports. All the 0xpppp fields have to be configured to 0x00 in order to not trigger a report except for the Vrms measure, where a delta of 10V should trigger a report, thus the value for dVrms will be 0x0064 (because the unit is V/10).

Applicative payload is: 11 06 80 52 00 00 00 41 80 01 80 14 18 00 00 00 00 00 00 00 64 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

80 01: minimum reporting interval ( 1 minute)

80 14: maximum reporting interval (20 minutes)

18: Data length (24 bytes)

 00 64: dVrms (V/10)

→ Response: 11 07 80 52 00 00 00 00

 

Configure a standard report on the relay state

Report the state of the relay all 24 hours and on each variation.

→ As there is only one relay, the End Point is 0, cluster “ONOFF” is 0x0006 and attribut “ON/OFF” is 0x0000.

The maximum field has to be 0x85A0 to have a report all 24 hours (60* 24 minutes) and the minimum field has to be 0x0000 to have a minimal timing between two reports on variation. All the 0xpppp fields have to be configured to 0x00 in order to not trigger a report except for the Vrms measure, where a delta of 10V should trigger a report, thus the value for dVrms will be 0x0064 (because the unit is V/10).

Applicative payload is: 11 06 00 06 00 00 00 10 00 00 85 A0  01

00 00: minimum reporting interval ( 0 minute)

85 A0: maximum reporting interval (24 hours)

01: request report on each variation

→ Response: 11 07 00 06 00 00 00 00

 

Batch report

Configuration

 

Configure a batch report on the simple metering like  and the power quality:

Timestamp and record the Active Energy and the Active Power each time it decreases or increases of respectively 20 W.h and 350 W. The resolution needed for both of the measures is respectively 1 W.h and 1 W.

Timestamp and record an  increase or decrease of 30 Vpeak. The resolution needed for the measure is 1V.

A batch has to be sent at least every 3h and at maximum every 10 min.

→ For the simple metering, the End Point is 0, cluster “Simple Metering-Like” is 0x0052 and attribut “Current Metering” is 0x0000.

For the Active Energy, the delta will be 0x000014 and resolution will be 0x000001. For the Active Power, the delta will be 0x015E and resolution will be 0x0001.

For the power quality, the End Point is 0, cluster “Power Quality” is 0x8052 and attribut “Current” is 0x0000. The delta will be 0x012C and resolution will be 0x000a.
For all  the measures, the maximum field has to be 0x80B4 to have a report at least every 3 hours and the minimum field has to be 0x800A to have a minimal timing of 10 min between reports.

There are 3 kinds of measures, it is necessary to manage 3 different labels.

Number of labelTag labelTag size
1 or 20/11
3 or 400/01/11/102
5 or 6 or 7 or 8000/001/010/011/100/101/110/1113
.........

The Tag Size to use for 3 labels is 2. Label 00 can be used for Active energy, Label 01 for Active power, and  Label 10 for Vpeak. To configure the batch, it is necessary to send a command of “Configure reporting” at each cluster.

Applicative payload of simple metering

11 06 00 52 2D 00 00 00 80 0A 80 B4 00 00 14 00 00 01 02 03 80 0A 80 B4 01 5E 00 01 0a 

2D: 0b00101101 => 0010110: size of configuration string after attribute ID (22 bytes)

00: index of required field (Active energy)

80 0A: minimum reporting interval (10 minutes)

80 B4: maximum reporting interval ( 3 hours)

00 00 14: required delta value ( size: 24 bits for Active energy, 20W.h)

 00 00 01: required resolution ( 1W.h)

02: tag value (ob00000010=> 00000: tag label, 010: tag size)

03: index of required field (Active power)

01 5E: required delta value ( size: 16 bits for Active power, 350W )

00 01: required resolution (1W)

0a:  tag value (ob00001010=> 00001: tag label, 010: tag size)

→ Response:11 07 00 52 00 01 00 00

 

Applicative payload of power quality

11 06 80 52 15 00 00 06 80 0A 80 B4 01 2C 00 0A 12

15: 0b00010101 => 0001010: size of configuration string after attribute ID (10 bytes)

06:index of required field (Vpeak)

80 0A: minimum reporting interval (10 minutes)

80 B4: maximum reporting interval ( 3 hours)

01 2C: required delta value ( size: 16 bits, 30 V)

00 0A: required resolution (1V)

12: tag value (ob00010010=> 00010: tag label, 010: tag size)

→ Response: 11 07 80 52 00 01 00 00

 

To decode the batch reception, use the br_uncompress. Type for power quality attribute current is U16(6), Type for simple metering attribute CurrentMetering for Active energy l24(9) and for Active power l16(7) , so it is necessary to use this command:

echo “ 26100040405e7692050000004006 ” | br_uncompress -a 2  0,1,9   1,1,7  2,10,6

Print Friendly