[DEPRECATED Thread: visit community.webcore.co for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

Ron - sorry could not resist …

Look at your phone :wink:

1 Like

Tell me I got it???

image

almost there … move line 32 & 33 after line 26. AFTER that delete the empty With in the else block which is currently at the line 29. after you are done, there should be no else in the snapshot of the piston. :slight_smile:

1 Like

Hadn’t thought of that. So trying it now. Thanks for the suggestion.

I tried this before, but the IFTTT was too slow and not always reliable. Maybe it’s better now.

I have a fuel stream collecting the power readings from my Aeon home energy meeter with readings every 15s… After a week, I have quite a lot of data points and it crashes my browser when I try to look at the stream… is there a clear the stream or tell it to only store X days of data or something?

Some help with “Time”.

I have the below piston:

2017-08-18_13-52-42

It seems simple enough. However with logging I get this:

The red arrow is a “time” event from my smartthings hub.

The green arrows is a “time” event from one of my motion sensors.

With the red arrow it seems to have grabbed the whole date time versus just the time as seen with the green arrows. I am finding “Time is after” events are triggering as a result because the date + time is a much larger number than just time. Hopefully I am making sense.

Are folks also seeing this?

Can someone help me with this?

I’m trying to get my speaker to speak any new weather alerts.

here is what i have so far, but it says its not subscribed to any events.

Thanks!

You may get some good ideas here:

Samples Link

There is a good weather section.

You might just settle for setting it up on an hourly time just to kick it off. Then have the check to see if the weather alert variable has changed and if so then read it out.

Another option is to have this piston execute from another piston that is based on motion sensors going active.

Essentially you need a heartbeat for this thing. The define section only updates after an event from something the piston is subscribed too

That time event is a result of your stay trigger having timed out after 15 minutes of motion inactivity. Since stays is a trigger, it will inhibit any time subscriptions for the @bedTime - you are expecting motion to end and then 15 minutes later to be past bed time. That is when things will happen

1 Like

The thing about it that puzzles me is that I thought “changes” was a trigger.

So I don’t know why it says that the piston will never run. Is there something wrong with the way I set up the variable?

Ah … the time event is for the “stays”.

Okay. Perfect explanation.

1 Like

Changes is a trigger. You are correct. However know how the piston functions in general will explain why this will not work.

Your piston will execute anytime your alert variable changes. But your alert variable will only update when the piston executes. Any variable in the define section that has an expression will only get evaluated at the beginning of a piston run. Since the only way to run the piston is this variable to change, it will never happen

Hi, I have created a piston for setting the location mode and just wanted to know if I’m on the right track or if it could be done better?


Where pressence sensor 3 in s my wife and pressence sensor 1 is me who sometimes come home early in the week to work from home. Switch 1 is a simulated switch that is turned on if I’m on holiday so it will turn to home rather that work. I also need to do a separate pistion to change the mode if I’m still at home during the week after a certain time.

is there a way to play an mp3 file that I have stored on google drive through my wifi speaker?

How do I do this with webcore? Can someone please point me to a piston example or a link for help? I’ve been searching without success.

Thanks.

This is very rudimentary, but it’s all i know how to do so far.

I right clicked on the mp3 file in google drive to get a shareable link and pasted that link in webcore, but nothing happens…what am i doing wrong?

that would work or you could try the ifs slightly differently. as an example:

if (
      presence sensor 3 changes to present
      or
      presence sensor 1 changes to present
   )
   and
   time is between 7am and 7pm
then
   set location mode to Home (only while Party, Evening, Movie or Night)
else
   ...
   ...
   ...
end if

Also, remove the only when restriction at the top of the piston. you shouldnt need that.

@kebel871 how you doing on your inventory piston?

I’m trying to do two things with my Sonos Speaker and failing at both.

  1. I want to speak text when something happens. But I want to set the volume to a specific level, speak the text, and then set the volume back to what it was before the text was spoken. I’ve captured the volume to a variable, but when the volume changes, so does the variable.

  2. I’d really like it if it would return to the where it left off. If I’m playing a playlist, it skips to the next song. Its not the end of the world, but it would be nice, if it could keep track of where it was and resume. I’ve tried speak and resume, and speak and restore, and even just speak. Maybe capture the track into a variable?

Here’s my attempt to capture volume that is not working.

You read my mind, I was actually looking back in the thread for our conversation.

I tried what you suggested and made mere progress. I’ve played around with lists and arrays and got them working. However, it’s like I miss the big picture. I have a hard time to visualize how everything will work together and produce the same end user experience.

I ended up calling it a day and haven’t got time to get back on it since.

I’ve been thinking about the design tho and I think the solution might reside in an hybrid code where variables that I won’t frequently change manually (names/Colors/ etc) are in lists and those who needs more manual adjustment are in “normal variables” as they are now.

Your help would definitely be welcomed if you feel like it. My unoptimized piston is fully working but I’m limited in adding functionality as it hitted 25 chunks.

Sorry for my crappy English, my mother language being French (Canada).

Did you end up being able to import my piston? It might not work on mobile/iPad but I’ve been able to import it myself on a desktop.