Pairing up Imps

I saw several videos where one Imp can be paired up with another via “planner”. Like Tom’s pan an tilt project for example https://www.youtube.com/watch?v=liYOoLp3-rw.

It seems that the “planner” is in some obvious place, but I can not find it to save my life. And the IDE layout is a little different from what I can make out. Can someone point me to the place where I can pair up my Imps?

Many thanks

PS I am pretty new to programming and the Imp.

The planner is rather old functionality that has been deprecated for almost a year, which is why you can’t find much information about it.

Currently, the best way to “pair” imps is to have them send HTTP requests to one another.

Thanks, BeardedInventor.

Ah! That’s disappointing! It looked like a very easy and accessible way to do pairing and tempted me to play with the Imps. I wish Imp developers could bring it back as an option.

Do you happen to know where I can find the tutorial for beginners explaining what “send HTTP requests to one another” means and how to do it? I suppose since I got as far as controlling the light on individual Imp, I should persevere and learn “pairing” basics.

Many thanks

There’s an onld blog post on the Electric Imp blog about this from when we first deprecated the planner.

I just “rewrote” it for the new community blog - you can find it here: https://community.electricimp.com/blog/imp-to-imp-communication/

If you have any questions, you can post them here (or in the comments of the blog!!)

Great! I will try that out. Thank you!

Hi beardedinventor,

I am test-running the code to connect two imps, and noticed two things:

  1. The code for Device2 has an error in line 12, I recon extra, or missing )
  2. The connection does not go through

I checked the hardware. All hooked up and working indipendently (Device1 receves https reqiest, sent manually. The button lights up test LED on Device2). But the button state is not being transmitted anywhere. Any chance you can clarify where mistake might be?

Eventually, I am hoping to transmit the heartbeat data from remote location to the installation in the gallery.

Thank you

Good catch - I’ve fixed the bug and updated the code.

That error was likely what was causing the issue - give it another try with the new code!

I find myself wishing that I could call a server api on the agent that says “find my imps that are running the model called “x”, and give me a list of their names and URLs”. Then my “doorbell” imp’s agent could discover the agent of the imp which is running “remote bell” (or several of them), and send them HTTP notifications of the doorbell state.

For “doorbell” substitute something deeply meaningful like “hacking sign”, but that is what I am making right now!

Would it be massively insecure to allow my agent to query my local server environment in this way for discovery? Just to be able to browse the left hand side of my IDE. This could avoid all this {paste agent ID here} inflexibility.

We’re working on an IDE API that will let you programmatically (through web requests) do things like query your accounts models and devices, update code, etc.

I think having your devices register their functionality with a server somewhere (whether locally, or ‘in the cloud’) could lead to interesting interactions.

On that note - take a look at the discussion around HyperCat… it might be just what you’re looking for :slight_smile:

http://forums.electricimp.com/discussion/2863/the-latest-solution-to-the-proliferation-of-iot-protocols-is-#Item_3

Yes, I saw that and I respect your enthusiasm for it :slight_smile: I see its role as a global catalog, which is exactly what you want for a real IoT application. But at the developer scale I was just looking for a local catalog within my dev account, and the IDE presents exactly the catalog that I want to browse. Perhaps we need both.

The IDE API is really aimed at device management, but you could certainly use it for something like this as well, which could be really interesting.

HyperCat is neat because you can use it on a global scale, or you can create a local, private catalog that only you and your devices have access to :slight_smile:

Working beautifully!

Thank you, beardedinventor.