Milesight-logo

Milesight WS51x LoRaWAN Smart Wall Socket

Milesight-WS51x-LoRaWAN-Smart-Wall-Socket-product

Product Information

  • Product Name: Smart Wall Socket
  • Model: WS51x
  • User Guide: Included

Safety Precautions

  • Milesight will not shoulder responsibility for any losses or damages resulting from not following the instructions of this operating guide.
  • The device must not be modified in any way.
  • To protect the security of the device, please change the device password when first configuring it. The default password is 123456.
  • The device is intended for indoor use only.
  • Do not place the device where the temperature is below/above the operating range.
  • Do not overload the maximum capacity to avoid damaging the device.
  • Do not place the device close to naked flames, heat sources (such as oven or sunlight), cold sources, liquid, and objects with extreme temperature changes.
  • Use the device in a clean environment only. Dusty or dirty environments may prevent the proper operation of this device.
  • The device must never be subjected to physical shocks or strong vibration.

Declaration of Conformity

  • WS51x is in conformity with the essential requirements and other relevant provisions of the CE, FCC, and RoHS.

Product Usage Instructions

Installation
Please refer to the user guide for detailed installation instructions.

Operation Guide

NFC Configuration

  1. Ensure that your smartphone has NFC capabilities.
  2. Hold your smartphone close to the Smart Wall Socket.
  3. Follow the instructions on your smartphone to configure the device using NFC.

LoRaWAN Settings

  1. Access the device settings menu.
  2. Select “LoRaWAN Settings”.
  3. Enter the required parameters for LoRaWAN connectivity.
  4. Save the settings.

Hardware Introduction

Packing List
If any of the items listed below are missing or damaged, please contact your sales representative.

  • Smart Wall Socket (WS51x)

Hardware Overview

Note: Product appearance may vary based on socket types.
(No specific information provided in the manual)

Power Button and LED Patterns

Function Action LED Indicator
Open the socket to supply power Press the power button Off
Close the socket to supply power Press and hold the power button for more than 10s On
Network Status Send join network requests. Join the network successfully. Blinks once
Reset to Factory Default Quickly blinks

Note

  1. Network status will only display when LED is enabled and on.
  2. If WS51x still fails to join the network after 32 join requests, the LED will stop blinking.

Safety Precautions
Milesight will not shoulder responsibility for any losses or damages resulting from not following the instructions of this operating guide.

  • The device must not be modified in any way.
  • In order to protect the security of the device, please change the device password when first configuration. The default password is 123456.
  • The device is intended for indoor use only. Do not place the device where the temperature is below/above the operating range.
  • Do not overload the maximum capacity to avoid damaging the device.
  • Do not place the device close to naked flames, heat sources (such as oven or sunlight), cold sources, liquid, and objects with extreme temperature changes.
  • Use the device in a clean environment only. Dusty or dirty environments may prevent the proper operation of this device.
  • The device must never be subjected to physical shocks or strong vibration.

Milesight-WS51x LoRaWAN-Smart Wall-Socket 21

Declaration of Conformity
WS51x is in conformity with the essential requirements and other relevant provisions of the CE, FCC, and RoHS.Copyright © 2011-2023 Milesight. All rights reserved.
All information in this guide is protected by copyright law. Whereby, no organization or individual shall copy or reproduce the whole or part of this user guide by any means without written authorization from Xiamen Milesight IoT Co., Ltd.Milesight-WS51x LoRaWAN-Smart Wall-Socket 22

Revision History

Date Doc Version Description
July 15, 2023 V 1.0 Initial version

Product Introduction

Overview
WS51x is an in-wall smart socket panel with a stylish and minimalist design that combines power control and electricity consumption statistics features. It can intelligently manage appliances and promote the scientific use of electricity. The product offers various power control methods, such as local button control and remote control through wireless LoRaWAN® network communication. WS51x is compatible with Milesight’s LoRaWAN® gateway and IoT Cloud solution, which allows for remote monitoring and control via a webpage or mobile App, triggered by other Milesight sensors. Designed for in-wall installation, WS51x has broad applications in smart homes, smart offices, smart campuses, and other scenarios.

Features

  • Turn on/off devices and create delay switch-on/off schedules remotely
  • Collect current, voltage, power, electrical consumption and support overload protection
  • Elaborate structural and safety door design for both safe usage and convenient installation
  • Easy configuration via NFC
  • Function well with standard LoRaWAN® gateways and network servers
  • Standard LoRaWAN® technology
  • Compatible with Milesight IoT Cloud
  • Support Milesight D2D protocol to enable ultra-low latency control without gateway
  • Support multicast for control in bulk

Hardware Introduction

Packing ListMilesight-WS51x LoRaWAN-Smart Wall-Socket (21)

If any of the above items is missing or damaged, please contact your sales representative.

Hardware Overview

Milesight-WS51x LoRaWAN-Smart Wall-Socket (1)

Note: Product appearance will differ according to socket types.

Power Button and LED Patterns

Function Action LED Indicator
Open the socket to
supply power
Press the power button. Off → On
Close the socket to supply power On → Off
Network Status Send join network requests. Blinks once
Join the network successfully. Blinks twice
Reset to Factory Default Press and hold the power button for more than 10s. Quickly blinks

Note

  1. Network status will only display when LED is enabled and on.
  2. If WS51x still fails to join the network after 32 join requests, the LED will stop blinking.
  3. Reset operation is not affected even if the button lock is enabled or the LED indicator is disabled.

Dimensions (mm)
EU Type

Milesight-WS51x LoRaWAN-Smart Wall-Socket (2)

FR TypeMilesight-WS51x LoRaWAN-Smart Wall-Socket (3)

Installation

Installation Note

  • The installation and maintenance must be conducted by a qualified service person and should strictly comply with the electrical safety regulations of the local region.
  • In order to realize the best data transmission, ensure the device is within the signal range of the LoRaWAN® gateway and keep it away from metal objects and obstacles.
  • Ensure the breaker is powered off during the installation.
  • Do not dig the screw holes on the enclosure of this device, otherwise it will break this device.
  • The nominal cross-sectional area of electrical wires should be not more than 2.5 mm2, otherwise the wires will be easy to drop from the device.
  • It is suggested to mount the socket with default mounting screws. If using other screws, ensure the width of screw head is not more than 9mm, otherwise it will break the device.
  • Ensure the width of socket box is more than 40mm.
  • Do not leave any object inside the socket box during installation.

Installation Steps

  1. Ensure the circuit has been turned off and the old socket has been removed.
  2. Open the face plate of WS51x wall socket.
  3. Loose the screws next to the holes and connect corresponding wires to the WS51x socket. Milesight-WS51x LoRaWAN-Smart Wall-Socket (4)
  4. Fix the socket to the socket box with mounting screws, then attach the face plate back onto the socket. Milesight-WS51x LoRaWAN-Smart Wall-Socket (5)

Operation Guide

NFC Configuration
WS51x can be configured via an NFC supported mobile phone.

  1. Download and install “Milesight ToolBox” App from Google Play or Apple App Store.
  2. Enable NFC on the smartphone and open Milesight ToolBox.
  3. Attach the smartphone to the NFC area of the socket, click NFC Read to read device information. Milesight-WS51x LoRaWAN-Smart Wall-Socket (6)
  4. Basic information and settings of WS51x socket will be shown on the ToolBox if it’s recognized successfully. You can read and configure the device by tapping the Read/Write button on the App. In order to protect the security of devices, password validation is required when first configuration. The default password is 123456.

Note

  1. Ensure where is the NFC area on your smartphone, and it’s recommended to take off the phone case.
  2. If the smartphone fails to read/write configurations via NFC, keep the phone away and back to try again.
  3. WS51x can also be configured by ToolBox software via a dedicated NFC reader provided by Milesight IoT.

LoRaWAN Settings
LoRaWAN settings are used to configure the data transmission parameters in the LoRaWAN® network.

Basic Settings
WS51x supports basic configurations like join type, App EUI, App Key and other information. You can also keep all settings unchanged by default.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (7)

Parameters Description
Device EUI Unique ID of the device which can also be found on the label.
App EUI The default App EUI is 24E124C0002A0001.
Application Port The port used for sending and receiving data, the default port is 85.
Join Type OTAA and ABP modes are both available.
Application Key The default Appkey for OTAA mode is
5572404C696E6B4C6F52613230313823.
Device Address The default DevAddr for ABP mode is the 5th to 12th digits of SN.
Network Session Key The default Nwkskey for ABP mode is 5572404C696E6B4C6F52613230313823.
Application

Session Key

The default Appskey for ABP mode is

5572404C696E6B4C6F52613230313823.

LoRaWAN Version V1.0.2 and V1.0.3 are available.
Work Mode It’s fixed as Class C.
RX2 Data Rate RX2 data rate to receive downlinks or Milesight D2D commands.
RX2 Frequency RX2 frequency to receive downlinks or Milesight D2D commands. Unit: Hz
 

Confirmed Mode

If the device does not receive ACK packet from network server, it will resend

data once.

 

 

 

 

 

Rejoin Mode

Reporting interval ≤ 35 mins: the device will send a specific number of LinkCheckReq MAC packets to the network server every reporting interval or 2*reporting interval to validate connectivity; If there is no response, the device will re-join the network.

Reporting interval > 35 mins: the device will send a specific number of LinkCheckReq MAC packets to the network server every reporting interval to validate connectivity; If there is no response, the device will re-join the

network. Only OTAA mode supports rejoin mode.

Set the number of

packets sent

When rejoin mode is enabled, set the number of LinkCheckReq packets sent.

Note: the actual sending number is Set the number of packets sent + 1.

ADR Mode Allow the network server to adjust the data transmission rate of the device.
Spread Factor If ADR is disabled, the device will send data via this spread factor.
Tx Power Transmit power of the device.

Note

  1. Please contact sales representative for device EUI list if there are many units.
  2. Please contact sales representative if you need random App keys before purchase.
  3. Select OTAA mode if you use Milesight IoT Cloud to manage devices.

Frequency Settings
Select supported frequency and channels to send uplinks. Make sure the channels match the LoRaWAN® gateway.

Note: When Single-Channel Mode is enabled, only one channel can be selected to send uplinks and the ADR will not work. Please enable Single-Channel Mode if you connect the device to

DS7610.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (8)If device frequency is one of CN470/AU915/US915, you can enter the index of the channel that you want to enable in the input box, making them separated by commas.

  • Examples
    1, 40: Enabling Channel 1 and Channel 40
  • 1-40: Enabling Channel 1 to Channel 40
  • 1-40, 60: Enabling Channel 1 to Channel 40 and Channel 60
  • All: Enabling all channels
  • Null: Indicates that all channels are disabled Milesight-WS51x LoRaWAN-Smart Wall-Socket (9)

Multicast Settings
WS51x supports setting up several multicast groups to receive multicast commands from the network server, then users can use this feature to control devices in bulks.

  • Enable Multicast Group feature on the device, and set a unique multicast address and keys to distinguish other groups. You can also keep these settings by default. Milesight-WS51x LoRaWAN-Smart Wall-Socket (10)
Parameters Description
Multicast Address Unique 8-digit address to distinguish different multicast groups.
32-digit key. Default values
 

Multicast McNetSkey

Multicast Group 1: 5572404C696E6B4C6F52613230313823
Multicast Group 2: 5572404C696E6B4C6F52613230313824 Multicast Group 3: 5572404C696E6B4C6F52613230313825
Multicast Group 4: 5572404C696E6B4C6F52613230313826
32-digit key. Default values:
 

Multicast McAppSkey

Multicast Group 1: 5572404C696E6B4C6F52613230313823 Multicast Group 2: 5572404C696E6B4C6F52613230313824
Multicast Group 3: 5572404C696E6B4C6F52613230313825
Multicast Group 4: 5572404C696E6B4C6F52613230313826
  • Add a multicast group on the network server. Take Milesight UG6x gateway as example, go to Network Server > Multicast Groups, click Add to add a multicast group.
  • Milesight-WS51x LoRaWAN-Smart Wall-Socket (11)Fill in the multicast group information the same as WS51x settings, and select the devices which you need to control, then click Save. Milesight-WS51x LoRaWAN-Smart Wall-Socket (12) Milesight-WS51x LoRaWAN-Smart Wall-Socket (13)
  • Go to Network Server > Packets, select the multicast group and fill in the downlink command, click Send. The network server will broadcast the command to devices that belong to this multicast group.
    Note: ensure all devices’ application ports are the same. Milesight-WS51x LoRaWAN-Smart Wall-Socket (14)

General Settings

Milesight-WS51x LoRaWAN-Smart Wall-Socket (15)

Parameters Description
 

Reporting Interval

The interval of reporting socket status and electrical parameters.

Default: 20 mins,
Range: 1 – 1080 mins

 

LED Indicator

Enable or disable the light indicating in chapter 2.4. This will not affect the blinks when you hold on the button to reset the device.
Power Consumption Record the power consumption. If disabled, the device will stop recording and the power consumption value will stop updating.
When Power is Restored If the device is powered off and restored, the device will switch on or off according to this parameter.
Button Lock If enabled, the power button will not be allowed to turn on/off the socket.
Overcurrent Alarm When current reaches the threshold, the device will send socket status and device electrical parameters.
Overcurrent Protection When current reaches the threshold, the device will stop supplying power.
Change Password Change the password for ToolBox App to write this device.

Note: even overcurrent alarm or overcurrent protection is disabled, the device will also stop supplying power when the current is over rated current by 30%, then send out an alarm packet.

Milesight D2D Settings
Milesight D2D protocol is developed by Milesight and used for connection among Milesight devices without gateway. When D2D setting is enabled, WS51x can work as the Milesight D2D agent device to receive commands from Milesight D2D controller devices or work as Milesight D2D controller device to send commands to trigger D2D agent devices.

  1. Ensure the RX2 datarate and RX2 frequency in LoRaWAN settings are the same as the D2D controller device.
  2. Enable D2D Agent Settings, and define a unique D2D key to be the same as the setting in D2D controller device. (Default D2D Key: 5572404C696E6B4C6F52613230313823)
  3. Define a 2-byte hexadecimal control command (0x0000 to 0xffff) and command action. For example, you can configure a control command 1510 to turn on, turn off or reverse the button as below. WS51x supports 16 control commands at most.

 

Milesight-WS51x LoRaWAN-Smart Wall-Socket (16)

Maintenance
Upgrade

  1. Download firmware from Milesight official website to your smartphone.
  2. Open ToolBox App and click Browse to import firmware and upgrade the device.

Note

  1. Operation on ToolBox is not supported during the upgrade.
  2. Only Android version ToolBox supports the upgrade feature.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (17)Backup
WS51x supports configuration backup for easy and quick device configuration in bulk. Backup is allowed only for devices with the same model and LoRaWAN® frequency band.

  1. Go to Template page on the App and save current settings as a template. You can also edit the template file.
  2. Select one template file that saved in the smartphone and click Write, then attach it to another device to write configuration.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (18)

Note: Slide the template item to the left to edit or delete it. Click the template to edit the configurations.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (19)

Reset to Factory Default
Please select one of the following methods to reset the device
Via Hardware: Hold on power button for more than 10s until LED indicator blinks.
Via ToolBox App: Go to Device > Maintenance to tap Reset, then attach smartphone with NFC area to the device to complete the reset.

Milesight-WS51x LoRaWAN-Smart Wall-Socket (20)

Device Payload

All data are based on the following format (HEX), the Data field should follow little -endian:

Channel1 Type1 Data1 Channel2 Type2 Data2 Channel 3
1 Byte 1 Byte N Bytes 1 Byte 1 Byte M Bytes 1 Byte

For decoder examples you can find at https://github.com/Milesight-IoT/SensorDecoders.

Basic Information
WS51x reports basic information of the device whenever it joins the network.

Channel Type Description
 

 

 

 

 

 

 

ff

01(Protocol Version) 11=>V1.1
09 (Hardware Version) 01 40 => V1.4
0a (Software Version) 01 14 => V1.14
0b (Power On) Device is on
16 (Serial Number) Serial number of this device, 16 digits
 

24 (Overcurrent Alarm)

Byte 1: 00-disabled, 01-enabled
Byte 2: current threshold
25 (Button Lock) 00 00-disabled, 00 80-enabled
26 (Power Consumption) 00-disabled, 01-enabled
 

30 (Overcurrent Protection)

Byte 1: 00-disabled, 01-enabled
Byte 2: current threshold

Example

ff0bff ff0101 ff166762d21130962038 ff090100 ff0a0108 ff240000 ff30010a ff250000

ff2601

Channel Type Value Channel Type Value
ff 0b

(Power On)

ff (Reserved) ff 01

(Protocol Version)

01(V1.0)
Channel Type Value Channel Type Value
 

ff

16 (Serial Number) 6762d21130

962038

 

ff

09

(Hardware Version)

 

0100 (V1.0)

Channel Type Value Channel Type Value
 

ff

0a

(Software Version)

0108 (V1.8)  

ff

24(Overcurrent Alarm) 00=disable 00=0A
Channel Type Value Channel Type Value
 

ff

30

(Overcurrent Protection)

01=enable 0a=10A  

ff

 

25 (Button Lock)

00

00=disable

Channel Type Value
ff 26 (Power

Consumption)

01=enable

Sensor Data
WS51x reports socket status and electrical data according to reporting interval (20 mins by default). Besides, when the socket status changes, the device will upload the status immediately.

Channel Type Description
03 74 (Voltage) UINT16, Unit: V

Resolution: 0.1 V

04 80 (Active Power) UINT32, Unit: W
05 81 (Power Factor) UINT8, Unit: %
06 83 (Power Consumption) UINT32, Unit: Wh
07 c9 (Total Current) UINT16, Unit: mA
08 70 (Socket Status) 00: Close/Close by Command,
10: Close by button
01: Open/Open by Command,
11: Open by button

Examples

  • Periodic package
087001 058164 07c90200 0374b208 068301000000 048001000000
Channel Type Value Channel Type Value
08 70 (Socket

Status)

01 => Open 05 81 (Power

Factor)

64=> 100%
Channel Type Value Channel Type Value
 

 

07

 

 

c9 (Current)

 

02 00=>00

02=2mA

 

 

03

 

 

74(Voltage)

b2 08=>08 b2=2226

Voltage=2226

*0.1=222.6V

Channel Type Value Channel Type Value
 

06

83(Power Consumption) 01 00 00 00=>00

00 00 01=1

Wh=0.001 kWh

 

04

80 (Active Power) 01 00 00

00=>00 00 00

01=1 W

  • Socket status change
087011
Channel Type Value
08 70 (Socket Status) 11 => Open by button

Downlink Commands
WS51x supports downlink commands to configure the device. The application port is 85 by default.

Channel Type Description
08 00 00 ff-Socket close, 01 00 ff-Socket open
 

 

 

 

 

 

 

 

 

 

 

 

 

ff

03 (Set Reporting Interval) 2 Bytes, unit: s
10 (Reboot Device) ff
22 (Add Delay Task) Byte 1: 00
Byte 2-3: delay time,
unit: s
Byte 4: 10-close, 11-open

Note: WS51x supports adding only one task. Later command will cover previous command.

23 (Delete Delay Task) 00 ff
24 (Overcurrent Alarm) Byte 1: 00-disable, 01-enable
Byte 2: current threshold
25 (Button Lock) 0000-disable, 0080-enable
26 (Power Consumption) 00-disable, 01-enable
27 (Reset Power Consumption) ff
28 (Enquire Electrical Status) ff
2f (LED Indicator) 00-disable, 01-enable
30 (Overcurrent Protection) Byte 1: 00-disable, 01-enable
Byte 2: current threshold
a5 (Socket Status Reverse) 01

Examples

  • Open the supply of the socket.
080100ff
Channel Command
08 01 00 ff=>Open
  • Set reporting interval as 20 minutes.
ff03b004
Channel Type Value
ff 03 (Set Reporting Interval) b0 04 => 04 b0 = 1200 s = 20 minutes
  • Add a delay task: open the socket after 1 minute
ff22003c0011
Channel Type Value
ff 22 Byte 1:00
(Add Delay Task) Byte 2-3: 3c 00=>00 3c=60s=1min
Byte 4: 11=>open
  • Delete the delay task.
ff2300ff
Channel Type Value
ff 23 (Delete Delay Task) 00ff
  • Enable overcurrent alarm and protection and set current threshold as 10A.
ff24010a ff30010a
Channel Type Value Channel Type Value
 

 

ff

24

(Overcurrent Alarm)

Byte 1: 01=>enable Byte

2:0a=>10A

 

 

ff

30

(Overcurrent Protection)

Byte 1: 01=>enable Byte

2:0a=>10A

  • Reboot the device.
ff10ff
Channel Type Value
ff 10 (Reboot Device) ff (Reserved)
  • Disable the LED indicator.
ff2f00
Channel Type Value
ff 2f (LED Indicator) 00=disable

Documents / Resources

Milesight WS51x LoRaWAN Smart Wall Socket [pdf] User Guide
WS51x LoRaWAN Smart Wall Socket, WS51x, LoRaWAN Smart Wall Socket, Smart Wall Socket, Wall Socket, Socket

References

Leave a comment

Your email address will not be published. Required fields are marked *