Fairly new at this, but I’ve had this piston running for about 1 month with no issues. Then last night I noticed my AC didn’t turn on when it was supposed to, however I got to fire by going into webcore and hitting the “Test” command.
After which I notice that it never stopped and kept running well below the temp stop setting.
So far i have tried doing a zwave repair, restarting the hub, editing, starting and stopping the piston, also created a new piston with the desired outcome using a WHILE statement. But in all cases the pistons only seem to run once.
The expected action is, when I’m home and the temperature is above X and the door is not open for more then Y mins then turn on. If any of these are not true then turn off.
These are the piston facts
Piston state: false
Last executed: 4/7/2018, 12:53:00 PM (this was triggered today via the Test) Next scheduled: never
Subscriptions: 2 events, 1 control
Devices used: 3
Memory used: 34% (33733 bytes)
Also system variables has this: datetime$nextScheduledTime - Invalid Date
Any assistance would be greatly appreciated.
PS. I only installed the door sensor 3 days ago, but never had issues within the two days prior to last night.
Doesn’t seem to me you’re checking the door contact for a period of time to trigger your AC to run, and you may want to put turnning off section into ELSE IF.
For webCoRE specific design questions you can go to webcore’s own forum, there would be more people to help you out:
Have you confirmed that the Turn Off command works on it’s own without the other ifs? For example, if you created a Virtual switch and then put that as your only if, does the AC actually shut off? What type of thermostat are you using fro this? I doubt your thermostat will respond to a Turn Off command. Some use a setMode type command. It will all depend on your DTH. Also, how is your thermostat reporting back to ST the temp changes? If it is on a time basis, there will be a delay between your thermostat dropping below a temp and then the ac turning off.
I moved the Turning off section into ELSE IF, but i have a follow up question. How do i “check the door contact for a period of time to trigger the AC to run”?
This is what I noticed today:
After manually starting the piston with a test, it behaved normally until i left the house later today and it just kept running, ac never turned off although my presence was set to away.
I used the ST mobile app to just turn off the AC whilst out of the house.
When i got back home, my lighting pistons fired just fine, however it was not until I opened and closed the door the AC piston fired.
Remember this was working fine with zero issues until Friday, and I didn’t change a thing. The only new code is that of the door sensor which was done 2 days before the problem arose.
Try changing the check on the temp in the first IF to ‘rises above’ to make it a proper trigger rather than a condition (even though webCoRE is treating it as a trigger per the lightning bolt to the left. And you need to change the contact sensor check to ‘was closed for at least x’ to meet your desire to have it happen after the door has been closed for a period of time.
Also, change the contact sensor test in the second IF to ‘was open for at least.’
This really isn’t necessary in the webCoRE world where multiple straight IFs work just fine.
Triggers are like action verbs…Changes, drops, raises, etc…
Conditions are like states…is, was, changed, etc…
You can have as many conditions as you wish but only 1 trigger.<-----Super Important
Triggers sets things in motion…(makes the Piston evaluate) so if you have multiple triggers in 1 “if” then it would typically give you a false state.
Also, if you introduce a trigger in 1 “if” then you will need a trigger for all other "If"s unless your devices are represented in the triggered “If” statement …<----way too nerdy for the average Joe…But try to grasp.
I still however noticed that my piston state is False.
Piston state: false
Last executed: 4/7/2018, 10:57:50 PM
Next scheduled: never
Subscriptions: 1 event, 1 control
Devices used: 2
Memory used: 44% (44432 bytes)
What am i missing here
Update:
AC turns on when high temp is reached, however does not turn off when door is opened for more than 10 secs.
Whist AC was running with door open i did a test and it stopped. Trace test evaluated condition #36 (door open for least 10 secs) to be true and AC stopped.
Remember, if your trigger occurs and a condition is not met, it will not refine once that condition changes… Because it’s not a trigger. If you write everything as a condition, WebCore will make them all triggers as well. I think that might be what you’re actually looking for. For example, if the door sensor is open when the temperature goes above your mark, when the sensor closes, you want the AC to turn on right? If the temp is the only trigger, it will not go on until the temp goes back down and then back above the line again.
I would stick with your first one but choose all conditions… Temp is above, etc.
I sometimes use all conditions but most of the time I am using multiple “If” with 1 trigger per “If”…
You have 3 triggers so if I were writing this, I would have 3 “If” sections…
I’ll explain the 3 “Triggers”…Actions that “If” happens, Then “Do” something…Remember you can have 1000 conditions but only 1 trigger per “If” section. If you introduce a trigger in any “If” section then you will need a trigger for all other “If” sections.
Trigger 1
If temp “Rises” above
And
Any and All other conditions to be met
Then
Do
Trigger 2
If temp “Drops” below
And
Any and All other conditions to be met
Then
Do
Trigger 3
If door “Opens”
And
Any and All other conditions to be met
Then
Do
Here I would put a “Wait” period before the turn Off action
I hardly ever recommend “Else” sections to noobs because it gets confusing quickly.
Last thing here:
You can have as many “If” sections as you like. You can even have “If” sections after “Then” sections. However, you “should” specify how each section is evaluated (Execution Method). Synchronous (in sequence from top down) or Asynchronous (will be evaluated at time of trigger).
I would set this up as async for each section. You do this by pressing the gear icon when you click on the “with”, scroll down to Execution Method" and change all 3 sections to Asynchronous.
Ok guys, this is for all the marbles. So far the only tests I haven’t done are: 1. when arriving home and temps are high, 2. closing door when temps are high and 3. turning off when leaving home.
This is totally overkill. And you don’t need async either. But if it works, then go with it. But in general, you don’t need to have every trigger with the other two conditions. If you enter them all as conditions, WebCore will use them all as triggers and all as conditions.
Later today, I am going to give your version a shot. I think that’s what I had at first but then it seems to have fallen apart when I introduced the door sensor, at least that’s what it seems like.
What I did above does seems like a bit much to be honest and it sure seems like there should be a more efficient way of getting it done.
If you look at his Piston, there are few conditions that overlap. He has addressed all of his scenarios with 1 Piston and is exactly how I would approach this.
Although not always necessary, I’ve found it best to choose async if I am using multiple “If” sections that are working independently and especially if they have timers or wait periods in them.