I have a smartlife plug in outlet which doesnt work with smartthings but iftt and alexa.
Last night i had a power outage and the smartplug was on before we went to bed. When the power outage happened it turned off and when power returned it stayed off.
Is there a device i can use that i can set to go back to the last state it was in when the power is restored?
You could have a “canary” bulb that come back on after a power outage which then triggers restoring of other devices to their prior states. This is the DH: [RELEASE] SmartBulb Power Outage handler
This is a old post, but I did look for a while for the perfect solution to be able to be trigger actions based on power failure and when power resume. I have found an IFTTT compatible device that can let me know it is offline/HS (lost of Internet connectivity) and power failure (if your router is connected to a UPS). It is battery powered but has to be connected as well by a USB cable to a power outlet to monitor power failure. As a bonus, it can measure, the volage, light intensity, temperature (possible to add a probe), vibrations, humidity, etc… Look at this UbiBot here : UbiBot Temperature Humidity Light Vibration Sensor by WiFi
Do you get an alert when the power comes back on again? Because in a home automation situation, knowing that the power went off may not help you because your home automation system may be non-functional at that moment in time as well. You need to know when the power comes back on after an outage in order to automate the response.
My main reason to use it :
In my house, I am tapping to my alarm system to use the same movement detectors (evaluating if someone is in the house) and the status of the alarm system (armed or not). I am transferring with relays that information to my automation (combination of relays and timers). For example, the water main valve will shut down if no one is in the house for X amount of time or 3 hours after departure if the system is armed and system not manually triggered to let the dishwasher/washer complete their work. I have several leak detectors linked to this system, etc. (I have prevented already 2 situations - water infiltration in the basement and a dishwasher leak). My automation is doing the magic but also triggering an open circuit on my alarm system so I can get a phone call from the alarm company (no need for a separate service). I started several automation to open or cut some electrical circuits at my cottage but wasn’t able to transfer that information to an IFTTT command and link smart devices with my other system (mechanical type - contactors and relays). This device is doing the bridge. I am getting an IFTTT trigger when the UbiBot Power Supply is Down or Up. The UbiBot has his own battery to operate in case of power failure. Since my router is on a UPS I had so far always received the signal when the power resume.
Your specific question :
So my power failure are generated by my automation most of the time. It is my way to bridge my 2 systems together. But excellent question! Since my router is connected to my UPS, I have always received the signal (and IFTTT triggers) when the UbiBot Power Supply is Up or Down. Just to make sure the IFTTT triggers will still work if generated while the router is booting (without the UPS or in a situation the UPS battery had drained), I’ll do a test next week and update this post.