Milesight Ws50x Smart Lorawan Wall Switch User Guide

Milesight Ws50x Smart Lorawan Wall Switch User Guide

Milesight logoWS50x Smart LoRaWAN Wall Switch
WS50x
User Guide 

Safety Precautions

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

  • 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.
  • Ensure the breaker is powered out during the installation.
  • Do not leave any object inside the switch box when installation.
  • 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 configuring. The default password is 123456.
  • 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.
  • Do not overload the maximum capacity to avoid damaging the device.
  • The device is intended for indoor use only.
  • Do not place the device where the temperature is below/above the operating range.
  • Do not place the device close to naked flames, heat source (such as oven or sunlight), cold source, 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
WS50x is in conformity with the essential requirements and other relevant provisions of the CE, FCC, and RoHS.
Milesight WS50x Smart LoRaWAN Wall Switch - iconCopyright © 2011-2022 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 WS50x Smart LoRaWAN Wall Switch - figFor assistance, please contact Milesight technical support:
Email: [email protected]
Tel: 86-592-5085280
Fax: 86-592-5023065
Address: Building C09, Software Park III, Xiamen 361024, China

Revision History

DateDoc VersionDescription
June 24, 2022V 1.0Initial version

Product Introduction

1.1 Overview
WS50x is a smart LoRaWAN® wall switch for the local and remote control of lights and electrical appliances. It adopts two standard sizes for most of international wall switch types, which can replace the traditional wall switches directly. Compliant with the Milesight LoRaWAN® gateway and Milesight IoT Cloud solution, WS50x can be monitored and controlled via a web page or mobile App remotely and triggered by other Milesight sensors. Besides LoRaWAN®, WS50x supports Milesight LoRa D2D communication protocol, which can set up a connection quickly and be controlled without a gateway. WS50x can be widely used for wireless control of indoor lights, fans, heaters, machines, etc.
1.2 Features

  • Support local or remote control via a relay with high-reliability
  • Support surge protection, and overload protection to prevent the device from being damaged
  • Collect data of current, voltage, power, and electrical consumption
  • Built-in switch indicator for easy use in dark environment
  • Up to 15 km communication range
  • Easy configuration via NFC
  • Standard LoRaWAN® technology
  • Compatible with Milesight IoT Cloud
  • Support Milesight LoRa D2D protocol to enable ultra-low latency control without gateway
  • Support multicast for control in bulk

Hardware Introduction

2.1 Packing ListMilesight WS50x Smart LoRaWAN Wall Switch - Packing List

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

2.2 Hardware Overview
Milesight WS50x Smart LoRaWAN Wall Switch - Hardware O
2.3 Dimensions (mm)
Milesight WS50x Smart LoRaWAN Wall Switch - Dimensions2.4 Wiring Diagram
Milesight WS50x Smart LoRaWAN Wall Switch - Wiring Diagram

Installation

  1. Ensure the circuit has been shut off and the old switch has been taken off.
  2. Open the front panel of the WS50x switch.
    Milesight WS50x Smart LoRaWAN Wall Switch - front pane
  3. Connect corresponding wires to the WS50x switch.
    Milesight WS50x Smart LoRaWAN Wall Switch - front pane 1
  4. Fix the WS50x switch to the switch box with mounting screws, then fix the front panel back to the device.
    Milesight WS50x Smart LoRaWAN Wall Switch - front pane 2

Operation Guide

4.1 NFC Configuration
WS50x can be configured via an NFC-supported mobile phone.

  1. Download and install the “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 switch to read device information.
    Milesight WS50x Smart LoRaWAN Wall Switch - Wiring Diagram 2
  4. Basic information and settings of the WS50x switch 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 configuring. 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. WS50x can also be configured by ToolBox software via a dedicated NFC reader provided by Milesight IoT.

4.2 LoRaWAN Settings
LoRaWAN settings are used to configure the data transmission parameters in the LoRaWAN® network.
4.2.1 Basic Settings
WS50x supports basic configurations like join type, App EUI, App Key and other information. You can also keep all settings unchanged by default.
Milesight WS50x Smart LoRaWAN Wall Switch - setting

Parameters

Description

Device EUIThe unique ID of the device can also be found on the label.
App EUIDefault App EUI is 24E124C0002A0001.
Application PortThe port used for sending and receiving data, the default port is 85.
Join TypeOTAA and ABP modes are both available.
Application KeyApply for OTAA mode is default as 5572404C696E6B4C6F52613230313823.
Device AddressDevendra for ABP mode is default as the 5th to 12th digits of SN.
Network Session KeyWhiskey for ABP mode is default as 5572404C696E6B4C6F52613230313823.
Application Session KeyAppskey for ABP mode is default as 5572404C696E6B4C6F52613230313823.
LoRaWAN VersionV1.0.2 and V1.1.0 are available.
Work ModeThis device supports Class C only.
RX2 Data RateRX2 data rate to receive downlinks or LoRa D2D commands.
RX2 Frequency/MHzRX2 frequency to receive downlinks or LoRa D2D commands.
Confirmed ModeIf the device does not receive an ACK packet from a network server, it will resend data once.
Rejoin ModeThe device will send a specific number of LinkCheckReq MAC packets to the network server every 30 mins to validate connectivity; If there is no response, the device will re-join the network.
ADR ModeAllow the network server to adjust the data transmission rate of the device.
Spread FactorIf ADR is disabled, the device will send data via this spread factor.
Tx PowerTransmit power of the device.

Note:

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

4.2.2 Frequency Settings
Select supported frequency and channels to send uplinks. Make sure the channels match the LoRaWAN® gateway.
Milesight WS50x Smart LoRaWAN Wall Switch - setting 1If the 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 disabledMilesight WS50x Smart LoRaWAN Wall Switch - setting 2Note: For the -868M model, the default frequency is EU868; For the -915M model, the default frequency is AU915.
4.2.3 Multicast Settings
WS50x 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. 1. Enable Multicast Group on WS50x, and set a unique multicast address and keys to distinguish other groups. You can also keep these settings by default.
Milesight WS50x Smart LoRaWAN Wall Switch - setting 3

ParametersDescription
Multicast AddressUnique 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 McAppSkeyMulticast Group 1: 5572404C696E6B4C6F52613230313823
Multicast Group 2: 5572404C696E6B4C6F52613230313824
Multicast Group 3: 5572404C696E6B4C6F52613230313825
Multicast Group 4: 5572404C696E6B4C6F52613230313826

32. Add a multicast group on the network server. Take Milesight UG6x gateway as an example, go to “Network Server -> Multicast Groups”, and click “Add” to add a multicast group.
Milesight WS50x Smart LoRaWAN Wall Switch - setting 4Fill in the multicast group information the same as WS50x settings, and select the devices which you need to control, then click “Save”.
Milesight WS50x Smart LoRaWAN Wall Switch - setting 5Milesight WS50x Smart LoRaWAN Wall Switch - setting 63. 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 WS50x Smart LoRaWAN Wall Switch - setting 74.3 General SettingsMilesight WS50x Smart LoRaWAN Wall Switch - setting 8

ParametersDescription
 Reporting IntervalThe interval of reporting switch status and electrical parameters. Default: 20 mins, Range: 1 – 1080 mins
 LED IndicatorEnable or disable the light of switch button. This will not affect the blinks when you hold on switch buttons to reset the device.
Power ConsumptionRecord the power consumption. If disabled, the device will stop recording and the power consumption value will stop updating.
When Power is RestoredIf the device is powered off and restored, the device will change according to this parameter.
 Button LockIf enabled, all switch buttons will not be allowed to turn on/off or reset to factory default.
Change PasswordChange the password for ToolBox App to write this device.

4.4 LoRa D2D Settings
Lora D2D protocol is developed by Milesight and used for connection among Milesight devices without a gateway. When Lora D2D setting is enabled, WS50x can work as the LoRa D2D agent device to receive commands from LoRa D2D controller devices.

  1. Ensure the RX2 datarate and RX2 frequency in LoRaWAN settings are the same as the LoRa D2D controller device.
  2. Enable the LoRa D2D feature, and define a unique LoRa D2D key to be the same as the setting in the LoRa D2D controller device. (Default LoRa 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 12ff to turn on any button as below. WS50x supports at most 16 control commands.
    Milesight WS50x Smart LoRaWAN Wall Switch - setting 9
  4. These control commands can be configured in the LoRa D2D controller device. When LoRa D2D controller device is triggered, it will send the pre-defined control commands to control the switches of WS50x to on, off or inverse status.

4.5 Maintenance
4.5.1 Upgrade

  1. Download firmware from www.milesight-iot.com 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 the Android version of ToolBox supports the upgrade feature.
    Milesight WS50x Smart LoRaWAN Wall Switch - setting 10

4.5.2 Backup
WS50x 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 the “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 is saved in the smartphone and click “Write”, then attach it to another device to write the configuration.
    Milesight WS50x Smart LoRaWAN Wall Switch - setting 11

Note: Slide the template item to the left to edit or delete it. Click the template to edit the configurations.
Milesight WS50x Smart LoRaWAN Wall Switch - setting 124.5.3 Reset to Factory Default
Please select one of the following methods to reset the device:
Via Hardware: Hold on the button for more than 10s until the button light blinks, this should ensure the button lock is disabled.
Via Toolbox App: Go to Device -> Maintenance to tap “Reset”, then attach a smartphone with an NFC area to the device to complete the reset.Milesight WS50x Smart LoRaWAN Wall Switch - setting 13

Device Payload

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

Channel1Type1Data1Channel2Type2Data2Channel 3
1 Byte1 ByteN Bytes1 Byte1 ByteM Bytes1 Byte

For decoder examples, you can find at https://github.com/Milesight-IoT/SensorDecoders.
5.1 Basic Information
WS50x reports basic information of the device whenever it joins the network.

Channel

Type

Description

ff01(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

Example:

ff0bff ff0101 ff090100 ff0a0101 ff166771c21070911328

ChannelTypeValueChannelType

Value

ff0b(Power On)ff (Reserved)ff01(Protocol Version)01(V1.0)
ChannelTypeValueChannelTypeValue
 ff09(Hardware Version) 0100 (V1.0) ff0a (Software Version)0101 (V1.1)
ChannelTypeValue
ff16 (Serial Number)6771c21070 911328

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

ChannelTypeDescription
0374 (Voltage)UINT16, Unit: V
Resolution: 0.1 V
0480 (Active Power)UINT32, Unit: W
0581 (Power Factor)UINT8, Unit: %
0683 (Power Consumption)UINT32, Unit: Wh
07c9 (Total Current)UINT16, Unit: mA
0829 (Switch Status)Bit 0: status of switch 1
Bit 1: status of switch 2
Bit 2: status of switch 3
Bit 3: reserved
Bit 4: the changing status of switch 1 Bit 5: the changing status of switch 2 Bit 6: the changing status of switch 3 Bit 7: reserved

Example:

082913 058164 07c90200 0374b208 068301000000 048001000000

ChannelTypeValueChannelType

Value

08 29 (Switch Status)13= 00010011
=> switch 1 changed to open, and switch 2 remained opened
0581 (Power Factor)64=> 100%
ChannelTypeValueChannelTypeValue
 07 c9 (Current) 

02 00=>00
02=2mA

 

03

 74(Voltage)b2 08=>08 b2=2226
Voltage=2226
*0.1=222.6V
ChannelTypeValueChannelTypeValue
 

06

83(Power Consumption)01 00 00 00=>00
00 00 01=1
Wh=0.001 kWh
 0480 (Active Power)01 00 00
00=>00 00 00
01=1 W

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

ChannelType

Description

08Byte 1:
Bit 0~3: every switch control status, 0 for close, 1 for open.
Bit 4~7: every switch change status, 0 = not
allow control, 1 = allow control Byte 2: ff
ff03 (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:
Bit 0~3: desired status for each switch. Bit 4~7: mask of switches to change, only masked switch will be changed to the desired status.
Note: WS50x supports adding only one task.
The later command will cover the previous command.
23 (Delete Delay Task)00 ff
25 (Set Button On/Off Lock)0080-disable to turn on/off via button,
0000-enable to turn on/off via a button
26 (Power Consumption)00-disable, 01-enable
27 (Reset Power Consumption)ff
28 (Enquire Electrical Status)ff
2f (Set Button Light Mode)00-disable
01- enable (Button light indicator on when switch button is off)
02- enable (Button light indicator on when the switch button is on)
5e (Set Button Reset Lock)00-enable to reset via button, 01-disable to reset via button

Example:
1. Close Switch 1 of WS501, WS502, WS503.

0810ff

ChannelType

Command

 

08

 

Byte 1: 10 => 0001 0000 (Bit 4 = 1 => Allow switch 1 control, Bit0 = 0 => Switch 1 close) Byte 2: ff is reserved

2. Set reporting interval as 20 minutes.

ff03b004

Channel

Type

Value

ff03 (Set Reporting Interval)b0 04 => 04 b0 = 1200 s = 20 minutes

3. Add a delay task: open switch 1 after 1 minute.

ff32003c002000

ChannelTypeValue
ff22 (Add Delay Task)Byte 1:00
Byte 2-3: 3c 00 => 00 3c = 60 s = 1 min
Byte 4: 11 = 0001 0001 => Open switch 1

4. Delete the delay task

ff2300ff

ChannelTypeValue
ff23 (Delete Delay Task)00ff

5. Disable the collection and upload of power consumption.

ff2600

ChannelTypeValue
ff26 (Power Consumption)00 = disable

6. Reboot the device.

ff10ff

ChannelTypeValue
ff10 (Reboot Device)ff (Reserved)

7. Disable the button light.

ff2f00

ChannelTypeValue
ff2f (Set LED Indicator Mode)00 for disable LED indicator

-END-

References

Documents / Resouces

Download manual
Here you can download full pdf version of manual, it may contain additional safety instructions, warranty information, FCC rules, etc.


Related Manuals