[DEPRECATED THREAD] webCoRE Beta Milestone 1

Just curious … what happens if you make the WITH block in the last IF synchronous? Does it cancel and no longer turn off after 1 minute?

EDIT:
OK, ignore this since Adrian is addressing the problem in another thread, LOL

1 Like

Something else that seems odd – I just created a piston, and I’m looking at the list of variables (which helpfully shows their current value – thanks!). $utc is my local time. $localNow is the correct offset from that, which makes it clearly not the local time. I’ve verified the time zone is set correctly for the hub in the IDE. How can I help figure out whether this is a WebCoRE or a hub configuration issue?

1 Like

From the boss (post #945, in this thread):

Nothing wrong with $localNow and $utc - they contain the number of milliseconds since some Jan 1st 1970, and that is always in UTC. They are only useful for manipulatinf them by division to seconds, minutes, etc. $utc is shifted with the timezone offset so the difference between the two will give you the actual timezone offset in milliseconds. Use $now (datetime), $time (string), or $time24 (string, time in what the US calls the military format)

1 Like

I apologize for the off-topic request but can someone point me to where I can learn how to set up contacts in ST? I see that webCoRE can send messages to contacts but I cannot find out where you add the contacts.

Thank you!

1 Like

Search for “enable contacts” in the forum

2 Likes

UK?
If so it is not officially available.
But there are ways around.

1 Like

No, US. Thanks.

1 Like

Got it. Thanks.

1 Like

sorry, was on a phone, hard to search… but you have to enable it

1 Like

Yeah, I’ve followed the changing URL process before and could never get it to work but I slowed down this time and followed it step by step and it worked. Not sure why ST hides the contacts.

3 Likes

Hopefully this is an easy answer. What is the best way to reset a variable (counter) every day at midnight? Are there any examples? I can’t seem to find one.

1 Like

I do a simple hallway count overnight to see how often the boys leave their room over night. I have one reset in the morning and weekly total count reset on Sunday

if 
Time happens daily at 6:00:00 AM 
{
when true
Set variable {hallCount} = 0; 
Log info "HallCount {hallCount}" and store in Messages; 
}
end if;

if 
Time happens daily at 5:59:00 AM, but only on Sundays 
{
when true
Set variable {hallWeek} = 0; 
Log info "Hallweek {hallWeek}" and store in Messages; 
}
end if;

Below is the second “IF” statement and setting the virtual device to Time. I then specified the Time and added a Sunday as the only day it will run at my set time.

The restore backup code for my Motion counts is ro69.

2 Likes

Time happens at or a timer, then set variable.

1 Like

I’m curious what everyone is doing with their presence pistons and accounting for those times when your smartphone presence hiccups and shows you gone and then back again and then gone? My iOS phone works flawlessly but my wife’s iOS phone on occasion will show her leaving and then returning and then leaving as she pulls out of the driveway. This causes havoc with the garage door, locks, and other automation.

I have the location set correctly on both of our phones in the ST app. What’s a good way to ensure we’re not actually present before the piston starts firing?

1 Like

You could put a wait in. If presence leaves wait five minutes and do whatever.

1 Like

Oh ok…great. I did see that but wasn’t sure what the previousage was doing. I will try that. Thanks for sharing.

1 Like

So, something like this?

1 Like

I added my 14th or 15th webcore piston and in the browser it says click here to enable automatic backup, yet when I click it nothing happens. The other pistons I have created seemed to have auto backup enabled. Why is this one giving me grief?

1 Like

eh I copied it and made sure auto backups were turned on. Problem solved.

2 Likes

Just want to add to the chorus of gratefulness for this wonderful app! @ady624 , this is really amazing! I had over twenty pistons in CoRE, and I’ve now replicated the functionality of all of them with six pistons in webcore. The logic you can build into these pistons is unreal! Thanks again for all your hard work on this!

3 Likes