Skip to main content

How To Implement The Connected Factory Process

Connected Factory Quick Start Configure Your Production Flow

Once you have completed Connected Factory Process testing, you are ready to commence production. impCentral™’s Test Zone closely mirrors the full production process, and you can create a full production setup based on your test setup with just a few mouse clicks. Alternatively, you can set up the production process manually.

  • If you are unfamiliar with the Electric Imp Connected Factory Process, please take a moment to read our brief overview, which includes a full glossary of the terminology you will encounter in this guide.

  • If you have not yet prepared a factory test environment, we strongly recommend that you read our brief guide to setting up and running factory tests before continuing with this guide.

Connected Factory Process Setup

Because the Test Zone entities (Test Production, Test DUT and Test Fixture Device Groups) map to their equivalents in impCentral’s Production Zone (Production, DUT and Fixture Device Groups), impCentral provides an easy way to generate a new production setup from an existing test setup.

1. Promote Application And Factory Firmware

If you are not logged in to impCentral, do so now. Locate your Product in the Products list and click Development Zone under MANAGE.

To make use of your application firmware, DUT firmware and fixture firmware in the production environment, you will need to promote your chosen firmware deployments. If you have made use of the impCentral’s factory process testing facility, you will have done this already for your application firmware. However, you will still need to promote your fixture firmware and DUT firmware.

Note A deployment is a specific, fixed release of your application or factory firmware. If you update either of these and want that update to be installed on Devices Under Test (DUTs), Production Devices or BlinkUp fixtures, you will need to make a fresh deployment. Updating code does not update existing deployments or devices on which those deployments are running. You always promote a specific deployment, not firmware in general.

To promote your fixture firmware, navigate to your Product’s Test Fixture Device Groups list and click Deployments under MANAGE. Find the desired deployment (the most recent ones are listed first) and click Settings under MANAGE. The Deployment Settings panel will appear — make sure its Promoted box is checked. We recommend adding a description as it will help you distinguish one promoted deployment from another later on. You can also note the date and time of the deployment, and the deployment’s SHA. Finally, click Update:

Follow the same process to deploy your DUT firmware but this time navigate to your Product’s Test DUT Device Groups list to find the desired DUT Device Group — which must be a target of your chosen Test Fixture Device Group — and then the chosen firmware deployment.

If you need to deploy (or re-deploy) your application firmware, just follow the procedure outlined above, but instead navigate to your Product’s Development Device Groups list.

2. Use impCentral’s Go Live Command

Navigate back to the list of Test Fixture Device Groups. Locate your chosen Test Fixture Device Group and click Go Live under MANAGE.

impCentral will now walk you through the migration process. First it creates a new Production Device Group based on the Test Fixture Device Group’s target Test Production Device Group. impCentral ask you to give the new Production Device Group a name of its own and enter an optional description:

Go Live: select your production device group target

Next, impCentral creates a new DUG Device Group based on the Test Fixture Device Group’s target Test DUG Device Group. Again, give the new group a name, a description and click Create DUT Target.

impCentral then creates a new Fixture Device Group based on the Test Fixture Device Group itself. Again, you are asked to give the new Fixture Device Group a name of its own and, optionally, provide a description of the group.

Next, impCentral gives you the opportunity to set the new Production Device Group’s firmware load time and its optional webhooks:

Go Live: apply choices and options

Finally, impCentral presents a summary of the changes it has made. Click Done to continue.

3. Assign A BlinkUp Fixture

If you plan to use in production the BlinkUp fixture(s) that you used in testing, you can simply reassign them to the new Fixture Device Group. If you intend to use new fixtures on the assembly line, you will need to add them to your account using the Electric Imp mobile app and then assign them to the new Fixture Device Group. Both assignment and reassignment are carried out as follows.

Select My Development Devices from the devices menu () and locate the first of your BlinkUp fixtures by its device ID (shown in the Electric Imp app after BlinkUp). Click Assign under MANAGE.

In the Assign Devices panel that now appears, on the right-hand side select the target Product, Device Group type (Fixture) and Device Group name that you wish to assign the fixture to.

Click on Production in the navigation bar under the name of your product:

Finally, click on Assign Devices.

4. Configure The Fixture In The Factory

You can now send the fixture to the factory. If necessary, a factory operator can use the Electric Imp app to configure the fixture for the local WiFi network: they can use the Electric Imp app’s targetted BlinkUp feature, which will keep the fixture in your account after it has been configured with the factory WiFi credentials. The operator will need an Electric Imp account of their own, and this account must have been previously registered as one of your collaborators and granted the BlinkUp Device role.

If your factory has its own generic fixture which you will be using, you may not have performed Step 3, above. In this case, a factory operator can use targetted BlinkUp to add the factory’s fixture to your account for the period of the production run. When they have done this, you must assign the fixture to the correct Device Group yourself. Upon completion of the production run, the factory operator will simply re-configure the fixture to regain ownership of the device.

What Happens Next

If your fixture is powered up, it will receive the fixture firmware you first promoted and then deployed in the steps above. At this point, it will be ready to begin configuring assembly-line DUTs.

Configured DUTs will connect to the transmitted WiFi network (or via Ethernet or cellular, depending on the type of imp they contain and the design of your product) and be assigned to the DUT Device Group that is set as a target of the Fixture Device Group to which the active BlinkUp fixture belongs. They will therefore received their assigned DUT firmware.

If your DUT firmware’s hardware tests pass, each DUT will then be blessed and automatically assigned to the Production Device Group that is set as a target of the Fixture Device Group to which the active BlinkUp fixture belongs. DUTs are now Production Devices — units that are ready for sale and end-use. The Production Devices receive the application firmware you promoted and then deployed to the Production Device Group to which they were automatically assigned right after blessing.

Production Devices can be examined by accessing the list of the Product’s Production Device Groups and clicking on Devices under MANAGE for their specific Production Device Group. If you have already selected the Production Device Group, click on the Production Devices icon (Device Icon) in the left-hand side panel.

Troubleshooting Factory Operations

If you thoroughly tested your factory setup earlier, production should run smoothly. If you do encounter issues, this section covers the most common points of failure.

Important Note on impOS Updates

When a DUT first connects to the impCloud, it checks whether it is running the most up-to-date version of impOS™ that it has been permitted to run. If an impOS update is available, this will be downloaded and installed now: the status LED will go solid green for the duration of the upgrade process. This is not an indication that blessing was a success — the DUT has not yet downloaded and executed your DUT firmware.

The update duration is relatively short but highly dependent on local Internet conditions — connectivity, the presence of a proxy, etc. — so you should not assume your DUT firmware will run after a measured time. The duration of the ‘BlinkUp → update → restart → test-and-bless’ cycle will likely be different between your lab and your factory.

When updating is complete, the DUT will restart, re-connect, and download and run its assigned DUT firmware — subject to the potential issues described below.

BlinkUp Issues

DUTs

  • If BlinkUp failed (indicated by a fast red flash or a slow orange flash), check the physical placement of the DUT relative to the fixture’s emitter.

  • If BlinkUp succeeded (three seconds of solid green followed by red and amber flashes) but the DUT doesn't connect (slow green flash), check the WiFi credentials embedded in or retrieved by the fixture firmware and passed into the server.factoryblinkup() call.

Fixtures

  • Make sure the fixture is correctly configured for the local network access using the Electric Imp mobile app.
    • If you are working with a factory’s own fixture, you will need to add the factory as a collaborator to your account so that you can assign their fixture to your Fixture Device Group.

Blessing Issues

DUTs

  • Blessed devices cannot be re-blessed, so if a DUT appears to be failing to bless, check that it has not been blessed already.

  • If a DUT is connected but is not indicating bless success or failure, check that the promoted DUT firmware includes the mandatory server.bless() call and that it has not been inadvertently disabled.

Extending The Production Process

Multiple Production Device Groups

You can add as many Production Device Groups to your Product as you need. They can be created by clicking the Create New Device Group button above the Product’s list of Production Device Groups. For example, you may wish to roll out updated application firmware to a selection of Production Devices for in-field testing before deploying to all Production Devices. In this case, promote the new application firmware deployment, create a new Production Device Group (‘B’) using the promoted code, and then add devices from the first Production Device Group (‘A’) to the new one. Upon re-assignment, the devices will receive the new code (or will do so when they next connect to the impCloud).

When you are happy with the new release, transfer all remaining devices from A to B. In due course, when you update your application code, deploy the update to A and move a small number of devices from B to A.

To assign Production Devices, navigate to the Product’s list of Production Device Groups then click Devices under MANAGE. If you have already selected the Production Device Group, click on the Production Devices icon (Device Icon) in the left-hand side panel. Select multiple devices, then click the Assign button at the top of the list to select a new Production Device Group to move the selected devices to.

Fixture Device Group Targets

When you create a Fixture Device Group, you must choose its targets: the DUT Device Group to which DUTs will be added after BlinkUp, and the Production Device Group to which DUTs will be assigned upon blessing. However, these targets can be updated as you add further Production and/or DUT Device Groups.

For example, if after an initial production run you begun to manufacture devices for a different geographical region, then you might choose to assign new devices from this point to a new Production Device Group. Create the new group as described above and then change your Fixture Device Group’s target to the new group.

Navigate to your Product’s Fixture Device Groups list and click Settings under MANAGE for the chosen Fixture Device Group. All of the Product’s Production Device Groups will be listed here. If there are a large number of them, you may need to navigate the list’s pages using the arrow buttons (Page Navigation) to find the one you want. Select the new target and click Update. All DUTs blessed from this point will be assigned to the new target.

You can change the Fixture Device Group’s target DUT Device Group in the same way.

Webhooks

impCentral provides two event-triggered webhooks which you can use to connect the factory process to your own record-keeping systems. These webhooks are configured on a per-Device Group basis. In the Production Zone, they are only available to Production Device Groups. Webhooks are configured in the chosen Production Device Group’s settings: navigate to your Product’s list of Production Device Groups, then click Settings under MANAGE for the required group.

The two webhooks are:

  • Blessing — This is called when a DUT has been successfully blessed.
  • BlinkUp — This is called when a Production Device is successfully activated using BlinkUp.

To configure either webhook, provide the URL of an endpoint on your server, a third-party logging service, or even a development device’s agent. The impCloud automatically posts an HTTP request with a data payload in JSON format to the endpoint when the named event takes place:

Webhook settings can be updated at any time.

  • For more detailed information on configuring webhooks and the data they return, please see Production Webhooks.

Application Firmware Loading

Customers can choose when a Production Device receives its application firmware:

  • Immediately after blessing.
  • After the devices’ first end-user BlinkUp (ie. activation).

The former is the default and the recommended setting as it ensures Production Devices can run application firmware as soon as end-users power them up. However, you may choose to use the second option, and this too is set in the Production Device Group’s settings: navigate to your Product’s list of Production Device Groups, then click Settings under MANAGE.

This setting can be updated at any time.

Polite Firmware Deployment

By default, when new application firmware is deployed, it is left to the device’s own code to decide whether they should update immediately. This is called a Conditional Restart and requires that the firmware supports Polite Deployment. If this is the case, a given device may choose to defer the firmware update if it is performing a critical task that should not be interrupted. To accept the firmware update, the device must manually restart. If the device is offline, it will receive the update notification when it next connects, and can choose at that point how to proceed.

If the firmware does not support Polite Deployment, or you choose Forced Restart when you create a new deployment, then all devices within the target device group (of whatever type) that are online will immediately restart and receive the new firmware. Offline devices will receive the update when they next connect.