Global Time Variable


#1

I have a Global Time Variable called @WakeUpTime. I use it as an alarm in the morning, and also as criteria in many other pistons to determine when I’m asleep and when I’m awake (and therefore how they should behave).

It works fine, until it doesn’t. Twice now my morning alarm piston has stopped firing. It took me a good while to figure out what was wrong, but somehow the @WakeUpTime cleared itself out–at least as far as I can understand. Although it continued to display 6:10 AM in the global variables area, clicking on it showed it was blank. Then, reentering the time had everything triggering correctly again. It happened again this week, and resetting the time worked again. I’m sorry I can’t be more specific in why resetting the variable seemed to fix it.

As a possible side note, it is surprisingly tricky to enter a time into it. If I enter the time as 6:10, or 6:10 AM, or 6:10:00 then it sets the time to 10:10(?). I have to enter the time as 6:10:00.000. It took me a while to figure that out. I only mention that in case it is related.

GlobalTime


#2

I can’t think why your global variables are clearing out… are they set from any pistons as well as manually?

Maybe give my simulated alarm clock device a try… you can set the alarm time etc directly from the ST app and snooze / silence using a routine widget for quick dreary eyed access in the mornings.


#3

Cool alarm clock!

Calling the variable an alarm time is a bit misleading. I do use it to trigger things around when I wake up, the thermostat turns on 45 minutes before hand, and my lights start gradually turning on around then. But mostly it is used by most of my other pistons to figure out when I’m asleep or awake and change behavior accordingly. I don’t use it for my actually audio alarm, so when it fails it isn’t crucial for getting me to work on time. So, I’m ok with it occasionally stopping working, especially now that I know the fix.

This variable I only set manually currently–my schedule doesn’t really change.


#4

Just a note, I still have the bug where a variable set as time (Time Only) clears itself out frequently