Wemo switch and insight smart plug

Great! :tada:

I have a little bit of an interesting use situation with one of my Wemo outlets. I have a gas insert fireplace with an automatic fan. Without getting too technical the fireplace has a temperature sensor that automatically supplies power to the fan once it reaches a certain temperature. The fan has a standard 3 prong male plug supplied to it and is connected to a female 3 prong plug wired via bare wires into the main board for the fireplace.

Essentially I put a wemo mini in between those two plugs, it works great. The problem is since there is only power going through that line once the fireplace is hot enough any time the fan isn't powered the wemo mini is offline. For me, I just wanted the ability to remotely turn the fan off (its kind of noisy) that didn't require me going under the cover for the fireplace.

Can you forsee any issues I am going to have with hubitat or your Wemo Connect app since the plug is going to be offline most of the time?

Thanks,

Hi Jason. Not sure if you saw my reply on March 30 to your last question here. Thought I'd reach out a final time before I bin the Wemo Maker and install something else. Any suggestions on what I can try to get it to work?

I'm getting close to binning all my Wemos. They really struggle with range and when they lose connectivity, they don't come back up by themselves a lot of the time. The only one left in service is the Wemo Maker on my garage door.

You might run into some latency issues. You should be able to send commands to the device at an point, they just won't do anything if it's unpowered. However, the device's state probably won't be reported properly for a couple of minutes after it's powered back on.

The connect app normally subscribes to update events from each wemo device; that's how it can tell when a device is turned on or off. However, it can't setup a subscription when a device is off. The app does run a discovery process every few minutes (5 by default, adjustable in the Connect app's settings) that pings every device and resubscribes to update events. So, it should resubscribe to update events from a device at most 5 minutes after it's powered back on.

Sorry, I did see that, but didn't respond immediately, and then it got lost under a bunch of other things I was working on. In any case,

Since it looks like the sensor presence functionality either doesn't work, or works differently than other examples I've seen, I disabled it. I pushed up a new version of the driver -- give that a try.

1 Like

Thanks Jason. I'll give it a shot.

@jason0x43 It works! Thank you very much for that. You've just saved a Wemo Maker from the scrap heap.

1 Like

I wanted to give an update for anyone else using Wemo stuff that isn't constantly powered. So far everything seems to be functioning alright. The only challenge I've noticed so far is once the fireplace gets hot enough and powers that plug and I regain control I have to turn the switch on as it defaults to an off state once it reconnects.

@jason0x43 Anyway to change the default behavior of the switch when it powers on? So in @wfoltz situation the switch is off due to the fireplace control. Other instances would be a power failure. There is maybe not a way to save the last state before the power went out but is there a way to change the default wemo behavior of "off" on power up? I have my reef tank filter attached to a wemo mini and I use rule machine to turn it back on after 30 min when I turn it off through the dashboard for feeding time. When the device is powered off it stays off when it comes back on. I would not mind the start up delay for polling knowing that it will come back up and turn on but I am worried the filter will remain off if I am not home and the power goes off and then comes back.

Unfortunately, with Wemo I have only been able to get a default state of off. I have been marginally successful with setting an automatic timer for 30 mins but I am in a two switch situation. You might be able to accomplish the goal you are looking for with a zwave sensor normally used for things like coffee makers or washers/dryers if the power supply for your pump has an led.

@jason0x43 Pretty new to Hubitat but wanted to thank you for this code! I have a sense system and Wemo and TPLink are the only plugs it can read power from. Your code has allowed me to get the temperamental Wemo plugs into Hubitat for use and I really appreciate it! I did notice it doesn't bring back power usage but with the Wemo default of "off" after a power loss I'm not going to be using them for anything critical in Hubitat anyway and my Sense system reads them fine. Reading through the thread above I really appreciate that you put so much work into this to bring functionality - THANK YOU!

Consider a TPLink HS110 if you can find one or maybe a HS300 strip. I'm pretty certain they recall state and there's drivers for them as well. IF need be I can test state if you want as I've got a "few" of them lol. Oh the HS100 might also be a good choice if you don't care about power monitoring and they're available still. Bulkier than the Wemo but not as temperamental in my experience so far.

Looking at this post on the WeMo forums, it sounds like WeMo devices will always default to "off" after a power failure by design.

One simple way to get around that might be to setup a poller that checks the power state of the switch every few minutes and sets it to what you expect. So, every couple of minutes, check to see if the switch is set to what you expect; if not, toggle it.

Jason - just switched over from Smartthings and hit my Wemo Switches, Mini and Insight all working with no issues so THANK YOU!

I have a question/issue that might be unrelated to this and just my not getting Scenes. I created a group of all my Wemo devices. I created a button on the dashboard and can turn them all on/off no issues.

I then created a Scene which has the group. The Scene button in the dashboard though will not turn all of the Wemos on/off. Is this because a Scene can not control a Group or is it because a Scene can not control a mixture of switches, Mini’s and Insights?

Hmmm...I'm not sure, off the top of my head. Do you see any errors in the Hubitat log?

I used the .groovy code from ST form the WeMo Switch. I forget how much I have tested it yet. I have had the hub less then two weeks. Maybe soon. The MyQ worked one I fixed to typo bugs so it may still be buggy too. The code if for their Insight Switch. I removed the code for reporting power use to make the WeMo driver. You will probably need two drivers. One with power reporting for the Insight and one without. I used the one from Jason Cheatham and it find the switch fine. I think it asks for the IP address so it finds it. I have found LAN discovery on the Hubitat completely useless. It never finds anything. I had to do the same for the MyQ garage opener. The people doing the Apps are much smarter then those at Hubitat.

I used you Driver and just removed the Insight power reporting code and it works fine with a regular WeMo Switch. WeMo Connect worked perfect on first try. I think you just need the IP address as I recall. Correct?

There is a basic Switch driver that doesn't have the insight reporting code.

You shouldn't need to provide an IP address for WeMo devices -- devices will be discovered on the network.

I did not have that code.

The Hubitat LAN discovery is completely useless, it has found none of dozens of items on my LAN. I add the drivers and let the LAN discovery run for an hour or more and nothing. With the WeMo I enter the IP and it appears instantly, Same for MyQ and probably the AVR. I will try the Logitech and TV last. I am not even going to try and find the NVidea Sheild even though it appears on on every device but the Hubitat. I doubt it can handle it.

The debug and subscribing are different even though a lot is the same so I will try it. I do sometimes get a warning that may go away. OK, I renamed the old driver, Added this one and the reassigned the one WeMo switch to use the new driver instead. It apparently does subscription differently so this shoudl fix that. I hope. I noticed the debugging is different too. Looking at other peoples code helps me understand .groovy more each time. I am pretty new at this but did programming before, not in .groovy.