Announcements Happening When They Shouldnt be


#8

Select NEW piston…
Choose RESTORE PISTON FROM BACKUP CODE
Enter 2p2sr (which is my pistons code)
replace matching devices according to your system.

Or you can simple re-write this one.


#9

Ok got it up and running. I cant thank you enough. I do believe it has stopped the duplicating after a few tests.

Not my next instance would be to add multiple to contact sensors to this? What would be the best practice to do this?


#10

I am glad it worked…
I know the feeling of “being strangled by a wife LOL” (she already killed me several times in her head LOL)

you can add many sensor as you want (as many as webcore allows in a single piston) I believe up to 30 or smthg like that…

If seperate rooms we are talking about.I would normally create individual pistons for each room.

if you have more questions for the next instance just shoot,I’ll do my best:)


#11

Ike thank you so much. I am going to shut it down for tonight, but tomorrow I am going to test something like I attached here. I tried to set it up with variables…But I cant test all the doors because it is close to midnight and everyone is sleeping…And I will surely be killed by wife and kids if I start opening them.

Here is what I did, Ill test it out and get back to you. Again, thanks for all the help. If you have donate button or something let me know.


#12

I’ll check it out…
Thank you for the thoughtful gesture you are very nice… I am just here to help… I had struggled a lot at the beggining and this amazing community helped out a lot. Now my house is in greate shape and this is just paying it forward lets say.

if you click on SOLVED that would be great for the people who comes later with similar problem… That’s all I can ask:)))

Thank you…

Update : I looked at it… It should work. I just don’t know what will you do with the variables in this case? It’s great IF you want to add more sensors in the future. You don’t have to add them to 3 conditions one by one, you can just add them to the variable. But other than that do you have any plans with it?

Update : So sorry, I was not reading the speak part LOL
I like it…
It should be fine (never say DONE without testing in smart homes:))) I don’t know what would happen if two doors are opened at the same time or just a couple of seconds apart though. The piston will be triggered, matching devices saved, another door opened, piston re-started and saved the new matching devices…himmm never tested this… let me know… (but maybe in your case this will never happen. In my house we have 4 entrance doors and NEVER they’ll be opened the same time or even a minute apart - living style)


#13

I just realized you posted the same question in two threads, so I am moving my response to this one:


At a quick glance, it seems that the moment your door opens, piston “49pv” will pause itself… Is that intentional? I don’t see any code to resume that piston, so I assume the logic for that is elsewhere… I suspect that the UNpausing later may fire off the trigger once again.

For what it’s worth, wherever possible, I try to never pause a functioning piston. I just tweak my code accordingly.

That being said, I have seen a handful of doors that vibrate when closing, so it may be briefly changing to close-open-close all in under a second. (although your log would identify this)


#14

To summarize Ike (if I may)

In your original piston, whenever your contact sensor changes (opening or closing) the entire piston runs top to bottom. Meaning, when the door closes, it will run the final ELSE statement.

Putting each of the 3 possibilities in their own IF block (without using else) sounds best to me.
(like the “2p2sr” above)

The only small change I would make to his is:

  • Greater than 75 (which is 75.1 and up)
  • Less than 30 (which is 29.9 and under)
  • Inside the range of 30-75

Using the temps in “2p2sr” will not run any code if the temp is 30.1 - 30.9 or 74.1 - 74.9


#15

Nice…
thank you so much @WCmore
And @Philpan hear him out, lots of my pistons are written by him.

Yeah I knew something was up with that ELSE :)))) but I did not know what it was LOL

And thank you for the better version of the piston…
Since you are here let me ask you… Do sensors register .1 .2 .3s??? or they just skip from 38 to 39??? how do they work???


#16

Oh… Well it depends on the device if decimals are read. (many of them do see decimals)


#17

@ike2018 and @WCmore thank you both for all your help. This morning I woke up excited to hopefully get everthing set up and running. And I now have a very strange issue happening, and I have no idea where to start to fix it.

So when I attempt to use the Piston with the pistons…This one.


It completely locks up my Echo Speaks, and nothing speaks at all anymore. I have to go into the Echo Speaks app, and reset my Heirko Login Info.
Once I reset everything, if I pause this Piston and unpause the original one you guys got my using…This one.
Then everything continues to work just fine.

I have no clue why this could be happening. I looked over the variables code and it seems like it should work. ??


#18

When a piston doesn’t work but looks like it should, I would start testing step by step.
You can test this with a door sensors or simulated switch.

let’s simplify your current piston to test it. Maybe echo speaks has some issues with formatting of the variables?? (I don’t know because I have never used Echo speaks)

1 - by the way, please test your current one first and post your logs.
2 - Try something like this:

Device testswitches : contact one, contact two
device testresult

IF testswitches changes to open
save matching devices to testresult
then
speak (testresult) is on now

(don’t mind the syntax. this is just an example to identify the problem)


#19

Ike, which logs would I post? Logs from webcore, or Smarthings? Which is the best practice to get them?

As it turns out also, it seems it wasnt just the running of that one Piston. As I turned it off. And went out for a bit. When I came back home, nothing was working. Nothing speaking again.

I dont know what it could be.


#20

Hi Phil,
Logs from webcore…


#21

@ike2018 or @WCmore,
Hey guys, hope you are having a merry Christmas!! As you can see from my attached piston, I am slowly starting to understand things, and am growing my pistons. I am currently still working on the doors piston; but I seem to be having some issues with this section.

It seems when I am trying to pass a variable into the Speak section, it never seems to speak; or get chosen when I am using Random. And then in the evaluation section when I am creating this expression, it just comes up null. I can’t figure out what I have wrong? Maybe you experts can take a closer look at it.

I am passing a variable into speak in another much smaller simpler piston, so maybe something else is going on here. But I been at it all day with no luck.

Here is the entire piston.

Hopefully its something easy you guys can recognize.


#22

Your snippet “Set variable” looks alright to me…

I use an entirely different method to convert text to speech, but I have seen many people mentioning that the set volume, speak and restore should be in separate commands.

Hopefully one of them can chime in to clarify.


#23

Hi guys
Merry Christmas to you too…
My experience with text to speech was not so great espcially using variables. Somehow it fails to speak many many times (Sonos speakers all around the house) I decided not to rely on Text to Speech anymore.

Here is what I did - I know not a solution to your piston - but maybe you like it?

  • I used a web site that turns text to speech and lets you download mp3s
    http://www.fromtexttospeech.com
  • I like the option called DAISY.
  • created bunch of mp3 files.
    Alarm, cat door is left open.
    Main door was left open more than 20 seconds. Somebody count the cats.
    Someone knocking on the front door. Camera 1 is activated, take a look.
    so you get the picture.
  • Uploaded all of them to my website (you can even use a free website hosting, it’s very simple)or host them yourself in a spare computer in your house. (if you liek this idea, hosting them yourself I can link a youtube tutorial for it)
  • Used all of these mp3 extention with their URL links in RANDOM command…
    PLAY TRACK : (Either variable or direct link) ww w.examplesite.com/soundfiles/maindooralarm.mp3 for instance…

Works perfectly. Never had a problem yet.


#24

@WCmore is your method to convert speech more difficult? Or too difficult for me to comprehend?

I need to at least get the {doorContact} to pass, otherwise I cannot use it at all. You see here how I am getting null in the expression? Im guessing that shouldnt be happening?

I tried taking things out and such, but cant seem to pass the variable if it is in the random function. I passed it without random.


#25

This seems interesting @ike2018, and something I will surely look into. It is little too time consuming for me to get involved this week. I felt as if I was just tieing up what I needed to get things to work like I needed to…

I’d love to get this working, even if I have to switch up the commands. I’d like to know what is causing the issue, for future things I want to do.


#26

It requires an old Android, a speaker connected to it, about $5 for the app in the PlayStore, and maybe a half hour to set it up the first time, but I like this method.

Before trying that though, can you humor me by testing your “c8pjt” piston above that is only sending the speak command? (no set volume and no restore)

If that works with your random, then the issue will likely resolve using different syntax.

Surely, someone who is using your method can chime in with more specifics.


#27

Yes, I have tried that. Here are the logs… I stuck the whole thing on a test switch a bit ago, just so I didnt have to open a door the entire time. Here are the logs…Now, it seems like its not running correctly at all…Before, I was saying it was definitly something in my Speak expression…

12/25/2018, 8:24:24 PM +610ms
+1ms ╔Received event [Test Button].switch = on with a delay of 508ms
+133ms ║RunTime Analysis CS > 31ms > PS > 64ms > PE > 39ms > CE
+137ms ║Runtime (51288 bytes) successfully initialized in 64ms (v0.3.109.20181207) (134ms)
+139ms ║╔Execution stage started
+152ms ║║Comparison (enum) on changes = false (1ms)
+155ms ║║Condition #38 evaluated false (7ms)
+157ms ║║Condition group #1 evaluated false (state did not change) (10ms)
+159ms ║╚Execution stage complete. (21ms)
+162ms ╚Event processed successfully (162ms)
12/25/2018, 8:21:13 PM +87ms