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

I created the following design for alarm activation. It doesn’t work the way I wanted so I’m asking for help.

If Presence Sensor 1 is not present
AND
Presence Sensor 2 is not present

THEN
set alarm to Armed/Away

However, if Presence sensor 1 leaves the area resulting in “is not present” - the alarm is activated even if presence sensor 2 is still present.

I fixed the regex adding color swatches to anything it matches like an RGB code - it was updating the styling too - should be fixed now.

The rangeValue returns a matching value like so:

rangeValue(input, defaultValue, point1, value1, ..., pointN, valueN)

it takes the input and starts comparing it with each point, if the input is found to be larger or equal to a point, the value corresponding to that point is used instead of the default.

rangeValue(10, ‘#000000’, 3, ‘#400000’, 6, ‘#800000’, 9, ‘#c00000’, 12, ‘#f00000’) returns ‘#c00000’ as input (10) is only larger than the 3rd point, not the 4th.

there is another perhaps better choice:

rainbowValue(input, min, minColor, max, maxColor)

This will return a color between minColor and maxColor, keeping the scale between min and max. Thanks to @ahndee for the inverse HSL gradient idea

rainbowValue(75, 60, 'Blue', 90, 'Red') will give you green #00ff00

Thanks Ady. This is going to help simplify some of my expressions greatly.

Try setting your piston to say “all present sensors are not present”. Like this.

spoiler alert: noob question…
How do I get to that console looking view that you have via desktop? I don’t know of any way other than using the interface on the phone… I’m looking forward to using that better interface.

Hi, Justin!

Take a scroll through this page, it will explain everything:

Edit: Especially the section entitled “Using webCoRE from another browser”

I have a kinda complex project that I would like to create… before I begin trying to do it, I’d like your input on wether it’s doable or not.

So, I have a door contact on my Scotch cabinet which contains about 16 bottles.

Basically, what I want to do is automatize the logging of how much there’s left in every bottle.

I’d like webcore/ST (or IFTTT) to send me an SMS each time I open the door and ask me which bottle I poured a glass of.

Then, I’d like to be able to reply with a number (1 to 16, corresponding to a specific bottle. I’d like ST or IFTTT to then deduct 5% from remaining % for that bottle. In other words, replying let’s say “1” would deduct 5% from the Octomore 10yo which is at 90% right now.

Of course I understand I’d have to the initial inventory.

In a perfect world, I’d like to store the values in webcore for the tiles and in google spreadsheet for other uses.

I think it would be possible, what do you think?

Edit : I figured how to do it. I’ll explain in details if anyone is interested.

I’m not having any luck of a Piston turning off a light for a given time event (sunrise or specific time). I can’t figure out why the light stays on.

You can remove the first IF. webCoRE will only turn off the device if it’s not already off. This is called Command Optimization which is on by default. Command Opt can be turned off in the piston settings as sometimes you may not want it on.

However, you can check for a device being on if you wish but to do so I wouldn’t check for indicatorStatus. Instead check for ‘switch’ is on.

Perfect…worked! Thanks a million!

I’m trying to insert \n to create new lines here…what am i doing wrong?

45 PM

How do I fix this?

05 PM

Trying removing the double quotes around the \n.

that didn’t work. 05 PM

Are you sending it by SMS? I don’t think it works on that (and one other thing I can’t remember atm).

no, it’s a push notification. I’m stumped.

It maybe that one that I was trying to remember.

“\n” also doesn’t work with notifications and Messages (in the ST app) — only works in the webCoRE dashboard, IIRC.

ok thanks. Can I get the last 1.5 hours of my life back now? :grin:

No you can’t … you go in the hole like the rest of us, LOL

Good memories… at band camp…