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

Set the State as Value: tmpString is {tmpString}. weatherTemp is {weatherTemp}.

1 Like

Got it thanks.

At least if you set the State as Value instead of Expression, there are no quotes needed.

1 Like

The new version can extract that info now, if you haven’t tried it yet.

Make a GET request to https://api.darksky.net/forecast/key/37.8267,-122.4233,1498078293?exclude=hourly,currently with type JSON;
Log info "L2  {$response.daily.data[0].temperatureMax}";

+396ms	║║Executed virtual command log (2ms)
+417ms	║║L2 77.37

FABULOUS!!! Now the fun begins :sunny: :cloud_rain:

1 Like

You can also now parse JSON data into $json and read it from there.
You can also gain access to all data features of Weather Underground by using


List of data features here.

Here’s a quick example, using the JSON parsing and the WU hourly and alerts data features.


Sweet. thx @ady624 and @eibyer for y’alls help. Haven’t had a chance to try it yet. Maybe tonight, i can.

“TurningOn” is what you noticed in my logs. I never mention that anywhere in my piston.

Before sunrise, my virtual switch (Dimmer 7) was still on, but my two Philips Hue White bulbs were off. When sunrise happened, the piston ran and the first IF statement INCORRECTLY started turning on the two bulbs. I believe this is a result of checking to see if the virtual switch “is on” instead of “changes to on” (which you suggested). Then the second IF statement of the piston was checking to see if the lights were on and at 20%. If so, it should turn them off. But if the lights had remained off after the first IF statement, you wouldn’t have seen “TurningOn” in the logs.

The way things are now, this might work if the two IF statements were in separate pistons, but I already broke another piece out into another piston and would like to avoid having three pistons to control these lights.

Any other thoughts?

Yes, TurningOn is not a valid state. I assume there’s a TurningOff that was active which caused the failure to begin with. Switch can only be on or off. DTH needs to be corrected, please talk to the author and ask him to make it work according to documentation.

Great. Logically, that makes sense.
I was using, and still could use, Alexa. But I didn’t like her “OK” in a dead silent house. And of course I always forgot too.

Regard a “round” number: I remember seeing it somewhere recently but I don’t remember which Webcore thread it was in and can’t find it. Can someone show me the syntax for rounding a number?

The number is the result of an average temp of a few sensors that is used in a variable.

Something like (round{variable}) ??



1 Like

Hi all :slight_smile:

I’m trying to figure out how to do something simple, but can’t figure out how :frowning:

I asked this action before and I’m not familiar with coding, but I’d like to accomplish the following.

When a motion sensor (kitchen) gets active, first save the level of the lights (2 on different dimmers) to a local or global store or a variable, then turning the light to 100%.
When there’s no motion detected for 1 minute, restore the lights to their previous level.

The problem I have is that I can capture the level, the lights turn on to 100 % but if there’s motion in the period the lamp is at 100%, the global store will be set to 100% which keeps the light from returning to heir original value?

Is anyone using a similar setup and wanting to share his piston for that?


@Pieter-Jan take a look at the options for the capture and restore attributes tasks. the capture has an option not to capture unless the store is empty. the restore has an option to restore and empty the store. so, after the first capture the next captures will fail till the restore happens and the store is emptied when motion is inactive for 1 minute. if you use those 2 tasks, that should work for this piston.

If you still need help, let me know and I will build an example piston … probably late in the day though. or someone else might be able to jump in earlier and help you with it.

@ady624 I was rather hoping for a denial of request on this one.

Thank you.

1 Like

Man, tough crowd…


S’il vous plaît, Monsieur!

@SBDOBRESCU probably knows

1 Like

Je veux plus encore

I can’t seem to get fuel streams working.

I see the blue bars showing that it should be firing correctly, but when I click to view fuel streams, it says I don’t have any yet. I’ve left this run for about a day now.

@alixjg try ‘changes’ instead of ‘on event’