Sonoff Home Assistant Integration
Sonoff Home Assistant Integration with Sonoff LAN
Connecting Sonoff devices to Home Assistant just keeps getting easier and easier! Right now, using the Sonoff LAN integration is the easiest and quickest way to set your Sonoff devices up in Home Assistant. The integration is possible thanks to a custom component called Sonoff LAN created by AlexxIT.
Install HACS (Home Assistant Community Store)
In order to set up this component, you will first need to install HACS; the Home Assistant Community Store. This allows you to install custom components created by the Home Assistant community, that are not found in the Add-on Store. The process to install HACS changes occasionally, and can by found at https://hacs.xyz.
- Navigate to the Add-on Store and download Terminal & SSH. You can search SSH in the store to find it.
- Install and Start the add-on when it finishes downloading.
- Open the web UI using the link in the bottom corner of the screen.
- Here you’ll find the Home Assistant command line. Enter the HACS install script from here: https://hacs.xyz/docs/installation/installation#home-assistant-os
- When the install is finished, restart Home Assistant and clear your browser’s cookies.
- After restarting Home Assistant, go to the Integrations section of the Configuration tab.
- Search for HACS.
- Let the integration install, this can take a few minutes, be patient.
- HACS is now installed! You can access it from the sidebar.
Install the Sonoff LAN Component
- From the Home Assistant Community Store tab, click or tap on Integrations.
- On the HACS Integrations page, click Explore & Add Repositories.
- Search for AlexxIT/SonoffLAN and click the integration to go to the info screen.
- Read through the info screen and click Install this Repository in HACS.
- Install Sonoff LAN.
- Restart Home Assistant again to finish the installation process.
Configure the Sonoff Component
sonoff:
username: [email or phone number]
password: [password]
sonoff:
username: [email or phone number]
password: [password]
sensors: [power, current, voltage]
mode: local
reload: always
- The basic integration requirements are just your eWeLink login credentials. Learn more about configuration options here.
- This example adds the power, current, and voltage sensors for the S31.
- After you finish configuring the Sonoff LAN component, save your changes.
- Check that your configuration is valid, and restart Home Assistant.
- On successful integration, you will now have access to most, if not all of the Sonoff devices you connected to your eWeLink account!
Conclusion
Sonoff devices have gotten much easier to integrate with Home Assistant recently and makes a locally controled smart home much easier to attain.