Power state: online=>offline

as of this afternoon, when I run code and after it completes (with transferring a table from Agent to Device), the Imp goes offline for 5 seconds and comes back online.
Is this a feature?
software version: 99f6597 - jenkins-ei-release-branch-627 - Thu Jun 13 04:23:25 2013

That sounds like what you’re sending is causing the imp to fall over. Could you PM the code that replicates this?


I can replicate this; there appears to be an issue with table keys >31 characters long. If you truncate the keys to 31 characters then it all works fine.

Filing a bug!

Thanks Hugo, will do.

Sorry yes, table keys are limited to 31 characters. We should make this clearer in the documentation. (Even if we end up extending the limit, we should make the new limit clear.)


No problem, if you know it.
In this case, it was an external table, so I had to convert it.
Anyway, I hate long keys
About documentation, yes, it could be more clearer, for most subjects… :))

Table keys are not limited to strings however. As per the Squirrel language documentation, they can be any type, except null. Are there other limitations in the imp’s implementation of Squirrel tables we should be aware of?

The squirrel table is not limited, no. But… when you want to transfer it somewhere else, it has to be serializable.

See here: http://devwiki.electricimp.com/doku.php?id=serialisablesquirrel

I believe, and Peter can confirm this, that keys have to be safe strings otherwise they can never become JSON.

The keys have to be safe strings otherwise they can’t be serialised at all. For things that end up as JSON, string values also have to be safe strings.