SmartThings Community

[RELEASE] Sonoff Tasmota Device Handler

I wasn’t able to find any SmartThings Device Handler for Sonoff devices with Tasmota flashed. So I wrote one and wanted to share. It doesn’t require any smartapps, directly uses the Web api. It’s quite basic but it works.

Currently it supports POW R2. It should be easy to add support for others as well. All feedback is welcome.


Forgive my stupid question but in the instructions you say

  1. In the mobile app change the IP and Port of your device

How do I do this in the mobile app…? Or is this something I need to set in the device handler.

Sorry for not being clear here. After you add the device handler on the graph website you will need to manually add a new device of the kind you need.
This will let the new device show up in the mobile app (classic mobile app I’m using)
When the new device shows up in the mobile app, you’ll use the settings button on the right top within the sonoff device screen.

1 Like

Oh gotcha! Add a new device from the website, then adjust in the mobile app.

Well, I can confirm it works perfectly for the basic on/off control I am using it for with a Sonoff Basic. Thanks!!!

1 Like

Congratulations for the initiative.
Is this Device Handler capable of updating the sonoff IP? My router is dynamic DCHP. Will I have to reserve an IP for sonoff?

No it does not change or track the IP. You will need to assign a static IP from your router or reserve one.

Why the delay in feedback ON OFF the Smarttihgs app?
It takes too much time or it does not work.

How long is the delay? 1-2 seconds is sometimes normal.

This is definitely an improvement over the original Tasmota DTH as you don’t need to manually specify the relay GPIO settings. While I do not expect the DTH to support live polling without some MQTT link, my devices using this DTH tend to show a false ‘offline’ status when they’ve been left dormant for some time. However, they still respond to on/off via the app and voice control, which for the most part is all I need. It will be interesting to see how this develops.

1 Like

There is polling actually every 5 minutes to check status with checkInterval but I may be doing something wrong. I’ll try to reproduce what you’re seeing. I’d appreciate if you can let me know how to reproduction.

I’m planning to add a stand alone Sonoff Basic DTH just to make it clean. I don’t own one but it seems it would be straight forward to add one by removing the power monitoring pieces. Maybe later a smart app to scan network to auto discover devices etc.

I’m open to suggestions.

1 Like

I have the same behavior with this device handler. My sonoff basic with tasmota 6.6 goes to an unavailable state after some time idle.

Any clues on this ?

Unfortunately I am not that great at programming but I notice my devices show as offline in both the IDE and the app.

Also if you try to voice control any of them, Alexa gives a connection error response, yet like the app, both are still able to “wake the device up” and it does what you want it to do.

I don’t know if there is an issue with the code for polling. It seems like the device just falls asleep (appears offline) after 5 minutes since the last action.

1 Like