Sonos tells me "door left open"


#1

**1)
Hi there, came from work the other day to find garage door left open for hours…
I usually get my simple automations done with smartthings app, ifttt…
Trying to build my first piston, I am lost, no coding experience, new to webcore

**2)
I wish I can get audio notification on my sonos every 5 min that my garage door is left open until its closed, and to send sms/notification to me
and if sonos plays music I want music to resume after every audio notification,
if the music is at low volume I want notification to be loud enough so someone would here it and react…
using virtual switch as “sensor”

**4)
Imgur


#2

I don’t have a lot of freetime at the moment, but normally, a trigger should be based on attributes, not $system attributes.

For example, line 18 can be changed to:
IF Garage Sensor's CONTACT stays open for 5 minutes

but you’d still need some kind of loop if you want to get spammed every 5 minutes.

Personally, I would rather program an auto-close of the door
(unless there is activity in the garage)


Pro Tip:
If you can designate a centrally located color bulb as your “Notification” bulb, then color X can represent “Garage door is open”. For those who are home, it makes for a great visual indicator, and does not require a volume adjustment for alerts.


#3

I would HIGHLY recommend that before gaining more experience with webcore and/or ST home devices, don’t use any security/lock related pistons, automations.
Even with pro coders (there are many in this forum) things can still go wrong because ST systems are not fully reliable YET.

The command is 'speak text and resume," you are correct but sonos is not really caring about that one:))) in my house it sometimes work and sometimes doesn’t.
What I do is,

With (Never Cancel Task)
sonos
Set level to 80
Speak text "bla bla"
Wait 5 seconds
Set level to 35
Play - what ever I want.

It won’t be the same song biut atleast music will be back.


#4

thanks @WCmore and @ike2018 for replay and help

I’ll need to play with it for months until I am able to figure out loops :joy:
I am using wyze open/close switch as ST virtual switch /indicator for my garage door
Color bulb sounds simple but I am trying to justify my Sonos purchase :slight_smile:
:beers:

ps
when I “Test” the piston nothing happens :roll_eyes:


#5

Often, loops tends to bog down the network, so I try to avoid them whenever possible.


In my house, I actually use both voice alerts and the color bulb indicator.
(with the light flashing 1 second before the voice alert)

This works nicely because when I see the light change, I can stop making noise in time to easily hear the verbal alert.


#6

In this piston, Test won’t do anything.
You’ll have to actually do the thing that is written as your trigger.
(real life testing)

When testing, you can lower the time a bit to make testing quicker.
(temporarily drop it to 30 seconds)


#7

Here is an idea,

IF garage door changes to OPEN
With Sonos (Never Cancel Task)
WAIT 5 minutes
Speak text “bla bla”

IF garage door changes to CLOSE
Cancel Pending Tasks

And with sonos, I have 4 of them:)) and finally I justified the purchase like this,
“F…it, i wanted them and now I have them”


#8

If you’re looking to monitor multiple contacts, the example piston Door Left Open Reminder - Configurable by Individual Contact can monitor multiple doors and windows and send an alert/reminder via SMS. It can (and I’ve done it with my piston at home) easily be modified to send the alert message to your Sonos speakers instead of (or in addition to) those SMS alerts.

Please note, however, that as @WCmore points out, webCoRE’s ‘Speak and Resume’ command is, at best, flaky with Sonos. It will sometimes restart the station or playlist, but more often than not it won’t. And when it does resume, it doesn’t resume exactly where the station or playlist left off. But your experience may be different.

Like many Sonos users with multiple Sonos devices (I’m up to 10, and will be adding the portable as soon as it’s released :grinning:), I’ve had much greater success using jishi’s HTTP API Bridge for Sonos, installed on a raspberryPi. But that’s a more complex solution best set aside for now, particularly if you have no coding experience.


#9

Oh I would love to have a tutorial on that one…
:heart_eyes:


#10

I’d say it’s relatively straightforward, but that probably depends on one’s relative level of expertise. If you have some general or even specific questions, I can try to answer them, although maybe we should move it to another thread. There are others here who probably know a lot more who might be better to write a tutorial.

Using the jishi’s HTTP API Bridge in combination with webCoRE can really give you a lot more control of your system, particularly in terms of managing groups. Other features (like Speak and Resume are also much more reliable.


#11

Let me work on it…I’ll start a new post when I need to ask questions…
thank you so much


#12

I did slight change and I am not sure if I did it right,
the last part… cancel pending tasks :thinking:

I am starting to enjoy this :slight_smile:
I’ll be checking the example piston for sure
Hopefully by next summer I’ll be able to understand all terminology :joy:

One more thing,

How do I find/edit my running pistons
I only see Paused pistons?

Thank you


#13

All of your pistons will be visible, and editable from your Dashboard.
(with the paused pistons at the bottom)


Side Note:
Most users only need one instance of webCoRE, but if you created more than one, you can switch between them in the top left drop-down menu.


#14

You can find it here:

And after changes it’s always best to upload the NEW piston so people can understand better what direction your piston is going.


#15

yeah I think I did “Cancel task on condition state” :slight_smile: line 29
Imgur

I can’t click/see Uncategorized Pistons, is it my browser? (Safari) :thinking:
Imgur


#16

And stay away from ELSE statements. (At least for now)
Instead use this,
create a seperate (oin the same piston ofcourse) IF BLOCK

If garage sensor changes to OFF
Then
Cancel all pending tasks.

Btw, what is this sensor? Is this an open/close sensor or something else?
Because with open close sensors, the command is CHANGES to OPEN or CLOSED

And so far this piston won’t play the notification again and again. But since you said this is your first piston, I’d recommend get this part done first and then we’ll move on to message repeating every 5 minutes. (ps: consider your neighbors as well LOL)


#17

“I can’t click/see Uncategorized Pistons”
Go to settings in webCoRE and then categories. Make sure that your Uncategorized category is set to show Details and not Hidden


#20

Try to upload images directly into the forum instead of using an image hosting site.


#21

I use wyze open/close sensor (over iftt) as virtual switch on my ST hub

I changed the ELSE statement…
Not sure if line 31 is correct, then-with sosnos? -do cancel all pending tasks…

I tried the settings before but it looks I never clicked apply

Thank you!


#22

It should be LOCATION and cancel tasks (if you dont select any device, it’s location)

And about IFTTT why are you not using the sensors in webcore directly? can’t you see them in WC?