I do something similar … but the opposite!
I setup a water sensor across a relay that tells me when there is NO power in a socket.
You could just use the same setup but showing when power IS present.
Cut the end off the water sensor cable and connect a relay between the two cables that go to the sensor
I power the 5v relay with a simple USB charger
You can easily modify the DTH to show something nicer than wet/dry on the 'things ’ page as I did
Let me know if you need any more details and I’ll try and write something up
I originally used expensive Fibaro door/window sensors… but you can do exactly the same with cheaper wet/dry sensors
Have a look here
I’m in th UK and sockets/switches are more expensive but I never thought of that for this application.
I do use a socket to tell the wife when the tumble dryer has finished
With my original project a socket wouldn’t work because if the power goes out there is no reporting from the socket
Would th socket drop off the network if left off for too long?
I really just use it for messaging (e.g. " The Dryer Has Finished") but it could be adapted to turn on/off a switch if that is what you are looking to do (unless someone has already created this)
You do not have to rely on the in-build smartapps there are hundreds already written by the community that you can use
If you can’t find anything that does this for you let me know and I can probably edit mine to do what you want
• Power is supplied by 5V USB charger
• Relay used was DPDT but SPST is sufficient
The relay I used has a 5V dc coil
The relay I used was a 5 Vdc coil DPDT but a SPDT relay is all that is required (I just had a few relays hanging around)
As you can see from the picture above:
• Pins 1 & 8 are connected to the 5 Vdc coil connections (i.e. USB power supply)
• Pin 2 will be connected to pin 3 and 7 to 6 when power is off
• Pins will be connected to pin 4 and pin5 to pin 6 when power is on
The relays that I use are so small that it is best to solder then to a little piece of veroboard with a couple of screw terminals to make them easier to connect to. Larger relays could be soldered directly to the pins
My soldering is pretty messy but you get the idea:
I am using ‘Foxx Project’ Z-Wave water sensors obtained from Amazon.co.uk just because I’ve found Foxx devices are actually Aeon Labs and connect perfectly to SmartThings (and they are reasonably cheap in the UK)
Cut the end off the water sensor cable and strip the wires – These two wires are then connected to ‘Common’ and either N/C or N/O on the relay
When connected to N/C the sensor will show DRY when power is applied
When connected to N/O the sensor will show WET when power is applied
For me, I used the N/C connections because I wanted to show wet when power was lost, but it doesn’t really matter because I changed the DTH to show different states in the ‘Things’ view anyway
Once all connected, join the water sensor to SmartThings in the normal way.
(Foxx water sensors just appear as either ‘Generic’ or Aeon Labs)
Applying power to the USB charger will change the state of the water sensor to show wet or dry depending on how it was connected to the relay
I also edited the DTH a little to show Power OK in green or Power Off in red the same as I did here
Not for my power sensor as the power is cut to the USB charger to show when the mains is off, but I use a little dc-dc voltage reg circuit in my alarm panel to drive the water sensor - power (12vdc) is taken from the connection that powers the PIRs (has a battery backup) dropped down to 3v to drive the water sensors
Ok that wasn’t clear. Figured your water sensor needs power as well which I assume is a battery. I believe a contact sensor could also work instead of the water sensor, which typically work off batteries.
I want to know if it is possible to do the inverse (or at least be guided through it)
I have an Alexa and a SmartLife plug. Would it be possible to make Alexa “check” for which device are active and then through IFTTT, send a notification to indicate what devices don’t ping back? I have an appliance in a garage and it would be great to know if the device is out with my Alexa sending me a notification.
Not at the present time, the Echo does not offer this functionality. With the exception of the echo plus model, it just collects the voice request, parses it into something that the system which does control the device will understand, and then passes the request over to it.
Amazon just added in December 2017 the ability for some echo skills to push through notifications to echo, but that’s brand new, and it is up to the device manufacturer to figure out how to use it. It’s still not a native echo ability.
I saw that this thread mentions a ‘core’ app in the beginning which allows to trigger an action when a power meter passes a threshold. Could somebody explain what this core app is? Sorry for the noob question.