Release: Sonoff Tasmota Switch Driver

Spot on - you're a star!

BTW - I wasn't having a go when talking about the double brackets - just thought it might be a strange syntax thing..... I'm just trying to get to grips with the coding.

1 Like

No worries!!! I was being a smartass :wink:

Glad you got it sorted though. LOVE LOVE LOVE my Sonoffs.

I actually noticed last night that my switch never shows status. Has somebody forked the original for trying to fix the status?

If it's a Sonoff Basic, the code above should resolve that. I never forked it, just made my edits for the Basic and moved on.

There's also the Poll() command that you could use that is supposed to pull back the current status of the switch.

1 Like

So I've updated the code to what @thorpe.jez calls out.
I still see no status.

chrome_GiSvJRI6qb

Strange the logs show it's on and off...

The driver doesn't automatically poll the switches for status. If you're interested in status updates, you need to use something like Hubi-Poll or RM to periodically poll the devices.

What kind of Sonoffs are those? Basics?

Here's mine. They are Basics.

image

It's a random outdoor 3-relay switch.
I'll try Hubi-Poll again.

It's strange that Sharptools.io just doesn't see a status. It's been great with all of my other devices.

1 Like

Maybe it's the lack of username and password.
Let me check that.

OK fun fact.
I think it might just be a Sharptools.io issue.
The Hubitat dashboard shows status properly.

1 Like

If it's Backyard 1 and 2 from your screenshot above and the icon is the default, then it seems to be recognized as a Button for some reason. I took a quick peek at the code in the first post and didn't see any Button related capabilities defined.

Can you share a full copy of the code you are using?

Also, can you PM me a screenshot of what you see in the device details from SharpTools:

  1. Open your SharpTools.io User Page
  2. Tap the ... next to your Hubitat location
  3. Tap the selected device in the list
  4. Take a screenshot :grinning:

Edit: I double checked and realized there is a 'Momentary' capability defined. In the meantime, you can comment that line out, reauthorize, and it should get you going. I'll make a tweak on our side to lower the weight of that capability in determining the default tile layout to use in a future update. :grinning:

1 Like

Ok so for anybody who cares it was the capability "Momentary" line.

Commenting it out didn't affect the driver and now it displays properly in Sharptools.io.

@josh has also mentioned he's modifying the platform to avoid this without having to comment out the momentary line soon.

But it doesn't really do anything as far as I see, so why bother.

2 Likes

Hi,

I have ported by Tasmota Sonoff Basic driver over from Smartthings to Hubitat. It doesn't run a parent child system and updates once a minute without the need of an app.

Mark

Hi Mark, I am interested in your driver that updates the status of the switches but your link gives me a 404. Did you move it?
Steve

Disregard. I found it on another thread.

1 Like

Hi Steve,

Thanks for letting me know, I have updated the link in my post.

Mark

Do any of these driver works for power monitor plug ?

Hi below is my driver for the power monitor: Have a go with it and let me know what you think

Thank you

Hello @mhutchy when i try the Sonoff POW it does not ask for IP

Hi,

The driver uses the deviceNetworkId as the IP address, I will add IP address as a seperate preference option for those who don't want to be forced into using the IP address as your networkID