A Home Assistant integration for CozyLife Smart Plugs. This integration provides local control and power monitoring capabilities.
- 🔌 Local control without cloud dependency
- ⚡ Real-time power monitoring
- 📊 Energy usage statistics
- 🏠 Full Home Assistant integration
- Open HACS in Home Assistant
- Click the three dots in the top right corner
- Select "Custom repositories"
- Add
https://github.com/IIRoan/bettercozylifeas an Integration - Install "BetterCozyLife" from HACS
- Restart Home Assistant
- Download the latest version from the repository
https://github.com/IIRoan/bettercozylife - Copy the
custom_components/bettercozylifefolder to yourcustom_componentsfolder - Restart Home Assistant
- Go to Home Assistant Settings
- Click on "Devices & Services"
- Click the "+ ADD INTEGRATION" button
- Search for "BetterCozyLife"
- Enter the IP address of your plug
- Give your plug a custom name
Before adding the plug to Home Assistant, you need to set it up on your network:
-
Using HomeKit (Recommended for iPhone users):
- Plug in the device and wait for the LED to start blinking
- Open your iPhone's camera and point it at the HomeKit QR code on the plug
- Follow the HomeKit setup process to connect it to your WiFi network
-
Using CozyLife App (Alternative method):
- Download the CozyLife app from App Store/Play Store
- Create an account and log in
- Click the '+' button to add a device
- Select your 2.4GHz WiFi network and enter the password
- Follow the app's instructions to complete setup
After setting up the plug, you can find its IP address by:
-
Using the CozyLife App (Easiest):
- Open the CozyLife app
- Select your plug
- Go to device settings/information
- Look for the IP address field
-
Using Your Router:
- Log into your router's admin panel
- Look for the connected devices/DHCP client list
- Find the device with MAC address matching your plug
- Note the corresponding IP address
-
Using Network Scanner:
- Install a network scanner app like Fing
- Scan your network
- Look for a device with MAC address matching your plug
For each plug, this integration creates:
- A switch entity for controlling the plug
- A power sensor showing real-time power usage in watts
-
Can't find the plug
- Make sure the plug is connected to your 2.4GHz WiFi network
- Check if the plug is powered on and the LED is blinking
-
Connection errors
- Verify the IP address is correct
- Ensure your Home Assistant instance can reach the plug's IP address
- Check if the plug is responding to ping requests
-
Power readings not updating
- The plug updates its readings every 10 seconds
- Check if the plug has a good WiFi signal
To enable debug logging, add this to your configuration.yaml:
logger:
default: info
logs:
custom_components.bettercozylife: debugIf you encounter any issues:
- Check the Issues page
- Create a new issue if your problem isn't already reported
This project is licensed under the MIT License - see the LICENSE file for details
