IQ Switch PowerSense Series VSNW-XX (R/WH) VEKIN Switch Normal Wi-Fi Setup Guide Author: Wynand Terblanche Version: 3.0 Date: 2020/01/29 1 Introduction 1.1 Background This document provides guidelines to set up the VEKIN switch normal Wi-Fi (VSNW-XX) series switches with a touch interface, Wi-Fi connectivity and power measurement functionalities. This series also supports Apple HomeKit, Amazon Alexa, Google Assistant, MQTT and a customizable Android Application. The document is updated with added features and builds on version 1.0 of the Setup Guide and Client Requirements.
- Added setup instructions for iOS Device Support (Apple HomeKit)
- Added setup instructions for Android Device Support (Amazon Alexa/Google Assistant) 1.2 Version Updates
- Updated maximum load power specifications
- Updated power measurement tolerance
- Corrected terminology
- Added setup instructions for MQTT control
- Updated pictures
- Updated model number 1.3 Switch Specifications The specification of the switch is set out in Table 1. Table 1: Switch Specifications System parameters Proposed design Number of Channels 1-, 2- and 3-Gang versions (See Table 2) Total Power 600W (Per Gang) Operating Voltage Range Frequency Surge Protection 110 - 265VAC 50/60Hz Up to1.5kV IQ Switch PowerSense Series Wireless Wireless Standard Touch UI Power Measurement Total Load Up to 5% Accuracy Application Programme Interface Wi-Fi 2.4GHz IEEE 802.11 b/g/n 1, 2 and 3 Button versions Apple HomeKit Amazon Alexa Google Assistant MQTT Protocol Backlighting System Wiring Dimmable (Logo and Touch UI) Live, Neutral and L+ for each gang Power Failure Memory Feature Yes Load Type Multiple (Light, Extractor Fans, etc.) The switch is proposed as three variants, 1-, 2- and 3-gang. The maximum power output of the switch is 1800W, resulting in the following ratings per variant:
Table 2: Power Ratings per Variant (@230VAC) System parameters 1 Gang 2 Gang 3 Gang Unit
(VSNW-XX-1)
(VSNW-XX-2)
(VSNW-XX-3) Power per Gang Current per Gang 600 2.6 600 2.6 600 2.6 W A 2 Switch Connection The switch should be wired as shown below. Both LIVE and NEUTRAL connections are required at the switch to operate. The load is connected between the L1, L2 or L3 and N terminals. IQ Switch PowerSense Series Maximum 600W Maximum 600W Maximum 600W Figure 1: Hardware Connection Diagram 3 Wireless Control Setup 3.1 Initial Startup Each switch is pre-loaded with software and set up to function out of the box. If the client provided the operating mode during production, the switch will automatically boot into the preferred mode when powered up for the first time. If not, the switch will not attempt to connect to a Wi-Fi network on initial power up and requires set up for wireless control by using Apple HomeKit, Amazon Alexa, Google Assistant and/or MQTT. The following section summarizes the network configuration options for wireless control. 3.1 Entering Network Setup A local webserver will automatically be activated when the switch is reset by either a MQTT command or touch buttons. The switch will make a Wi-Fi access point to which the installer can connect to by using a mobile device or computer directly. A browser can then be used to enter the unique IP address and enter the webserver hosted by the switch. This will allow the installer to enter/update the operation mode, network setup and MQTT information. The following steps describe the process to set up the network settings on the switch from a reset state. 1. Get the switch in a reset state:
VSNW-XX-1 (1-gang):
- From a state where the touch button is blue (load switched off), press and hold the button for more than 30 seconds (do not release during the 30s). IQ Switch PowerSense Series Figure 2: Hold down the button (>30s) to enter network configuration mode VSNW-XX-2 (2-gang):
- From a state where both touch buttons are blue (loads switched off), press and hold the two buttons simultaneously for more than 15 seconds. Figure 3: Hold down the two buttons (>15s) to enter network configuration mode VSWN-XX-R-3 (3-gang):
- From a state where all touch buttons are blue (loads switched off), press and hold all three buttons simultaneously for more than 15 seconds. IQ Switch PowerSense Series Figure 4: Hold down all three buttons (>15s) to enter network configuration mode The unit will enter network configuration mode and the touch buttons will remain dark blue in color. The VEKIN logo will also start to flash slowly (breathing effect). The unit will now activate a mobile access point/ Wi-Fi network. Please note that the switch will still be fully functional in network configuration mode. 2. Connect to the Wi-Fi Access Point:
- Connect to the specific switch using a mobile phone or computer. The Wi-Fi access point created by the switch is named after each units unique ID/MAC number. o Hotspot Name: VSNW-Y-X-xxxxxxxxxxxx Y: Production year in roman numerals (XX = 2020) X: Number of gangs (1, 2 or 3) x: 12-digit ID/MAC number (Hexadecimal format) o Password: setupsys IQ Switch PowerSense Series Figure 5: Connect to VSNW-Y-X-xxxxxxxxxxxx Wi-Fi Access Point 3. Open the Webserver:
- Open a browser on the device connected to the Wi-Fi access point and enter the necessary configuration settings and network information. o Fixed IP address: http://192.168.1.1/
IQ Switch PowerSense Series o Figure 6: Switch network setup in browser
- Select the required Switch Wireless Control Setting:
iOS (Apple HomeKit), Android (VEKIN App (Smart Life), Amazon Alexa, Google Assistant) mode Default mode, allowing the switch to be controlled by both iOS and Android mobile devices. o MQTT Broker Control and Android (VEKIN App, Amazon Alexa, Google Assistant) mode Select this mode if MQTT and Android mobile device control is required. o MQTT Broker Control mode Select this mode if the switch will only be controlled by a MQTT broker.
- Enter Wi-Fi/MQTT Network Settings (Only required for MQTT broker control) IQ Switch PowerSense Series o Only the SSID and Password is required for the network settings. The IP address and Gateway will be obtained automatically. o All MQTT information is required. o Enter 0 in the SSID and Broker areas for standalone usage or leave in iOS/Android control mode. (No Wi-Fi connectivity)
- The installer can use the Test Switch Outputs section to toggle the outputs of the switch during installation.
- Select to erase previous iOS/Android pairing settings (Only applicable for corresponding wireless control mode) o Take note that previous iOS/Android pairing settings will only be erased after the switch has rebooted into the selected wireless control mode.
- Press send after all the areas are filled in. 4. The switch will automatically store the preferred settings in memory and boot into the new wireless control mode.
- The switch is ready and online once all the touch buttons are blue.
It will send subscription topics information to the MQTT broker to confirm successful connection (MQTT mode selected).
- The switch will be ready to connect to iOS and Android devices if not paired before or automatically connect to the previous paired devices. 5. Once the switch is configured, use the guidelines below to set up mobile phones. 3.2 iOS Device Control Setup To connect the switch to your Apple Home cellphone application, please follow the steps below:
1. Connect your iOS device to some 2.4GHz Access Point (Wi-Fi network). 3. Get the switch into a reset state by erasing the previously paired device. Following the 2. Make sure the switch is powered up. instructions below for each of the variants:
VSNW-XX-1 (1-gang) o Press and hold the touch button for longer than 15 seconds (but less than 30 seconds) to erase the previously paired iOS device. The backlighting will turn cyan and back to blue when reset successfully. Take note that if the button is touched for longer than 30 seconds, the switch will enter the configuration mode. IQ Switch PowerSense Series Figure 7: Hold down the button (>15s, release before 30s) to erase the previously paired iOS device VSNW-XX-2 (2-gang) o Press and hold the left touch button for longer than 15 seconds to erase the previously paired iOS device. The backlighting will turn cyan and back to blue when reset successfully. Figure 8: Hold down the left button (>15s) to erase the previously paired iOS device VSNW-XX-3 (3-gang) o Press and hold the left and middle touch buttons for longer than 15 seconds to erase the previously paired iOS device. The backlighting will turn cyan and back to blue when reset successfully. IQ Switch PowerSense Series Figure 9: Hold down the left and middle button (>15s) to erase the previously paired iOS device 4. Create a Home using the Home app on the iOS device. 5. Select Add Accessory option. 6. Scan the QR code located on the back of the switch. 7. Alternatively, select the Dont Have a Code or Cant Scan? option at the bottom, select the VSNW-Y-X accessory and manually enter the pairing code (also visible on the back of the switch). 8. The iOS will then provision the accessory (using WAC2) so that it joins the Wi-Fi network and pair with it using the provided HomeKit code. 9. After the process completes, you can give a User-Friendly name to the accessory and assign it to any room if required. 3.3 Android Device Control Setup To connect the switch to your android (operating system) mobile phone, please follow the steps below:
1. Connect your iOS device to some 2.4GHz Access Point (Wi-Fi network). 2. Download the Smart Life Application from the Google Play store:
https://play.google.com/store/apps/details?id=com.tuya.smartlife 3. Create a new account or sign in with your login details on the Smart Life App. 4. Once logged in, get the switch into a reset state by erasing the previously paired device. Following the instructions below for each of the variants:
VSNW-XX-1 (1-gang) o Press and hold the touch button for longer than 15 seconds (but less than 30 seconds) to erase the previously paired android device. The backlighting will turn IQ Switch PowerSense Series cyan and back to blue when reset successfully. Take note that if the button is touched for longer than 30 seconds, the switch will enter the configuration mode. Figure 10: Hold down the button (>15s, release before 30s) to erase the previously paired android device VSNW-XX-2 (2-gang) o Press and hold the right touch button for longer than 15 seconds to erase the previously paired android device. The backlighting will turn cyan and back to blue when reset successfully. Figure 11: Hold down the right button (>15s) to erase the previously paired android device VSNW-XX-3 (3-gang) o Press and hold the middle and right touch buttons for longer than 15 seconds to erase the previously paired android device. The backlighting will turn cyan and back to blue when reset successfully. IQ Switch PowerSense Series Figure 12: Hold down the middle and right button (>15s) to erase the previously paired android device IQ Switch PowerSense Series Add Device. 5. Once the VEKIN logo starts to blink rapidly, go back to the Smart Life App and click on Figure 13: Add a new device in the Smart Life App IQ Switch PowerSense Series 6. Under Electrical Engineering Devices and the Add Manually tab, select the Switch appliance as shown in Figure 14. Figure 14: Select the Switch appliance in the Smart Life App IQ Switch PowerSense Series 7. Confirm that the VEKIN logo is still blinking rapidly. Figure 15: Confirm VEKIN logo blinks rapidly in the Smart Life App IQ Switch PowerSense Series 8. The Smart Life will search for the switch and configure the network settings automatically. Figure 16: Screen shown in Smart Life App during network configuration 9. Once the connection between the Smart Life App and the switch has successfully been established, the device will appear in the main window (Figure 13). IQ Switch PowerSense Series 3.4 Amazon Alexa and Google Home Control In order to control the switch with Amazon Alexa and Google Assistant, access should be given to the Smart Life App from both the 3rd party applications. Follow the steps below to set up these applications:
1. Download the Amazon Alexa application from the Google Play store on the android device (with Smart Life App installed):
https://play.google.com/store/apps/details?id=com.amazon.dee.app&hl=en 2. Create an account and configure your Amazon Echo by following the instructions provided with your Echo. Alexa App menu. 3. Once your Echo is configured, enable the Smart Life skill under the Skills tab in the Figure 17: Select Skill Menu in Alexa App 4. Enter the Smart Life App account and password, then tap Link Now to link your Smart Life account to enable the Skill. IQ Switch PowerSense Series Figure 18: Enable Smart Life Skill in Alexa App 5. Once done, search for new devices in the main window. Your VSNW-Y-X switch should appear as 2, 3 or 4 devices, a switch for each gang and one main switch. 6. Please change the name of the device to an easily identifiable name so that it is easier for Alexa to switch on your lights. Names are usually in English. 7. Download the Google Home application from the Google Play store on the android device (with Smart Life App installed):
https://play.google.com/store/apps/details?id=com.google.android.apps.chromecast.ap p&hl 8. Open the Google Home App on your phone to set up your Google Home device. You will be prompted to log in with your Google account. Follow the setup instructions received with your Google Home device. IQ Switch PowerSense Series 9. Once your Google Home is successfully set up, on the main page of the Google Home App, tap the sidebar menu in the top left corner and select Home Control. Figure 19: Select Home control in the sidebar menu 10. Then tap the plus sign in the lower right corner and search for Smart Life. Figure 20: Link Google Home with Smart Life App 11. Find Smart Life on the list and open it, select the country where your Smart Life App account is located, enter your Smart Life App account and password, and tap Link Now. IQ Switch PowerSense Series 12. Choose the room where your device is located, the skill will appear on the Home Control Device list. The VSNW-Y-X switch will automatically appear in this area and is now ready to be used. 4 Operating the Switch 4.1 Touch User Interface The touch buttons control each gang individually and acts as a physical user interface. These buttons will function even if the switch is not connected to a wireless network. With each touch, the connected load will either switch on or off. The backlighting for each touch button will light up green if the gang is switched on and will remain blue in color while the gang is switched off. Figure 21: VSNW-XX-3 sample touch interface Note that each gang is synchronized with the Home/Smart Life App on the iOS and Android devices. Each touch interaction will also reflect on the MQTT broker (if a wireless network is established and MQTT wireless mode selected). 4.2 HomeKit App Control The switch will be visible in the Home app as four individual services. The Home app will automatically generate a service for each gang and display it as an on/off switch. The fourth service will be displayed as a light service in the Home app and can be used to control the backlighting of the switch. IQ Switch PowerSense Series Figure 22: Switch services visible in the Home App (iOS) for VSNW-XX-3 Each service can be updated by clicking on the icons from the home screen. Additional services
(such as backlight dimming) can be controlled by pressing and holding on the service icon. Figure 23 shows an example of the backlight additional service. The switch setting is accessible by clicking on the Settings icon in the additional service display. Figure 23: Additional service example in the Home App (iOS) IQ Switch PowerSense Series 4.3 Smart Life App Control The Smart Life App will display three on/off buttons for the individual gangs. An additional button allows all gangs to be switched on or off at once. The Smart Life App will also display real time power consumption data as current (mA), voltage (V) and power (W). The individual switches and one main switch will be visible in both Amazon Alexa and Google Home/Assistant if configured correctly. Figure 24 shows an example of the VSNW-XX-3 switch in Amazon Alexa, while Figure 25 shows the Google Home integration. Figure 24: Switches visible in Amazon Alexa App for VSNW-XX-3 IQ Switch PowerSense Series Figure 25: Switches visible in Google Home App for VSNW-XX-3 IQ Switch PowerSense Series 4.4 MQTT Command Structure 4.4.1 MQTT Topic and Message Definitions The switch can be controlled by the following MQTT command structure:
MQTT Topic MQTT Message VSNW / IDxxxxxxxxxxxx / Select Command = Value = Signature where:
- VSNW: Classify type of device to communicate to (For future projects, controlling other types of devices such as air-conditioning systems).
IDxxxxxxxxxxxx: Unique switch ID to communicate to, where xxxxxxxxxxxx is the 12-
digit (6 bytes) device MAC address.
- Select: Select a switch channel/gang or group to modify.
- Command: Command byte to execute certain operations/tasks.
- Value: Value byte for the selected command.
- Signature: Data encryption message signature set together by using the unique ID of each device. (Not implemented) The MQTT command structure has various options as listed below. The selection of variables described above exists for each switch and the broker/server has the freedom to communicate to individual or multiple units at the same time. Table 3: MQTT Command Set MQTT Topic MQTT Message Switch Actions Default Values 0: Off IDxx ID552467
(Example ID) Select Command Value CH1 PowerLevel 0-1 Switch Gang 1, 0: Off, 1: On CH2 PowerLevel
(or P) GroupSelect
(or P) GroupSelect CH3 PowerLevel
(or P) 0-2 0-1 0-2 0-1 0: No Group, 1: Group 1, 2: Global 0: No Group Switch Gang 2, 0: Off, 1: On 0: Off 0: No Group, 1: Group 1, 2: Global 0: No Group Switch Gang 3, 0: Off, 1: On 0: Off GroupSelect 0-2 0: No Group, 1: Group 1, 2: Global 0: No Group ResetAndroid n/a n/a IQ Switch PowerSense Series GROUP PowerLevel 0-1 0: Off
(or P) CONFIG Reboot n/a ResetMCU n/a PowerMemory Enable/Disable ResetIOS n/a BackLight 0-100 POW Report Enable/Disable SampleInterval 1-60 GetPower n/a Switch Gang On/Off for group (Selected Switches) Reboot the master MCU of switch Activates the switch configuration mode
(webserver) Enable or disable memory feature for power failure Reset Vekin APP, Amazon Alexa and Google Assistant Configuration Reset Apple HomeKit Configuration Adjust Brightness of LED Backlighting (%) Enable or disable power consumption MQTT report Adjust power consumption sampling and reporting interval
(Seconds) Sends power (W) consumption of selected switch via MQTT Enable or disable Vekin format reporting
(Format: CH1_Level :
CH2_Level :
CH3_Level : Power) Adjust the reporting interval of the Vekin format reporting Switch Gang On/Off for global (All switches selected on Global) Default values not re-loaded Default values not re-loaded Enable n/a 100%
Enable 15s n/a 10s 0: Off VEK Report Enable/Disable Enable ReportInterval 1-250 GLOBAL n/a PowerLevel 0-1
(or P) IQ Switch PowerSense Series Contact Information Physical Address Postal Address USA 6507 Jester Blvd Bldg 5, suite 510G Austin TX 78750 USA 6507 Jester Blvd Bldg 5, suite 510G Austin TX 78750 USA Fax Email
+1 512 672 8442 info@azoteq.com Asia Rm1227, Glittery City Shennan Rd Futian District Shenzhen, 518033 China Rm1227, Glittery City Shennan Rd Futian District Shenzhen, 518033 China ext 808 info@azoteq.com South Africa 1 Bergsig Avenue Paarl 7646 South Africa PO Box 3534 Paarl 7620 South Africa
+27 21 863 1512 info@azoteq.com Tel
+1 512 538 1995 +86 755 8303 5294
+27 21 863 0033 Please visit www.azoteq.com for a list of distributors and worldwide representation. The following patents relate to the device or usage of the device: US 6,249,089; US 6,952,084; US 6,984,900; US 8,395,395; US 8,531,120; US 8,659,306; US 9,209,803; US 9,360,510; US 9,496,793; US 9,709,614; US 9,948,297; EP 2,351,220; EP 2,559,164; EP 2,748,927; EP 2,846,465; HK 1,157,080; SA 2001/2151; SA 2006/05363; SA 2014/01541; SA 2017/02224;
AirButton, Azoteq, Crystal Driver, IQ Switch, ProxSense, ProxFusion, LightSense, SwipeSwitch, and the logo are trademarks of Azoteq. The information in this Datasheet is believed to be accurate at the time of publication. Azoteq uses reasonable effort to maintain the information up-to-date and accurate, but does not warrant the accuracy, completeness or reliability of the information contained herein. All content and information are provided on an as is basis only, without any representations or warranties, express or implied, of any kind, including representations about the suitability of these products or information for any purpose. Azoteq disclaims all warranties and conditions with regard to these products and information, including but not limited to all implied warranties and conditions of merchantability, fitness for a particular purpose, title and non-infringement of any third party intellectual property rights. Azoteq assumes no liability for any damages or injury arising from any use of the information or the product or caused by, without limitation, failure of performance, error, omission, interruption, defect, delay in operation or transmission, even if Azoteq has been advised of the possibility of such damages. The applications mentioned herein are used solely for the purpose of illustration and Azoteq makes no warranty or representation that such applications will be suitable without further modification, nor recommends the use of its products for application that may present a risk to human life due to malfunction or otherwise. Azoteq products are not authorized for use as critical components in life support devices or systems. No licenses to patents are granted, implicitly, express or implied, by estoppel or otherwise, under any intellectual property rights. In the event that any of the abovementioned limitations or exclusions does not apply, it is agreed that Azoteqs total liability for all losses, damages and causes of action (in contract, tort (including without limitation, negligence) or otherwise) will not exceed the amount already paid by the customer for the products. Azoteq reserves the right to alter its products, to make corrections, deletions, modifications, enhancements, improvements and other changes to the content and information, its products, programs and services at any time or to move or discontinue any contents, products, programs or services without prior notification. For the most up-to-date information and binding Terms and Conditions please refer to www.azoteq.com. www.azoteq.com/ip info@azoteq.com FCC Statement This device complies with part 15 of the FCC rules. Operation is subject to the following two conditions: (1) this device may not cause harmful interference, and (2) this device must accept any interference received, including interference that may cause undesired operation. Changes or modifications not expressly approved by the party responsible for compliance could void the user's authority to operate the equipment. This equipment has been tested and found to comply with the limits for a Class B digital device, pursuant to part 15 of the FCC Rules. These limits are designed to provide reasonable protection against harmful interference in a residential installation. This equipment generates, uses and can radiate radio frequency energy and, if not installed and used in accordance with the instructions, may cause harmful interference to radio communications. However, there is no guarantee that interference will not occur in a particular installation. If this equipment does cause harmful interference to radio or television reception, which can be determined by turning the equipment off and on, the user is encouraged to try to correct the interference by one or more of the following measures:
Reorient or relocate the receiving antenna. Increase the separation between the equipment and receiver. Connect the equipment into an outlet on a circuit different from that to which the receiver is connected. Consult the dealer or an experienced radio/TV technician for help. Radiation Exposure Statement This equipment complies with FCC radiation exposure limits set forth for an uncontrolled environment. This equipment should be installed and operated with minimum distance 20cm between the radiator and your body.