Hello,
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.
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.
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?
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.
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.
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.
I can’t seem to get this to work for me. Is anyone still using it successfully?
I originally didn’t have a password set but since it seems to be required I went ahead and created one and used admin as the username but it still wont connect.
I have the IP address and port correct and I don’t know what else to try. Does it take some time for it to come online after changing the settings?
I get this error in the logs when I hit the refresh button - java.lang.NullPointerException: Cannot invoke method getDataValue() on null object @line 98 (callTasmota)
I was not able to find substantial hints in regards to why this is happening. I want to make sure this is done right. Just to make sure… Some docs say that device may not be associated with the hub therefore device.hub may return null.
Login to graph site
Hit My Locations
Select the right location
Hit My Device Handlers
Hit Create New Device Handler
Select From code and copy/paste the device handler code from github link up top.
Hit Create
Click Save then Publish, For me.
Hit my devices
New Device
Fill in the mandatory parts name, device network id, type, select location, hub.
This is exactly how I originally did it. Just to make sure I removed everything and recreated it using your steps but still no success. Any other ideas?
i had same problems like Jeremy_S
i am follow the instructions but my sonoff basic appear offline in smarttthings mobile app
and appear offline in “My Devices” in smartthings web
I am using this DHT with a Sonoff Basic. At first I am only able to turn off the device, later the device just goes unavailable permanently. Tasmota firmware 6.6.0.