Skip to main content

Control the Factory Process

The Legacy IDE is now no longer available. It has been replaced by impCentral™

You use the Electric Imp IDE to deploy application firmware to production devices in the field, assign and update your factory firmware, configure factory BlinkUp fixtures, set up webhooks to connect the production system to your own systems, and view aggregate device data. It also provides comprehensive data to keep you informed about the number of production devices blessed in the factory and how many of those production devices have been activated by end-users in the field.

To learn more about the Electric Imp factory process, see ‘The Electric Imp Factory Process: A Short Guide for Product Managers’.

This production functionality is only available to Electric Imp customers and to collaborators on shared accounts who have production permissions (account owners, Administrators and Operations Managers).

Primary Production Tools

The IDE’s primary production tools are accessed via the ‘Models’ tab in the Tab Bar. Move your mouse pointer over a production model and click on the ‘Factory’ icon in the ‘Actions’ column. This will call up the production settings for that model and display them in the Workspace. You can also view these settings by clicking on the ‘Factory’ Workspace tab when you’re viewing a production model’s code.

The order of the factory settings has been designed to follow the recommended factory process workflow:

  • Select and deploy the product’s production model (application firmware) build.
  • Select and deploy the production model’s factory firmware build.
  • Register the factory BlinkUp fixture(s) to be used on the product’s assembly line.
  • Configure webhooks to register key factory process events with your own servers.
  • Unbless production devices that have passed through the factory process, as required.

Here is the standard workflow; click on a colored box to go direct to that section:


 

Deploy Production ModelDeploy Factory FirmwareAssign Factory ImpAdd WebhooksDelete Global BondThe Factory Process

Deploy a New Production Model

To make an existing development model accessible to the production tools in order that it can be deployed to production devices, one of the model’s builds must be promoted to production. This marks the build and its parent model as production ready.

This stage must be performed before your connected product goes into production. It may be performed again at a later date to deploy an updated build to production devices in the field and to production devices still on the assembly line.

View the development model that you want to use for production and then click ‘Build’ to upload any changes you have made to your code and create a new build.

Now click ‘Promote’ to elevate the model to production status. This will cause the model’s type to change from development to production:


 

Click on the Workspace’s ‘Factory’ tab. If you can only see the ‘Code’ tab, either you lack production privileges (so will not be able to perform this task). In the ‘Production Model Information’ section of the Workspace, you will see your model, the currently deployed build (or “Not Deployed”) and the build you have just promoted (marked as “staged”). This indicates that the model is ready to deploy:


 

Click ‘Deploy Latest Build’. You will be asked to confirm your action:


 

The build previously staged is now listed as the deployed build. Any production devices installed and activated at end-user premises will now automatically update. Devices within your distribution channel will not update until they are first configured by an end-user. This may be the first time they receive any application firmware, or you may have elected for them to receive their code as soon as they are blessed on the assembly line. Blessing is the process by which a newly assembled device is registered with the Electric Imp impCloud™ as ready for end-use.

You make this choice by click the ‘Devices download code:’ panel:


 

Should you update your production model code at a later date, you’ll need to promote the new build and run the ‘Deploy Latest Build’ process described above. Once the new production model build has been deployed, operational production devices bound to that model will receive the new build immediately. Devices which are offline, in sleep mode or powered down will receive the update when they next come back online.

Assign and Deploy Factory Firmware

Factory firmware is a model which will be installed on every production device on the assembly and run to both test the device and, if it passes the tests, to bless the device, ie. register it with the impCloud as an end-user oriented unit and to bind it to the production model (application firmware) it will run in the field.

You can’t assign factory firmware to a production model unless one of the production model’s builds has already been deployed, as described above. You develop your factory firmware as you would any other model, ie. as a development model. When it is ready for use, you need to mark it as factory firmware as follows.

Open the ‘Model Settings’ panel for the development model by clicking the gearwheel icon under the ‘Actions’ column in the ‘Models’ tab. On the ‘Model Settings’ panel, check the ‘Factory Firmware’ box and click ‘Save Changes’:


 

The model will now move from ‘Development Device’ to ‘Factory Firmware’, though it will remain selected. As with a production model, you must deploy a factory firmware build before it will be downloaded to devices.

Select the factory firmware model that you want to use and then click ‘Build’ to create a new build. Now click ‘Promote’ to elevate the model to production status.

Select your production model and click on the Factory icon under the ‘Actions’ column. If you can only see the Code and Settings icons, either you lack production privileges (so will not be able to perform this task) or you have selected a development device assigned to this production model — make sure you select the model itself. In the ‘Factory Firmware Model’ section of the Workspace, click on ‘Assign Firmware’:


 

Select your chosen factory firmware build from the pop-up list that appears and then click ‘Update Firmware’:


 

Should you update a given factory firmware at a later date, you will need to promote the new build and run the ‘Change Firmware’ process described above in order to deploy it. Once the new factory firmware build has been deployed, your factory BlinkUp fixtures (see below) will be restarted automatically so that they download and execute the new build.

Add Factory Imps

A factory imp is the imp integrated into the assembly line equipment used to perform BlinkUp™ on production devices in the factory. This equipment is called a ‘factory BlinkUp fixture’. Every factory BlinkUp fixture must be assigned to an Electric Imp account (it need not be yours; it could be that of your contract manufacturer) before you link them in the IDE to a specific production model. Factory BlinkUp fixtures are assigned to an account by using BlinkUp just as you would a development device — use the Electric Imp app for Public impCloud accounts; Private impCloud customers use their own development app — but the process of linking the fixture to its production model is slightly different.

Locate your production model in the ‘Models’ tab list and click on the Factory icon under the ‘Actions’ column. If you can only see the Code and Settings icons, either you lack production privileges (so will not be able to perform this task) or you have selected a development device assigned to this production model — make sure you select the model itself. In the ‘Factory Imps’ section of the Workspace, click on ‘Add Factory Imp’:


 

A panel will appear asking for the MAC address of the imp within the factory BlinkUp fixture. The Electric Imp app returns the fixture’s device ID after BlinkUp — you can use the Tab Bar’s ‘Debug’ tab to enter this ID into the search field and read off the device’s MAC address. Enter the MAC address in the pop-up panel and click ‘Update’:


 

Note If you subsequently re-assign a factory BlinkUp fixture to a different production model, you must power-cycle the factory BlinkUp fixture for the change to take effect.

To remove a factory imp from a production model, click the trash can icon next to its listed MAC address:


 

Add Webhooks

Webhooks allow manufacturers to link the factory process to their own record-keeping systems. The IDE provides two webhooks which are configured on a per-production model basis. For more information on the events which trigger these webhooks and the data they send, please see the separate guide ‘Production Webhooks’.

To configure a production models’s webhooks, locate your production model in the ‘Models’ tab list and click on the Factory icon under the ‘Actions’ column. If you can only see the Code and Settings icons, either you lack production privileges (so will not be able to perform this task) or you have selected a development device assigned to this production model — make sure you select the model itself. In the ‘Webhooks’ section of the Workspace, click the ‘Pencil’ icon alongside either of the two webhooks, ‘Blessing’ and ‘BlinkUp’:


 

You will now be able to enter the URL of the webhook-handling script on your server. You can also select the content type: the format in which the data will be sent to your server. You may choose URL encoding (application/x-www-form-urlencoded) if you wish, but we recommend you use the default setting, JSON encoding (application/json). Finally, click on the tick icon to save your webhook configuration and to activate it:


 

It’s not currently possible to disable a webhook while retaining its configuration. To disable a webhook, click on the ‘Pencil’ icon, clear the URL field and click on the tick. This will stop the webhook from firing when the named event takes place.

Delete the Bond of a Blessed Device

This feature is provided for testing purposes and we do not recommend using this feature frequently. It allows you to test the blessing process repeatedly on the same production device, or to unbless devices that have been blessed incorrectly. Unblessing a production device also allows it to be subsequently used as a development device — it will need to be configured with the Electric Imp app (Public impCloud accounts) or a Private impCloud customer’s development app.

Should an end-user request that you unbless their device, you may do so using this functionality. Electric Imp will not perform this task on your behalf. You may choose not to grant the end-user’s request as unblessing will allow them to run code of their own on their device: the product will essentially become a development device.

To unbless a device, you will need a Bond Administration Password. Email support@electricimp.com if you have not requested or been provided with a Bond Administration Password. This is not your IDE login password. You will also need the device ID of the unit which is to be unblessed.

To unbless a device, select the production model to which it has been blessed and click on the ‘Factory’ tab. If you can only see the ‘Code’ tab, either you lack production privileges (so will not be able to perform this task) or you have selected a development device assigned to this production model — make sure you select the model itself.

In the ‘Deleted Global Bonds’ section of the Workspace, click ‘Remove Global Bond’ (a ‘global bond’ is the internal record which ties a device to its model, ie. its record of being blessed):


 

The ‘Remove Global Bond’ panel will appear. First enter the ID of the device you wish to unbless and then enter your Bond Administration Password. Finally, click ‘Remove’ to unbless the device, or click the white-on-grey ‘X’ to cancel the operation:


 

After a device’s global bond is removed, it will be listed under ‘Deleted Global Bonds’ so that you can ensure that bonds are not being removed without your knowledge.


Back to the top or Back to the Contents