Trying to get my head around it

Given a perfect world…

I would like to have my Arduino sketch controlled by a web app via an Electric Imp. It has to be an Arduino as the hardware I am trying to control doesn’t have a library that will work on the Imp (very timing-critical) but I am happy to use a $30 piece of IoT craftsmanship as nothing more than a glorified serial interface.

To be more specific, I would like to develop an existing product (that currently is controlled by Bluetooth), so that the end user can control it by way of a web-page, rather than an Android or iOS app (seems eminently more sensible to have a cloud-based product controlled from a cloud-based web-page, rather than by an installed mobile application).

But… what I can’t work out is how I differentiate my web page by device - in other words, if I sell X of the same model of devices, how can my customer control their own, rather than someone elses? Also, is there a way to differentiate the device so a customer gets a different web page depending on what device they have bought?

I am sure I can hand-craft (or at least load a database) a page that specifically pulls up the template needed for that specific customer, which would be fine if I had 5 customers, but I am hoping to have at least hundreds… and my business is in making funky stuff, not in maintaining a database of mac addresses and logins.

Everything I have seen so far is pointing me in the direction of phone apps, but I don’t know the least thing about programming for Android or iOS and would rather not have to learn (or pay someone else to do on my behalf). I am, however, a half-assed HTML/PHP/C++ web developer (in a fashion) or at least am able to fumble about and build unix servers to the stage I can host a fully-functioning web service and put content on it that works, securely.

For that reason alone, I would like to make my interface to the device web-based.

Can someone help me with the mental hook-up of whether and if so, how I can achieve this?

Further information: most of what I make is made from wood - with lots of effort and a small amount of native cunning. I am not a developer nor do I want to be one. My existing products work great with Arduino, which I have spent a lot of time getting to the stage they are now. Having IoT connectivity gives me a huge increase in the functionality I can offer, but learning a whole new development paradigm isn’t really on the cards. Squirrel, I think I can handle, given that my needs are basically to pass a number to my Arduino and get a thumbs-up back.

Any helpful direction welcomed… (unless it’s to tell me to forget it… :slight_smile:


Don’t think this will be of too much help, but I felt like typing.

I’m doing an assessement of how to commercially distribute 100’s of Imp enabled products and I too have asked some questions aswell in another thread in the “General” forum. Check it out.

I have seen people on here using the agent-url as a website requiring password and stuff to check in on measurements/settings of the imp, but thats probably not a good solution for 100’s of products. But, each imp has their own agent-url and… I dont know, maybe you could pull it off? Making hundreds of different agent-url hosted small little websites manually dont seem professional, but it might work I guess? Problem is BlinkUp, you have to know your customers network info beforehand or hand them your Electric Imp account credentials for them to type it in on their own phones. If thats not an option then you have to develop or make someone develop an app based on the BlinkUp SDK. Also you have to be qualified to receive the BlinkUp SDK before that.

If you develop an app the rules changes abit. Each of your imps now has to be part of a standard “Model”. They still have their own agent-url’s. But I think all the agent-codes now are identical, and you must use a cloud service or server of some kind to differenciate and registert the individual agents and it all becomes more complex. All of you customers now must use your app to send httpsrequest to their specific agent-url. Theoretically I think you could aswell make them control the device from a website, somehow connected to their user credentials in your app. I’m still struggling to truly wrap my head around this. You are not alone.

Also in that range you could probably save a few bucks moving your design from Arduino to a custom pcb. Unless people use your product with their own Arduinos that is. Arduino Pro Mini could also be a good choice I guess.


“Don’t think this will be of too much help”


“Problem is BlinkUp, you have to know your customers network info beforehand or hand them your Electric Imp account credentials for them to type it in on their own phones.”

You need to learn how the commercial side of the Imp works - you’re way off base.

"Also in that range you could probably save a few bucks moving your design from Arduino to a custom pcb. "

I pay about $3 for an Arduino. My BT-enabled device sells for $299, the Imp version will be about $100 more. If the library I mostly use gets ported to Imp, I can drop it, until then, I have a mature product that works great with a $3 Arduino. Why would I spend the money developing a custom PCB? That just doesn’t make sense.

I am struggling to wonder what you intended to achieve by your post - it was almost entirely fact free and rather than helping, if the recipient had been less knowledgeable than me, would have actually hindered them.

Please, comment on things you actually know, not speculation from a position of low information - it doesn’t help anybody.

If you want to know how to distribute 100s of Imps in a commercial environment, read the ‘Distribution’ docs. It’s all clearly laid out.

Ledaero, I reread my post and I am greatly sorry if I have offended you, it was not my intentions. Who am I to know anything about your solution and how it serves you. I made an unlucky assumption that moving from Arduino would spare you of production costs and made a bold statement on that assumption. For that I am sorry.

I have read the distribution docs and I (thought I) understand the basic workings of it. However I tried to explain two scenarios in my post; distributing without developing a custom BlinkUp app(a workaround)… or distributing with your custom made BlinkUp app (like explained in the distribution docs you are familiar with).

With an app. Your different kinds of products would belong to different “Models” (via Blessing). And also if an app is set-up correctly it could send the individual agent-url’s of your customers to your own website where your end user could operate their device(after initial BlinkUp). An admin tried to explain this to me in a post I made earlier today. I hoped that post could be helpful for you aswell. Sorry if I’m not helping out with your mental hook-up. What I’m trying to achieve is nothing else then a mutual constructive conversation about Imps.


@Ledaero - At the moment you need to create a mobile app for commercial use of the imp (if for no other reason than BlinkUp). The BlinkUp SDK used in commercial apps returns the AgentUrl of the device that was just configured with BlinkUp.

I a’so don’t think you’re going to get away with not having a user database - we’re talking about building an auth system, which necessitates some kind of information stored somewhere…

  1. User buys product, and downloads mobile app
  2. User opens app, and signs into their account (you will need account management for this)
  3. User configures their device with BlinkUp, and when the agent URL is returned, it’s stored in a database somewhere used for auth.

  1. When the user logs into the website with their credentials, a list of devices that they own (based on the auth DB) is returned. At this point you have specific urls to interact with devices owned by a particular individual.

You may want some other auth in the agent itself so that if someone gets a hold of the URL, they don’t have total access over the device (i.e. security by obscurity is very bad).

We’re basically talking about how to manage user accounts and auth - so understand that this is far from the only solution.

You may be interested in this article - which is another approach that uses Firebase as the backend: