This piston does not subscribe to any events. Unless executed by other means, it will never run on its own


#1

1) Give a description of the problem
This piston does not subscribe to any events. Unless executed by other means, it will never run on its own.

Value goes below or above if statement and doesn’t run the statement

2) What is the expected behavior?
If value is greater than 750 turn on the switches, if below 750, turn off the switches.

3) What is happening/not happening?
Nothing, value returns true all the time
If i set to full logging and click External URL: (click to open/execute) nothing shows in the log.

If i edit the value, it picks up the solar radiation as per

If I select a value from the weather station manually such as illuminance then its fine, its just the values that I choose with a triangle that are an issue


#2

Ok as a test i created my piston checking illumenence and while it sees the triggers its not actually turning on or off my switches.


#3

You don’t have a lightning symbol in the left bar, meaning there’s no trigger.

Make sure you select a trigger and not a condition.

Have a look at that post for in depth explanation: https://community.webcore.co/t/conditions-and-triggers-the-difference/

Also, IIRC, you can’t subscribe to system variable like you intended to do. A workaround would be to check periodically with a timer. I might be mistaking tho.


#4

Yeah If i manually call it from “External URL: (click to open/execute)” it works, i’d prefer not to have a timer run it every minute but guess if i have to then i have to… there is no other way to do this?


#5

Ok, i have put everything concerned with it into a single piston, hopefully this will work


#6

seems to be working


#7

I appear to be having a similar issue.
I have created a virtual switch to use when the illuminance level drops below a certain level.
This virtual switch is then used in motion sensing pistons for lights.
The source of the illuminance level is reading every 15 mins.

But how do I get the virtual switch triggering

What I want to do is this -

if multisensor.illuminance <= 500lux then
LowLight - Turn On
else
LowLight - Turn Off
endif

I had this working in CoRe but now in webCoRE is doesnt seem to fire…
I even tried a -
if multisensor.illuminance changes then …
seee above

Your guidance and advise would be appreciated

I suppose I am still gettting my head around triggers and conditions.


#8

Just to unfuzz my fuzzing mind … you were using [multisensor:illuminance] in webCoRE, right?


#9

Here is a piston I have that turns a light on if the lux level is below a certain value and there is motion.
Works perfectly. You can adapt it to suit your needs.
The reason I save the lux level to a variable is because I have a few of these and if I need to change the lux sensor, I just amend the global variable and not 10 pistons.
Also, you can ignore the set piston state part.


#10

Thanks elf & bobbles

Yes I use the illuminance of my multisensor in webCoRE.
@bobbles, the piston that sets the global variable would be good to see
I do something similar but use a simulated switch to record whether the illuminance is below a certain level :wink:


#11

The lux variable is at the bottom of this piston. I use an average of two sensors as I had one ‘freeze’ on me and at least this way only if one freezes at a high setting does the variable not go below certain levels that I use to turn the lights on.
If that makes sense. :smile: