IDE (agent side)

I would like the ability to upload code to a private modules area, then when I write the agent code be able to import them ie. mod <- ::import(“mymodule”, {});

This would make the agent code much cleaner/smaller and would also provide a way to contribute/use useful modules


Yes I agree. I would like to able to use a “#include twitter.class” for example to import different classes, code, etc., that Electric Imp can officially publish and can be accessed through the IDE.

Right now the code is long, and it would be nice to make it look cleaner.

As I said in another message, I love the new IDE and the Agents API: this allows for a lot of code to be handled server side and only send to the imp a few values. Really, this is awesome!

I just have a minor request for the IDE, if possible. It would be nice to have a way to reload the agent code without having the imp connected. Details: I am writing some code that takes POST data and calculates some values (testing it with Postman); at this point it doesn’t even send anything to the imp, that is my next step.

All is well when the imp is connected and idle, “Build and run” loads the new code (even if all the changes are agent side) and I can see errors/server logs without any issue. However, if the imp is not connected, saving the changes and/or clicking “Build and run” reports “Success! Your code is running” but the log messages are still the old ones, the new code doesn’t seem to be really running - I couldn’t find a way to force the new code to run in the agent without connecting the imp.

This could be helpful for code changes made while the imp is not online; also, helpful for when the imp is already running a different piece of code and the new code is part of a new project for a future imp (that I will be getting soon).

Like I said, minor. Thanks for all your work!

Solution is simple for both cases. Buy another Imp?

Thanks @sbright33, this is exactly what I said I will do (in fact, I have 4 more imps ordered and waiting for). However that does not cover something like I forgot the imp at home and I’d like to test some changes during my lunch break :frowning:

Anyway, not a big thing, like I said, I mentioned it just in case is not hard to implement.

Yep, restarting the agent without the imp connected is on the to-do list. The system can do it it’s just the control isn’t exposed right now.

That’s awesome, thanks so much for the answer, Hugo.

I was just scratching my head over this… had wanted to try out some Agent only code @deldrid1 had posted, but none of my Imps are on and I’m a couple hundred miles from them at the moment. The “Success!” message from Build-n-Run was throwing me off.

Yeah, that message is rather misleading… the log output is really the best way to see what’s actually happening.