tasmota – Automation Fixation https://automation.moebius.site A site dedicated to home automation and technologies. Sun, 28 May 2023 07:03:42 +0000 en-US hourly 1 https://wordpress.org/?v=6.4.4 156416546 Hassio/Home Assistant: Installing a Sonoff Switch (Tasmota Firmware) https://automation.moebius.site/hassio-installing-a-sonoff-switch-tasmota-firmware/ https://automation.moebius.site/hassio-installing-a-sonoff-switch-tasmota-firmware/#comments Sun, 06 Jan 2019 12:49:45 +0000 http://automation.moebius.site/?p=88 The Sonoff switches that have been flashed with Tasmota Firmware are compatible with Home Assistant/Hassio. The following guide will take you through the steps to install the required components to allow you to use the switches for automations.

What you will need:

If you haven’t already seen my initial Hassio setup guide, please visit this link.

Option 1 – Installing using Wemo Emulation

Step 1 – Enable Belkin Wemo Emulation

Open your Sonoff Switch interface

Navigate to Configuration > Configure Other, select “Belkin WeMo” and click Save.

Step 2 – Restart your device

Restart your device and your switch will automatically be detected by Home Assistant and visible in the Overview page.

Step 2 – Customize the switch name (optional)

You can customize the name through clicking on the device and clicking on the settings cog.

Change the name and click Save.

The new name will now be reflected in the Home Assistant Overview screen.

Option 2 – Installing through MQTT

While this option takes a bit more effort, I’ve found this to be more reliable than the emulation option.

Step 1 – Enable MQTT on the Switch

As per the Option 1 above, navigate to Configuration > Configure Other, ensure that MQTT is selected as enabled and click Save. If you have enabled the emulation above, you can change it back to “None” to avoid duplicate devices detected.

Step 2 – Add MQTT configurations to Home Assistant configuration.yaml file

For each of the switches to be added, add in the details of the MQTT topics that will be used. I have used the following configurations for a device:

configuration.yaml

mqtt:
password: !secret mqtt_password

switch:
– platform: mqtt
name: “sonoff1795”
state_topic: “stat/sonoff-1795/RESULT”
value_template: ‘{{ value_json[“POWER1”] }}’
command_topic: “cmnd/sonoff-1795/POWER1”
availability_topic: “tele/sonoff-1795/LWT”
qos: 1
payload_on: “ON”
payload_off: “OFF”
payload_available: “Online”
payload_not_available: “Offline”
retain: true

Note: Be sure to include your mqtt_password in your secrets.yaml file.

Step 3 – Restart your device

Within Home Assistant, restart under Configuration > General > Restart.

Step 4 – Configure MQTT on the Sonoff Switch

Navigate to your Sonoff switch’s interface and go to Configuration > Configure MQTT. The details here should match what you have put in your configuration.yaml and secrets.yaml file.

Step 5 – Restart your device

Per Step 3. The switch should now be visible within the Home Assistant Overview screen.

Step 6 – Customize the switch name (optional)

Within Home Assistant, navigate to Configuration > Customization and select the newly installed Switch. Edit the name and click Save.

The new name will now be reflected in the Home Assistant Overview screen.

]]>
https://automation.moebius.site/hassio-installing-a-sonoff-switch-tasmota-firmware/feed/ 2 88