###### Abstract  
Smart home systems (SHSs) are a modern lifestyle trend, changing daily lives in the most intuitive way. To connect and operate various smart devices under one system, an accurate, convenient, and secure control method is of utmost significance. Nowadays, most smart home control systems are based on radio-frequency (RF) technologies such as Bluetooth, Wi-Fi, and Zigbee. They tend to suffer from poor location accuracy in high-density environments due to the interference and noise in RF signals as well as their penetration through walls, leading to security vulnerabilities and low-precision control. To address these issues, this paper presents a smart home control system based on visible light communication (VLC), with enhanced security and accurate localization for precise and convenient control. The system includes an AC lightbulb, a smartphone running the position and control applications, and a cloud server with location-based access and a database of smart home devices. The design of the AC lightbulb integrates VLC and Bluetooth connectivity in a standard form factor for easy installation and plug-n-play capability. A smartphone camera-based 3D indoor positioning and orientation algorithm that allows precise control by pointing the smartphone the device is also presented. We demonstrate the feasibility of this system through prototype implementation and experimental verification. s 202  
device [5; 6]. Although these radio-frequency (RF)-based control methods simplify the control process, they suffer from poor control accuracy in the areas with a high number of devices due to the low positioning accuracy of meter level [7]. For example, users may find it difficult to distinguish the same type of device installed in neighboring rooms through a smartphone. This low indoor positioning accuracy is caused by electro-magnetic interference (EMI), signal reflection, environmental absorption, and noise in RF signals. The second challenge is information disclosure, which is caused by RF signals being able to easily penetrate through walls. Such leaks in information could threaten the safety of an SHS [8]. Although countermeasures to security issues such as anonymization, attribute access control systems, and cryptographic techniques [9], have been proposed, they are complex to implement. In addition, these solutions based on algorithms increase the development cost while decreasing the user convenience. Visible light communication (VLC)-enabled smart home control system is a potential solution to the mentioned problems. VLC technology utilizes visible light as a medium of communication to transmit programmed data by modulating the intensity of the light source [10]. Due to the unique characteristics of visible light in terms of line-of-sight (LOS) capability, compatibility with existing lighting infrastructure, and absence of EMI, VLC is considered as a potential indoor communication method with high security and low cost. In addition, visible light can be applied to localization with centimeter-level accuracy [11], which means indoor visible light positioning (VLP) could potentially solve the problem of low-accuracy indoor positioning of users in SHSs and provide location-based applications in control systems. The traditional indoor positioning algorithms utilize RF-based communication methods such as Wi-Fi [12], Bluetooth [13], and RFID [14] to calculate the user's position. In [12], the received signal strength indicator (RSSI) of Wi-Fi signals between a transmitter and receiver pair is utilized to calculate the total number of people walking in one area. The data in Bluetooth low-energy beacon networks are collected and processed in a machine learning model to detect the user's position with zone-level accuracy [13]. Reference [14] uses RFID readers to localize the position of the RFID tag, which is fused with laser data to localize the mobile robots. Compared with VLP technology, these algorithms utilizing RF signals suffer from the challenge of localization accuracy.