Can I do

First, I hate the auto {} complete thing. I spend too much time trying to fix random } and " and ) that show up in my code than it helps. Can I turn it off?

Is there a simple way to query for the current time?

Using the various sleep/waitfor/etc. functions, can I specify callbacks to different functions at different intervals? i.e. say I have 2 data aquisition loops, one runs every hour, one runs every minute. can i call both initially, func1 calls imp.wakeup(1, func1); and func2 calls imp.wakup(60, func2); will imp manage to call the two functions at the appropriate times? Any possible race conditions?

what if i also wanted to call another function at a specific time of the day, and another function at another specific time of the day, can i call imp.sleepuntill twice, and have both of them work without stomping on each other? any other way to do it?

with the server-side persistent cache, any way to view/modify it from the planner? I want to be able to configure some parameters without having to go into the code…

any way to keep the imp from sleeping ever - given that it is not battery powered, i don’t see the need for it to ever sleep…

I think that represents the bulk of my questions. I finally got my hardware working, and it’s pretty cool - code iterations are super fast, like instant compile time.

You can get the current time in seconds since 1970-01-01 using the function time(); if you want the human-readable time, use the function date(). The imp stores time in UTC and does not know about time-zones. Both calls are documented in the Squirrel standard library: http://www.squirrel-lang.org/doc/sqstdlib3.html

You can have several imp.wakeup() calls outstanding at once. There are no race-conditions: if a second wakeup comes due while one is already executing, it will be queued until the first one completes. So that is the right way to do, both your data acquisition loops, and your specified-time-of-day one. (In the latter case, use imp.wakeup(246060, func3) to wake up each day at the same time; to kick it off in the first place, use time() to work out how many seconds remain until your chosen time of day.)

You can only have one server.sleepuntil() outstanding at once – but, as you say you don’t want the imp to go to sleep, you won’t be wanting to use server.sleepuntil() anyway.

You can’t modify the server-side persistent storage from the planner, but there’s a separate facility, imp.configparams, that works exactly the way you describe. It’s documented under the imp.configure() call: http://devwiki.electricimp.com/doku.php?id=electricimpapi#imp_instance

Peter

perfect, thnx!

actually, the configparams can store a table of number, boolean or string. I want to be able to add a variable length array of numbers to that table. Is that possible? And is it possible to be able to adjust the table data from a custom webpage by the addition of some http objects?