[DEPRECATED THREAD] webCoRE Beta Milestone 1

Dustin,

I started with your Piston 2 different times, updated it with my devices and so far, the light won’t turn on with motion

WebCore also says it is not subscribing to any events

Rick

Edit it and you’ll be able to click on the piston name to rename/edit.

In your ‘If’. why don’t you just put in your motion sensor?
Why use a variable?
I must admit I’m confused on what you are trying to achieve.
Do you want something to turn on with motion?

The log.info is quite messy :slight_smile:

I think it was more of a general attempt at getting readings from multiple sensors, like

device motionSensors = Motion Sensor 1, Motion Sensor 2;

Though I’m a bit confused as to how #17 results in a boolean, does anything but 0 equal to true?
I would’ve been more explicit with #17: boolean motion = {not(eq(count([motionSensors:motion]), 0))};

Hey Bob,

The original Piston came from Dustin and he was using 4 motion sensors, so in keeping with importing and adjusting, I left it in tact and only changed the device names

Shouldn’t it work as designed?
Rick

Boolean var = count() will result in true when count is non-zero. Implied casting, there are some values that will convert to false (off, closed, inactive, not present, not detected, etc), otherwise any non-empty string also returns true

you can tell, i hate implicit casting… It’s like admitting that the damn machine is smarter than you!

It is implicit casting to the defined variable type. If you use dynamics, no casting there

Can you try with local variables too? Does it work then?

changed it to this, will wait till it triggers and will report back

btw, that “stays unchanged for 1 minute” doesn’t work either. First of, it wouldn’t do what I needed it anyway - I need this to execute when the illuminance changes OR every 1 minute. This statement would work on a change or 1 minute after that change and that’s it. And secondly - it just doesn’t trigger - otherwise in that log I would have seen 2 similar log lines at 1 minute interval. Weird.

Hence the question still remain, how to combine a timed interval event with an actual event, i.e. fire a piston every hour or when an event happened.

Is anyone else having problem with specifying subscription? In one of my pistons I specifically select “never subscribe” and these events still kick off the piston to run. Am I the only one?

In this example both of the events with lightning bolts continue to generate piston runs even though I set them to never subscribe.

That was a use case for multiple motion sensors. If you aren’t going to use multiple then you just use the motion sensor in the condition. Someone asked for an example of what Adrian was talking about. So I whipped up what he was mentioning

Should be working, will retest

Looking for a comparison IF statement, ie.

If OUTSIDE_TEMP > (INSIDE_TEMP + 4) Then...

is this possible?

Yes, use an expression for the right hand side operand:

[Indoor Temperature Sensor : temperature] + 4

Put your device’s name in there, syntax is

[deviceName:attribute]
1 Like

Okay I have been tinkering with WebCore and trying to replicate a Core piston I have.

I can’t figure out in Webcore how to add 1 to a count every time a motion sensor is triggered.

This is a screen capture of the counting portion. I’m sure it’s something simple. I know it can be done because I am doing it in Core. I just want to take the global variable and add 1 to it every time the motion sensor triggers.

What do I select in here or set up so I will do it? As you can see I have created the global variables. Everything is working except the add one function?

I assume there is a do math or something like that, just can’t find it. Right now it writes the string to the variable when it triggers.

Any help would be appreciated just point me in the right direction.

looks like it’s working with local variables… weird…

I just tried it and it worked for me. Did you create the global var from the right hand panel? Also, try a hard reload on the browser as there was a bug earlier in the expression editor.

Ok, I have a starting point then, thabk u