[DEPRECATED THREAD: visit community.webcore.co for assistance] WebCoRE - Example Pistons

Dynamic alerts based on event.

SHM doesn’t have enough flexibility for me. So here is an example Piston that monitors contact sensors while SHM is armed. It then plays a dynamic MP3 file based on the device that was triggered. You could have it do TTS as well but I want an alarm sound before the txt in my files.

All my files are named in this format: SHMAlarmGarageWindowContact.mp3 So I just change out the mp3 if I want to play some new alert format.

1 Like

Finding it difficult to trigger this one.
I want a light to turn on if a door opens within X minutes of another event (such as an arrival.)
Is there a simple way to do this I haven’t found?

Try adding the two triggers, once you have it added, click on the AND and change it to FOLLOWED BY. To adjust the time, click on the second condition.

3 Likes

Looks to be the trick!
Is there a way to reorder the lines in the code, or do you just have to cut and re-paste?

We have drag and drop now, enable it in the toolbar (in edit mode), up/down arrow. You’ll the drag handle on the side of the code.

1 Like

Got it! (+)

Also, try and remember, if possible: red means stop, green means go. None means sleep.

Is there any way to get a notification of a device goes offline

or… is there a way to make a device appear “off” if offline (for bulbs that get turned offline/off from a dumb wall switch).

You could try $status I believe but I remember ady624 posted it’s not reliable to use if I’m reading that conversation right.

Something to remember is this section is for posting examples of pistons only, everyone really should be posting here for questions:

4 Likes

A very simple piston that sets tiles and a piston state showing today’s sunrise and sunset. The piston state changes from ‘is’ to ‘was’ as sunrise and sunrise times are passed. I am sure the pros in here could make this slicker.

If you use it remember to put it in a piston category that shows tiles and details.

2 Likes

Here are a couple Pistons for setting LEVEL and COLOR TEMPERATURE (Kelvin) variables I use to control my Lifx bulbs. I have both of these variables update whenever the illuminance reading on my multisensor changes. You can then have a separate piston feed these variables to the lights. I have a third piston that turns on lights based on motion or door contacts. If the lights are already on, their level and color temperature are updated every 5 minutes (frequency of my multi sensor updates). The result is the color temperature changing automatically throughout the day, reaching it’s coolest temperature at solar noon (midpoint between sunrise and sunset), and warmest at sunrise/sunset, as well as the level (brightness) fluctuating based on ambient light in the room.

set KLow and KHigh to be the Low and High Kelvin values you want the lights to change between throughout the day.

set the luxm value to be the illuminance value above which you want the lights to turn off.

3 Likes

I figured I’d post this because, while others have already posted their own weather related Pistons, what I wanted to showcase is just how smart the ST platform can be to make the right announcement based on the current situation.

The job of these groups of Pistons is to play a message when the door is opened. Depending on if you’re entering or leaving it will prioritize either welcoming that specific person/s home, let you know if it’s currently raining, if there will be a chance of rain or if you need to bundle up for really cold temperatures



I’d like a bit of advice as I’m new to WebCore. What I want is someway of notifying when the dryer has finished, as the cycle has a number of times when power drops using the usual laundry monitor apps isn’t working. I need to be able to add a delay to the notification or possibly do something in WebCore?

This thread is for people to post examples of their pistons so others can copy or get ideas from.
Have a search for the thread for getting assistance with WebCoRE pistons.

1 Like

This should work. It will have to run through one round of notifications first. You can tweak the times based on your individual cycle times. Make sure to set both push notifications execution policies to condition state.

@James_Watts I try to import your Piston to take a closer look and there a problem with it. can you repost it, thanks.

llcanada
If you tried to import using the red box in webcore I do not think it works.
You need to use the orange box & enter the code 5jty
then click create
Mike

1 Like

Actually, that was a non-anonymized snapshot, which might have something to do with it. Here’s the anonymized version. You need to make two vritual switches for the washer and dryer.

“Outlet 3” = Washer outlet
“Switch 12” = Washer virtual switch
“Dimmer 6” = Dryer outlet
“Switch 3” = Dryer virtual switch
“Contact Sensor 6” = Dryer door contact

.

@James_Watts What devices are you using to monitor wattage? Is your dryer running on gas? My Dryer is electric, so 30A at 240v. Not sure I’d feel safe pluging an add-on device on it…