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

What’s the expression you have now? Also, did you want just the HH:MM AM/PM ?

Here’s the current test piston that I have set up:

I’ve also tried time(TimeToRun)… Yes, I’m just wanting HH:MM AM/PM. I’m sure I’m missing something obvious, but I just haven’t dealt with this type of thing yet.

Try this, substitute your variable TimeToRun where $now is, then change MST to your time zone. Log the info and see if the time output is something you can use.

replace(mid($now, (indexOf($now, "@") + 2), (lastIndexOf($now, " ") - 3)), " MST", "")

1 Like

That’s perfect! I’ve still got a lot to learn about syntax, but this is a big help. :slight_smile:

1 Like

As I understand it there’s no built in way for ST to proactively alert you when any devices battery level drops below a threshold. I thought there may be an easy way in webCoRE to do this. Maybe something like:
For each physical device
If device has a battery attribute
If battery level below 70
Send SMS "device (device name) battery level down to (level)"
End I’d
End if
End for each

How can something like this be done, if at all.

Thanks!

I believe there are some in the piston examples thread that might get you started.

So I built it and started testing it. Shame on me, I included all my current contacts - what I should have done was just include my two “test” sensors, LoL. My bad!

First test - open a sensor and wait to see if vSensor opened. It did, check. I left the first sensor open to see if vSensor would close then reopen or stay open. To my delight, it stayed open. I closed the sensor and vSensor closed 5 seconds later. Excellent result!

Second test. I opened and closed the Sensor 3 times with 3 second delay between each open/close. My hope was the vSensor would have opened 10 seconds after the Sensor opened the first time and close 5 seconds after the last close. Nope, the piston crashed! It opened vSensor quite a bit after my actions, then the “physical” sensor opened and closed 3 times - no idea how or why that happened. Then vSensor closed for a bit then opened and stayed open and would not let me close it. Then I got locked out of the piston and couldn’t pause it. (see my help posts yesterday)

I believe what happened was while I was testing, one of my other physical sensors was opened and then closed. As each physical sensor was tripped after that their vSensor opened and stayed that way until I deleted the piston from IDE.

I’ll rebuild it (and only add my test sensors) then post a copy and any test results with logs (if it doesn’t lock me out again, lol).

I’m hoping we are on to something good here. I know ST support says this is a common complaint about SHM (false alarms from lagged disarm), so this may help others if we get it working - fingers crossed.

For the specific scenario, couple of my motion sensors are wired with USB power. If the power was disconnected to either of these I expect those devices would then become unavailable. Is there a way to check if a particular device is unavailable?

Thanks!

@HDGuy try this piston. Works amazingly

It looks like this:

1 Like

@Townsmcp Very nice. Is there a way to actually import this piston?

Thanks!

Everyone is thrown off when they read import and see import on the new piston dialogue. Instead click the orange restore button and type in the code zmjr

1 Like

@c1arkbar :slight_smile: thank you.

@c1arkbar how does one remove the “Unknown Device X” devices from the list. They are still in my imported version except like this:

Thanks!

Edit: I just selected a bunch of random devices to get to the same count of devices then removed the devices that were not battery operated.

1 Like

Glad you got it worked out

Hello. I setup this piston for turning on my master bathroom light. And then to wait randomly 2-5 mins. to sense movement again before turning off. Everything works, but after the wait 2-5 mins. the lights do turn off, but the piston state stays true on both the piston page and main page. Don’t know if that is normal or not. It just drives me nuts that it doesn’t change to false. Am I forgetting something? I mean, I know I’m missing something!:grinning:
This is the piston running:


This is when I hit the test button: It does change to false

Automatic state is false when the last if is false. Otherwise true. Disable automatic piston state in the piston’s settings (click the piston name in the editor) and set your own custom state in each branch using the Set piston state task. People are using colors and even icons and spinning icons… gone nuts :wink:

I put an Iris plug on my washing machine so that I could have a piston tell me when the washing machine has started and ended. I’ve tried both stays and remains and it seems that every time the power changes the timer will restart even when the changes stay above the 5W threshold. Am I going about this the wrong way or just not selecting the correct option.

When I use the stays less than or equal to 5W for 2 minutes, that works, but obviously the washing machine is off and the power is not changing.

If
Washing Machine power stays greater than 5W for 5 minutes
.
.
End If

or

If
Washing Machine power remains above 5W
.
.
End If

Thanks @ady624. I played with this thing for 2 days. How simple. I already did one earlier with disabling automatic piston state.

@bangali, @anon36505037

So I did try the install of webcore. Again following the referenced manual, all 5 parts installed, one after the other, enabled Oauth, then tried to load it on the mobile device as described - no luck. The published apps are available, however, I can load the webcore app, at the 1st screen I don’t do any input (no input fileds are showing) and press “Next”. The app then erors out with "Oops! Looks like you need to double check some inputs."
Then I went and installed it to the location via the simulator, and this time it seems to show on both sides (IDE/Simulator as well as the on the mobile device). However, the access to the dashboard on the mobile device fails after I enter the password and I can see in the SmarTthings IDE log a message that the token is invalid. Any ideas?
Platforms
Mobile: Windows Phone 10 /Edge
Desktop: Ubuntu 16.4/Chome

Thanks again…

When using triggers, if the triggers are within nested if statements and not at the top level, does that cause any issues in the trigger firing? Like so …

Thanks!

1 Like