IQ Switch PowerSense Series Vekin Intelligent Switch Prototype - Setup Guide Author: Wynand Terblanche Version: 3.1 Date: 2019/10/18 1 Introduction 1.1 Background This document provides a setup guide for the Vekin Intelligent switch prototypes with a touch interface, Wi-Fi connectivity, movement sensing, ambient light sensing and power measurement functionalities. The document is updated with added features and builds on version 1.0 of the Setup Guide and Client Requirements. 1.2 Version Updates
- Updated power measurement tolerance
- Updated light sensor accuracy tolerance
- Added special specification for 3-gang version
- Updated operating voltage specification
- Removed touch and PIR sensitivity adjustment MQTT commands
- Corrected terminology
- Added correct model numbers to Table 2
- Added reboot command in MQTT
- Updated pictures 1.3 Intelligent Switch Specifications The specification of the intelligent switch is set out in Table 1. Table 1: Intelligent Switch Specifications System parameters Proposed design Number of Channels 1-, 2- and 3-Gang versions (See Table 2) Total Power 600W (1 & 2-Gang), 400W (3-Gang) Operating Voltage Range Frequency Surge Protection 110 - 265VAC 50Hz Up to1.5kV IQ Switch PowerSense Series Wireless Wireless Standard Touch UI Wi-Fi 2.4GHz IEEE 802.11 b/g/n 1, 2 and 3 Button versions Power Measurement Total Load Up to 5% Accuracy Ambient Light Sensing Up to 5% Accuracy in Lux Movement Sensing PIR with Wall Mounted Fresnel Lens, 3 0.5m range Application Programme Interface MQTT Protocol Dimming Algorithm Leading-edge, Trailing-edge, Leading- and Trailing-edge System Wiring Live, Neutral and L+ for each gang The intelligent switch is proposed as three variants, 1-, 2- and 3-gang. The maximum power output of the intelligent switch is 600W (400W for the 3-gang version), resulting in the following ratings per variant:
Table 2: Power Ratings per Variant (@230VAC) System parameters 1 Gang 2 Gang 3 Gang Unit
(VINT-XIX-1)
(VINT-XIX-2)
(VINT-XIX-3) Power per Gang Current per Gang 600 2.6 300 1.3 138 0.6 W A Additional system performance specifications include the following:
Multiple load type compatibility (Include incandescent/tungsten, LED loads) System over-heat protection Power failure memory feature Soft-on and soft-off feature Load power consumption measurement Ambient light sensing and reporting (Daylight harvesting applications) Movement detection and reporting Dimming algorithm selection: Leading-edge, Trailing-edge, Leading- and Trailing-edge IQ Switch PowerSense Series 2 Intelligent Switch Connection The 2-gang prototype intelligent switch is wired as shown below. Both LIVE and NEUTRAL connections are required at the intelligent switch. The load is connected between the L1 or L2 and N terminals. Figure 1: Hardware Connection Diagram 3 Network and MQTT Setup 3.1 Initial Startup Each intelligent switch is pre-loaded with software and set up to function out of the box. The intelligent switches will therefore not attempt to connect to a Wi-Fi network on initial power up and requires set up for wireless control. 3.2 Entering Network Setup A local webserver will automatically be activated when the intelligent switch is reset by either a MQTT command or touch buttons. The intelligent switch will make a hotspot available 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 intelligent switch. This will allow the installer to enter/update the network and MQTT information. The following steps describe the process to set up the network setting on the 2-gang intelligent switch from a reset state. 1. Get the intelligent switch in a reset state:
From a state where all touch buttons are blue, press and hold the buttons simultaneously for more than 10 seconds. IQ Switch PowerSense Series Figure 2: Holding down the two buttons (>10s)
The unit will enter a configuration mode and the touch buttons will remain green in color. The Vekin logo will also start to breath/flash. The unit will now activate a mobile hotspot/
Wi-Fi network. Please note that the switch will still be fully functional in the configuration mode. Figure 3: Device in configuration mode 2. Connect to the Wi-Fi hotspot:
- Connect to the specific intelligent switch using a mobile phone or computer. The hotspot made by the intelligent switch is named after each units unique ID/MAC number. o Hotspot Name: VINT-IY-X-xxxxxxxxxxxx Y: Production year X: Number of gangs x: 12 digit ID/MAC number o Password: setupsys IQ Switch PowerSense Series 3. Open the webserver:
- Open a browser on the device connected to the hotspot and enter the necessary network and MQTT information. o Fixed IP address: 192.168.1.1 IQ Switch PowerSense Series Figure 4: Intelligent switch network setup in browser 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. (No Wi-Fi connectivity). o Choose dimming technique (SMART dimming is recommended). o Press send after all the areas are filled in. o The browser will respond with the following message. IQ Switch PowerSense Series Figure 5: Web browser response after setup 4. The intelligent switch will automatically store the preferred settings after the above message is displayed and connect to the Wi-Fi network and MQTT broker.
The unit is ready and online once all the touch buttons are blue. It will also send the following information to the MQTT broker to confirm successful connection. 4 Operating the Intelligent Switch 4.1 Manually Touch Interface When all buttons are lit blue/green, the load can be controlled by the intelligent switch. 1. The intelligent switch consists of a touch button for each gang. The buttons control the light levels as follows (see Figure 6):
If pressed/touched once, from a blue state, the dim level will step to an On level. It will follow the following sequence with each short touch thereafter:
IQ Switch PowerSense Series o ON 100%
o HIGH 75%
o MED 50%
o LOW 25%
o OFF 0%
- A touch after a no-touch period of 2 seconds will switch off the load immediately (to an Off level).
- A touch and hold (long touch) will gradually dim the load until the button is released. Figure 6: Touch Dimming Sequence 2. Reset the network settings by press and holding the buttons simultaneously for more than 10 seconds. IQ Switch PowerSense Series 4.2 MQTT Command Structure 4.2.1 MQTT Topic and Message Definitions The demonstration unit can also be controlled by the following MQTT command structure:
MQTT Topic MQTT Message VINT / IDxxxxxxxxxxxx / Select Command = Value = Signature where:
- VINT: Classify type of device to communicate to (For future projects, controlling other types of devices such as air-conditioning systems).
IDxxxxxxxxxxxx: Unique intelligent switch ID to communicate to, where xxxxxxxxxxxx is the 12-digit device mac address.
- Select: Select an intelligent 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 in the demonstration unit. Leave empty) The MQTT command structure have various options as listed below. These options of different variables described above exists for each intelligent 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 Intelligent Switch Actions IDxx ID552467
(Example ID) Select Command Value CH1 PowerLevel 0-100
(or P) Adjust Dim Level (%), 0: Off, 100: Max On Default Values 0: Off GroupSelect 0-2 0: No Group, 1: Group 0: No Group CH2 PowerLevel 0-100
(or P) 1, 2: Global Adjust Dim Level (%), 0: Off, 100: Max On 0: Off GroupSelect 0-2 0: No Group, 1: Group 0: No Group CH3 PowerLevel 0-100
(or P) 1, 2: Global Adjust Dim Level (%), 0: Off, 100: Max On 0: Off GroupSelect 0-2 0: No Group, 1: Group 0: No Group 1, 2: Global IQ Switch PowerSense Series GROUP PowerLevel 0-100
(or P) Adjust Dim Level (%) for group (Selected Intelligent) 0: Off CONFIG Reboot n/a Reboot the intelligent Default Reset n/a Activates the intelligent Default switch values not re-loaded PowerMemory Enable/Disable switch configuration mode (webserver) values not re-loaded Enable or disable memory feature for power failure Enable LogoLED 0-20 Set Logo LED to 1min automatic switch off after certain time of no motion (Minutes) ReadMemory n/a View values stored in memory (Debugging) n/a RestoreDefaults n/a Load default values n/a into memory
(Intelligent switch will reboot) AzoteqStats Enable/Disable Retrieve Azoteq debug Disable information POW Sensor Enable/Disable Enable or disable Enable power consumption sensor Report Enable/Disable Enable or disable Enable power consumption MQTT report
(Enables Power Sensor) ChangeBlock 1-80 Adjust power 1%
consumption change block range (%) SampleInterval 1-60 Adjust power 15s GetPower n/a consumption sampling and reporting interval
(Seconds) Sends power (W) consumption of selected intelligent switch via MQTT n/a PIR Sensor Enable/Disable Enable or disable Enable motion sensor IQ Switch PowerSense Series Report Enable/Disable Enable or disable Enable motion MQTT report LevelCH1 0-100 Set dim level for CH1 0%
(%) LevelCH2 0-100 Set dim level for CH2 0%
(%) LevelCH3 0-100 Set dim level for CH3 0%
(%) BlockTime 1-60 Set block time after 2s previous motion trigger
(Seconds) Timeout 1-250 Set time-out after 1m motion trigger
(Minutes) Invert Enable/Disable Invert motion sensor Disable reaction (Invert dimming direction) ALS Sensor Enable/Disable Enable or disable Disable ambient light sensor
(Disable resets calibration value) Report Enable/Disable Enable or disable light Enable MQTT report
(nW/cm2) CHSelect CH1-3/CHALL Select intelligent CHALL switch channel to react on light sensor Calibrate n/a Dark room, load full on
(Duration = 7s) 100 000 nW/cm2 AutoCalibrate Enable/Disable Enable or disable light Disable SampleInterval 1-250 BlockRange 0-100 sensor calibration Set light sample interval (Seconds) Block range above calibrated minimum light value (%) 15s 10%
DimTempo 1-250 Adjust dimming tempo for channels selected 5 PIRBlock Enable/Disable Disable Enable or disable motion detection calibration and day light harvesting blocker
(Enables PIR) IQ Switch PowerSense Series PIRBlock 1-60 Set block period after 10s previous motion detection (Seconds) VEK Report Enable/Disable Enable or disable Enable ReportInterval 1-250 Vekin format reporting
(Format: CH1_Level :
CH2_Level :
CH3_Level : Power :
Lux : Motion) Adjust the reporting interval of the Vekin format reporting 10s GLOBAL n/a PowerLevel 0-100 Adjust Dim Level (%) 0: Off
(or P) for global (All Intelligent switches selected on Global) 4.3 Feature Descriptions The MQTT command set listed in Table 3 include parameters to control the light level output, movement detection sensor, ambient light sensor, power consumption sensor, grouping settings and general device adjustments. The features are highlighted and described in the remainder of this document. 4.3.1 Device Configuration Each intelligent switch can be configured using the CONFIG as selection in the MQTT topic. The following command messages can be executed:
Topic: VINT/IDxxxxxxxxxxxx/CONFIG Message:
Reboot Device will reboot and reload saved settings. Please note that MQTT settings will not be erased from memory if this command is executed. Reset Device will reboot and reset network settings. The intelligent switch will enter its configuration mode and switch to a local hotspot. Please note that MQTT settings will not be erased from memory if this command is executed. PowerMemory Enable or disable the memory feature for unexpected power failures. Enabling this parameter will continuously store each gangs dim level and will automatically restore the dim level after a power failure. This feature is enabled by default. LogoLED Adjust the time that the logo LED remains on after movement is detected. If the parameter is set to zero, the LED will remain on and never switch off. The default for this parameter is set to one minute. ReadMemory Display latest stored values in memory. This command is typically used for debugging purposes and to verify correct setup. Please see Figure 7 as an example of such a memory report. IQ Switch PowerSense Series Figure 7: Memory Reading Example IQ Switch PowerSense Series RestoreDefaults Load default values into memory as listed in Table 3. LEDs will cycle through their colors. 4.3.2 Power Consumption Reporting The intelligent switch is capable of automatically report power consumption changes via the MQTT network. The feature can be enabled and adjusted by selecting POW in the MQTT topic. The following commands are available:
Topic: VINT/IDxxxxxxxxxxxx/POW Message:
Sensor Enable or disable the automatic power consumption measurement feature. This feature is enabled by default. Report Enable or disable the power consumption reporting feature. The new power consumption result will be sent to the MQTT broker when it exceeds the change block percentage. (Please see ChangeBlock for adjusting the reporting sensitivity.) ChangeBlock Set the change percentage for the power consumption reporting. If the power consumption is 100W for example and the ChangeBlock percentage is set at 10%, it will only report a new power measurement if the new value is more than 110W or less than 90W. SampleInterval Adjust the interval at which power consumption samples are taken. By default, power consumption values are taken every 15 seconds. GetPower Retrieve a single power consumption reading and send it back to the MQTT broker. 4.3.3 Movement Detection Each intelligent switch consists of a motion detection sensor (PIR) which can be used to automatically dim or switch on the lights when movement is detected. It can also be used as a security feature to report movement to the MQTT broker. The sensor can be enabled and set up when selecting PIR in the MQTT topic:
Topic: VINT/IDxxxxxxxxxxxx/PIR Message:
Sensor Enables or disable the movement detection sensor. The sensor is enabled by default. Report Enable or disable automatic movement detection feedback to the MQTT broker. When enabled, any movement detected within the range of the sensor will be reported. This feature will typically be used for security purposes or testing. LevelCH1/2/3 Set the dim level to which each gang should react when no movement is detected for a certain period (see Timeout). Setting this parameter to zero (as per default) for any of the gangs will disable the movement detection action for that gang. If this value is set to 25% for example, and the dim level for that gang is set to 100%, the light will automatically dim from 100% to 25% if no movement is detected for longer than the TimeOut parameter. As soon as movement is detected, the intelligent switch will react by adjusting the dim level from 25%
back to 100%. IQ Switch PowerSense Series BlockTime Adjust the block time after movement is detected. This parameter blocks any movement triggers for the duration set. If this parameter is set to 2 seconds, the movement detection will be ignored for 2 seconds after a new movement trigger. Timeout Adjust the timeout period after movement is triggered. Any movement triggers will reset the counter which is compared with the Timeout parameter. Invert Enable or disable the invert movement detection action. If this parameter is enabled, movement detection will let the dim level increase from the initial level to the set parameter
(LevelCH1/2/3) level. Figure 8: Movement Detection Parameter Explanation 4.3.4 Ambient Light Sensing An ambient light sensor enables the intelligent switch to automatically adjust light dim levels according to external light entering the room. This feature attempts to reduce the power consumed by building lights during the daytime. Light intensity measurements can also be sent back to the MQTT broker automatically. The sensor consists of an automatic calibration algorithm to reduce installation time and overall complexity. This feature is accessed by selecting ALS in the MQTT topic. The following commands can be used to enable and adjust the sensors functionalities:
Topic: VINT/IDxxxxxxxxxxxx/ALS Message:
Sensor Enable or disable the ambient light sensor actions. Enabling this parameter will start automatic light level compensation if the light level is above the calibrated value and all ALS selected gangs have a dim level of 100%. Disabling the parameter will restore the default calibration value. The sensor actions are disabled by default. Report Enable or disable automatic light level reporting via MQTT. The light level will be sent after every sample received from the sensor. The reporting interval or tempo can be there for adjusted using the SampleInterval parameter. CHSelect This parameter selects the gangs that should be considered for ambient light sensing. All the gangs/channels are selected by default and therefor light level compensation will only occur when all three (or two) gangs are 100% on. We recommend that this parameter is left unchanged unless the lights connected to the three gangs are not in the same room. Calibrate Manual calibration can be done by calling this command. The purpose of this calibration method is to do an instant calibration instead of using the automatic calibration IQ Switch PowerSense Series method. Before executing manual calibration, it is important that the unit is properly installed and that the room is made as dark as possible. During manual calibration, the intelligent switch will automatically switch on all selected gangs to 100% to measure the maximum light that the connected load can supply. The value is then stored in memory and the selected lights are switched off to finish manual calibration. AutoCalibrate Turns on the auto calibration feature. With this feature enabled, the maximum light level will automatically be calibrated over a few days. Auto calibration will only occur when all selected ALS gangs/channels are switched on at 100% so that the algorithm can automatically adjust the light level. It is recommended that the lights are left on (at 100%) for a few evenings in order for the auto calibration algorithm to find the correct light calibration value. SampleInterval Adjust the interval at which light measurements are taken. A lower value will trigger light dimming quicker. However, a longer sample interval is recommended to minimize the effect of automatic light level adjustments. BlockRange Set the block range above the calibration value. This parameter blocks dimming actions for small deviations in light levels above the calibration value. A block percentage of 10%
will only let dimming take place if the light level increases 10% above the calibrated value. DimTempo Adjust the tempo at which dimming is executed. This parameter can be set according the like of the user. A slower dimming tempo is recommended to eliminate visible dimming effects. PIRBlock Enable or disable the movement detection light level adjustment blocker. The feature ignores light level deviations when movement is sensed. Light level deviations will be ignored for a certain period of time which is also set using the same command. A default value of 10 seconds means that the light sensing will only continue if there was no movement detected after 10 seconds from the previous movement sensed. 4.3.5 Vekin Reporting A quick reporting mechanism is included which can be used to get all important information at a fixed interval. The Vekin reporting mechanism is enabled by default and will report the dimming level of each channel, power consumption, ambient light level (Lux) and motion monitoring status will be reported every 10 seconds (default) in the following format:
CH1_Level:CH2_Level:CH3_Level:Power:Lux:Motion Topic: VINT/IDxxxxxxxxxxxx/VEK Message:
Report Enable or disable the Vekin reporting via MQTT. ReportInterval Adjust the Vekin reporting interval. This value can be set to any desired value between one and 250 seconds. 4.3.6 Gang and Intelligent Grouping Internal gang/channel grouping and global intelligent grouping can be set up on each intelligent switch to the like of the user and/or to match the building layout. This feature is accessed by selecting the CH1/2/3 in the MQTT topic. The following commands can be used to enable and configure grouping:
IQ Switch PowerSense Series Topic: VINT/IDxxxxxxxxxxxx/CHg (g = 1, 2 or 3) Message:
GroupSelect Each gang or channel can be grouped to a local group which is specific to the selected intelligent switch. If gang 1 and 3 is grouped in one intelligent switch locally, a command to the VINT/IDxxxxxxxxxxxx/GROUP topic will adjust the dim level of gang 1 and 3 together. Any combination of local grouping can be selected. Each gang of each intelligent switch can be set to GLOBAL grouping by selecting 2 when changing the GroupSelect command. All intelligent switches on the Wi-Fi network can be controlled simultaneously as follows:
Topic: VINT/GLOBAL Message:
PowerLevel Sending a dim level to the global group. All gangs from intelligent switches set up to react to global grouping commands will react to the dim level set by this command. FCC Warning 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 inte rference 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. NOTE: 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 interferenceto 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:
is connected. 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 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. 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 Asia Rm1227, Glittery City Shennan Rd Futian District Shenzhen, 518033 China Rm1227, Glittery City Shennan Rd Futian District Shenzhen, 518033 China
+1 512 538 1995 +86 755 8303 5294
+1 512 672 8442 info@azoteq.com ext 808 info@azoteq.com Tel Fax Email South Africa 1 Bergsig Avenue Paarl 7646 South Africa PO Box 3534 Paarl 7620 South Africa
+27 21 863 0033
+27 21 863 1512 info@azoteq.com 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