Seriously Can No One Help Me?!?! This is getting Frustrating


#1

1) Give a description of the problem
This piston is constantly having errors. No matter what i try it will either quit part way through and not finish the tasks or it goes all the way through and locks the doors 3 times. It happens only on the change to present half of the Piston. The first half runs flawlessly.

2) What is the expected behavior?
For the piston to not error out every single day.

3) What is happening/not happening?
See above

**4) Post a Green Snapshot of the piston

**5) Attach any logs
I tried logging this today and neither the piston nor the IDE shows a log.


#2

@ady624 @bangali @Robin @WCmore

Can any of you look at this and help? I’m tired of banging my head on my keyboard trying to fix this.


#3

I do not have a bunch of free time at the moment, but I would change your "only when" statements to IF statements instead.


You can also combine many of your statements inside one block.

For example, all of these can be inside a single IF statement:

temp


Also, I am a big fan of adding ā€œlog to consoleā€ commands splattered about when testing complex pistons. It makes wading thru the log much easier to see.

Side note:
When saving this piston, if it displays 22 chunks or more, you may not get any logs at all, since your piston is taking up the entire allocated space.


#4

i was wondering about that. I’ve read a few places where nested ifs have errors but this has been crazy. I’m gonna try that next.


#5

Or check out a switch statement. That could save on lines of code


#6

Nested IF’s using conditions (as you did) and without timers are usually harmless


#7

I don’t quite get how a switch statement works. Do you have an example I may see?


#8

Change your primary triggers ā€˜changes to present / not present’ to conditions ā€˜IS present / not present’.

When the piston wakes up from the 30 second of 300 second waits, the presence sensor has no longer ā€˜changed’… this state reverts to standby (for want of a better word) after about 10 seconds, so this may be cancelling the flow of your piston.

Alternatively, set each element to ā€˜never cancel’ but that is rather long winded.

In regards to locking 3 times… how can a locked lock be locked again? What is telling you this is the case if you see no logs? Even if the device could lock twice, webCoRE has command optimisations to prevent this.

In regards to logs, your piston is too large, uses too much memory so webCoRE cannot spare memory for logs… consider splitting it into two, with global variables bridging the gaps.


#9

I have command op off because the viper smart start doesn’t recognize state and my Yale Lock is finicky if its not all the way locked manually. So it beeps to tell me its already locked and ST states its receiving the lock command three times.

I originally had these at ā€˜is’ and all my presence pistons were doing this. I thought that each of the pistons were doing it to each other because of the is.

This is by far my largest piston and the only one that has these errors. I’m limited on the amount of commands i can send to the viper system so i have to fix it lol.


#10

I would be very tempted to move the important lock sections to their own piston, and keep the ā€œconvenience codeā€ separate.

Something like:

IF Presence sensor's presence is present
    Then
        Wait 300 seconds
        Lock Door
END IF

IF Presence sensor's presence is not present
    Then
        Wait 5 seconds
        Lock Door
END IF

#11

That’s definitely an idea. The other code is just filler to remind me to set my heat or ac for the remote starter.


#12

Fancy code is all fine and dandy, but I usually keep the important (crucial) commands in a piston as simplified as possible.

One other food for thought, all presence sensors I have ever seen will occasionally drop out sporadically. So even if you are sitting in your living room, your presence sensor may think you have left, and then returned a few minutes later. (Meaning your door could be unlocked for 300 seconds while you are sleeping etc)

Just a heads up.


#13

I use tasker which only turns on to monitor while my phone is near my cars wifi. If its off the presence sensor wont move.


#14

I use Tasker as well, but how do you tell webCoRE that Presence sensor 1 is Tasker?
I thought Presence sensors were either the App (using GPS), a device, or a keychain etc.


#15

I created a simulated presence sensor with ST IDE.


#16

Ahh ok, I use a Simulated Switch to do something similar.


#17

That’s all it really is. Its one of ST built in DTHs. It acts just like a switch. I have a vinli device in my car too, which doesn’t work in my rural area. it still creates a wifi hotspot though. so i use it as my near wifi to turn on and off the autoloc monitors. Im pretty sure i got most of my inspiration from your posts lol.


#18

I seem to always be trying to ā€˜break the mold’ in SmartHome programming, LOL


#19

My entire phone now receives customized notifications for just about anything in my home. I have different sounds, leds and even built my own customized alarm clock using tasker and webCoRE.


#20

Very cool. Once I linked up webCoRE to Tasker (and then eventually EventGhost on my PC), there is no limit as to the capabilities. It makes each ecosystem infinitely more powerful and capable.

It works in reverse as well, such as when my girl texts me, a certain light flashes pink for a few seconds.