WebCore Piston to Monitor the Door of a Safe


#1

I created a Webcore piston that monitors my safe and speaks a status on an Echo Show in my bedroom using the “Echo Speaks” Smartapp when the safe is opened. The spoken report is like this:

I see that you opened the safe. The safe was last opened January 5th 10:03 PM and it has been 12 hours and 48 minutes since it has been opened. The internal temperature of the safe is 58 degrees.

Here’s what the Webcore piston looks like.


#2

I’m trying to replicate your piston. I like this!!

However, Can I have more info on your global variable @Safe_Last_Opened? what kind of variable is it? string? dynamic?

I’m trying turn it into a local variable for me though…

here’s what I get…


#3

This is very interesting. I am sure you used a date type for you last opened variable . My questions are what type of contact sensor did you use, is it in the inside of the safe and, if so, does ST actually get a signal from it when closed? thanks!


#4

I got this working without a global variable. here’s my copy…


#5

The global Variable is of type Date_Time.
image


#6

So, one of the reasons for the global variable is to be able to view the data through the dashboard and also to have the data persistent between pistons.


#7

It is a Samsung SmartThings Multisensor.

Versatile Monitoring: All-in-one open/close, vibration, orientation, angle (tilt), and temperature sensor for multipurpose functionality

I also have a Peanut Smart Plug in a wall socket within a couple feet of the safe. The Peanut plug is a Zigbee repeater and maintains a reliable signal with the sensor inside of the safe. Peanut plugs are really cheap and work with a SmartThings IDE user written device handler readily available.