Category

EdgeX Foundry

My ‘First’ and the ‘First’ EdgeX Open Hackathon – Infinite Possibilities

By Blog, EdgeX Foundry

Written by Sangeeta Ghangam, Platform Architect in the Retail-Banking-Hospitality-Education (RBHE) Division, Internet of Things Group, Intel

On October 7-8, 2019, I participated in the first LF Edge EdgeX Open Hackathon focused on Retail use cases. I had some exposure to EdgeX Foundry before the hackathon but it definitely did not prepare me for the experience that lay ahead. I normally prefer planning my work travel & technical sessions to the point where I know exactly what’s on the agenda, what needs to be done prior to the session and how it can all come together. However, this time around, I had no clue what we were going to do and how we were going to do it. I knew a few of my colleagues were on the team but we don’t work together on most of the projects so it was difficult to know who would do what, plus we had one of our customers/partner (Intuiface) on the team as well. To top it all, pre-work was allowed but, unfortunately, we didn’t get a chance to do any before hand.

Sounds like a disaster waiting to happen, right?! But it was a perfect way to experience the hackathon. The objective of the EdgeX Open was to introduce the EdgeX Foundry infrastructure to the participants – a mix of folks from all backgrounds and expertise, for feedback both technical and from a go-to-market perspective. On the first day,  we were told about all the different software and hardware tools available for the participants – from compute systems to sensors to cameras and retail products.  We also learned more about the EdgeX Edinburgh release, which was a significant milestone for the software, available as a docker or a snap package. We spent the first 2 hours after the initial presentations just fiddling with all these different options – install EdgeX, rummage through the sensors etc. Finally, we found a camera we thought we could use in addition to the bonus camera that was setup as a mock check-out lane. Now that we got comfortable with the tools we needed a use case or a problem to provide solution for. We considered the topics or themes which were part of the hackathon, the wildcard appealed the most. And a “real” problem surfaced as well – customer friendly checkout in the age of automated & self-checkout?

At some point or another, we have all experienced frustration as we tried to self-checkout quickly resulting in delays, waiting for help, etc. We figured we could use the sensors and camera to gather data, feed it to EdgeX and generate insights that a store associate can use to provide assistance where needed. We decided to split the solution over 3 systems –  one running EdgeX, one running analytics over Intel Openvino and another running the dashboard (for the store associate) and use the following list of sensors:

  • 2 Cameras – One at our desk and the bonus camera representing the mock check-out lane
  • Nexmosphere sensor kit consisting of RFID sensors and LED sensors. We planned to use the RFID sensor to track the product at checkout and the LED sensors to provide a visual status of checkout lane to the store associate.

The multi-system and multi-sensor setup mirrors what is typically found in Retail Stores today which is where EdgeX infrastructure can work as a data highway. We split the work on the 3 systems amongst the 5 team members and started in earnest around mid-afternoon on the first day. I remember we finished 70% of the work on the first day and about 30% on the second.

We had several learnings along the way as we experienced the different software and hardware pieces:

  1. There is more than one way to install EdgeX on the target system via containers or snaps. Since we were comfortable with containers, we used the same and did not run into any significant issues during setup.
  2. We ran into some hurdles while using Ubuntu 18.04 for Intel Openvino installation. Turned out Ubuntu 18.04 changes how the mirror sites work for downloading dependencies, reinstating these settings seemed to help.
  3. It was difficult to make changes to the device profile in EdgeX to add additional variables for the new sensors we wanted to add to the system. It required multiple re-installs of the EdgeX system, I believe this is a known issue and only way to work around this is to purge the database and/or re-install.
  4. We also wanted to showcase remote management using Intel vPRO but ran into issues trying to use the snap version of the software.

We were able to work through items 1, 2 and 3 with help from the expert team from Intel but had to abandon item 4. The final solution looked like the following:

We had System 1 running camera analytics using Openvino such that any negative emotions detected in the customer were triggering a ‘1’ to the EdgeX  MQTT device service. We added two additional device services to receive product information via the bonus camera setup (this was the surprise element in the hackathon and had bonus points if included in the solution) and the RFID sensor. The dashboard created using Intuiface REST API tools enabled a real time view of the sensors. Depending on the product and the customer emotion analysis it would provide real time chart of the check out lane. If the customer exceeded ‘x’ amount of time with neutral, disgust or anger (any negative emotion), the software on system 1 would change the data from ‘0’ to ‘1’ to the MQTT device service. The custom software we wrote to extend the device and cloud services sent this data to the Nexmosphere sensor management software so the LED’s would turn ON. Given the real time chart and the LED status, the store associate can offer to help the customer before being called to help.

On day 2, we explained our motivation behind the work to the judging team ahead of the formal presentation. It was great to hear their questions and understand their perspective, we did not realize we ended up creating a solution that could support multiple use cases. I remember we titled the work and selected the use case ‘Enhanced Customer Experience during Checkout’.

Throughout this flurry of activity, we had opportunities to network with other teams, look at some of the cool work they were doing. We also interacted with the experts from LF Edge member companies like Intel, Dell and Canonical, which gave us first hand opportunity to provide feedback towards the next revision of EdgeX. The hackathon was very well organized, had great food and even included a live music jam session on day 1!

Although it was a new venue and a new team, it all came together in the end. Team Intel/Intuiface won second place!

Stay tuned here for more details about the next EdgeX Open Hackathon! If you missed the EdgeX Open, click here to watch the video from the event.

LF Edge Member Spotlight: IOTech Systems

By Blog, EdgeX Foundry, Member Spotlight

The LF Edge community is comprised of a diverse set of member companies that represent the IoT, Enterprise, Cloud and Telco Edge. The Member Spotlight blog series highlights these members and how they are contributing to and leveraging open source edge solutions. Today, we sat down with Andy Foster, Product Director, at IOTech Systems to discuss the importance of a growing ecosystem, their IoT framework, the impact LF Edge has made and what the future holds for the company.

Can you tell us a little about your organization?

IOTech’s vision is to build and deploy the pervasive secure, open IoT software platform for edge environments that helps drive innovation, global adoption, market velocity and scale.

The company is leveraging an open source strategy based on the LF Edge’s EdgeX Foundry project to accelerate growth of a global partner ecosystem and dramatically increase deployment velocity of IoT systems by reducing custom systems integration. The EdgeX project is aligned around a common goal – the simplification and standardization of the foundation for edge computing architectures in the IoT market.

IOTech is supporting the rapidly growing EdgeX global developer community and partner ecosystem by providing a fully commercialized version of the EdgeX called Edge Xpert.

This licensed offering comes bundled with a range of industrial grade connectors to popular North and Southbound and is available on multiple hardware and OS combinations with regular software upgrades and different support and maintenance service level options. Complementary professional service offerings include training, pilot project support, accelerated product extensions and third party product integrations.

Additionally, IOTech has extended  EdgeX with its recently announced Edge XRT, the first “hard” real-time edge IoT platform.

Edge XRT is designed to meet the needs of industrial edge applications faced with one or more of the following key challenges: deployable on ultra-low footprint embedded edge nodes; latency and response times measured in microseconds; requirement for predictable real-time processing and execution.

Why is your organization adopting an open source approach?

IOTech’s core business execution strategy is to support an open source business model. We believe that this is the only model that can realistically facilitate rapid global scale out of this technology in the window of opportunity that exists, both in terms of removal of barriers to development, deployment and Time to Market (TTM) for new products and services. IoT is also fundamentally about managing heterogeneity we believe that the market is demanding an ‘open’ versus proprietary approach at the platform level, our customers ultimately want choice of best of breed, not to be tied to one vendor’s solution.

Why did you join LF Edge and what sort of impact do you think LF Edge has on the edge, networking, and IoT industries?

We believe that the best way to address market fragmentation and drive edge technology adoption is through industry collaboration and an open architecture approach. LF Edge is creating an ecosystem of companies focused on addressing the key challenges faced by the next generation of edge systems.

LF Edge membership is growing rapidly and includes a broad spectrum of companies from major international technology leaders to new startups. The breadth of membership and expertise is helping to ensure a cross-industry approach, with organizations working collaboratively to solve a common set of edge related problems. By avoiding duplication while at the same time ensuring interoperability and re-use across LF Edge projects is key to speeding time to market and reducing the implementation risk of new edge technologies. 

What do you see as the top benefits of being part of the LF Edge community?

Firstly, by collaborating with other organizations on the development new open source edge technologies allows companies to pool resources and leverage the collective expertise of many of the world’s leading technology providers. For IOTech, this has the significant benefit of enabling us to bring new products to market more quickly and share the costs of developing these solutions.

Secondly, LF Edge is helping to shape the future direction of edge computing and being part of the ecosystem gives IOTech the ability to help influence that direction, something that is much more difficult to do if we were not a member. It also gives us much better visibility into the where the industry and market is moving with respect to edge computing technologies, as well as access to some of the best brains driving this change.

Finally, being part of growing LF Edge  ecosystem provides IOTech with many commercial opportunities to partner with other member companies to collaborate on new projects and drive business growth.

What sort of contributions has your team made to the community, ecosystem through LF Edge participation? 

IOTech are one of the founder members of the EdgeX Foundry project and have been actively participating in the project at various different levels from it’s inception. We have made significant contributions in terms of technical leadership and code contributions within the project. Members of the IOTech team currently hold the following leadership positions within EdgeX:

  • Keith Steele, TSC Chair and LF Edge Board Member
  • Jim White, TSC Vice Chair
  • Iain Anderson, Device Service WG Chair
  • Robin Chatterjee, Test/QA WG Chair

We have leveraged our expertise in OT systems to work extensively on EdgeX’s Device Service layer. This work includes the development of SDKs in Go and C and the implementation of a number of protocol specific Device Services including Modbus, BACnet, OPC UA, MQTT and Virtual.

As TSC Vice chair and original EdgeX architect, Jim White has been active across all of the project’s WGs, providing technical leadership and support to the EdgeX teams.  For almost three years Keith Steele has been Chair of the TSC, helping to coordinate the projects direction and actively promote its goals and objectives within the EdgeX ecosystem and wider industry.

In addition to IOTech’s contributions to EdgeX Foundry we are also participating other complementary LF Edge projects such as the Akraino Time-Critical Edge Compute project where our EdgeX experience can be shared within the wider LF Edge ecosystems.

What do you think sets LF Edge apart from other industry alliances?

Put simply delivery focus! Other bodies are focused on producing guidelines and possibly new edge standards, whereas LF Edge’s objective is to produce open source solutions that can be deployed in real system or proven blueprints that can be used to support real edge use cases. 

How will  LF Edge help your business?

Firstly, the collaborative development that is inherent in a open source project is allowing  IOTech to leverage a far larger pool of development resources than is currently possible on our own. This is helping us to bring new edge solutions to market more quickly.

Working within an ecosystem of the world’s leading-edge technology companies ensures that the technologies that we develop are addressing the real needs of industry. It provides our customers with the reassurance that our products were developed with broad industry support, helping reinforce the importance of openness and choice.

Finally, from a marketing perspective the profile of LF Edge generates a lot of attention in our target markets and the efforts of the LF marketing team provides member companies with lots of opportunities to complement their own marketing programs and also share costs, for example by attending key industry tradeshows as a co-sponsor on the LF Edge booth.

What advice would you give to someone considering joining LF Edge? 

From IOTech’s perspective we’ve hopefully outlined the key benefits of joining LF Edge. We also think that these benefits will apply to most organizations. Our recommendation is to join, embrace collaboration and most importantly get involved. Your return on investment will be multiplied depending the effort you apply and the projects that you support. Where else can a company leverage the combined expertise in edge computing and resources of the LF Edge ecosystem, especially when combined with the many commercial opportunities for collaboration and partnering.

 

Node-RED and EdgeX Foundry

By Blog, EdgeX Foundry

Written by Odysseas Lamtizidis, EdgeX Foundry Technical Community Member

In this post we will be looking into the integration of two fundamental Open Source platforms for the Internet of Things.

The first being Linux Foundation’s EdgeX Foundry platform as the backbone of our system and Node-RED which will be used to simulate a Device Service.

But first things, first. What is Node-RED?

As we read from their website:

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single-click.

Node-RED thus is an event-driven flow-based programming platform that is built on Node.js, leveraging it’s lightweight nature and extensive scalability to create applications mainly for the Internet of Things.

A flow-based programming language is a language where the application functionality is expressed as a series of black-boxes that are connected, creating a chain where the output of a box is the input of the next one. Each box receives a message, performs a certain functionality on it and then forwards it to the output and the next box.

Node-RED has various ready nodes (boxes), from creating http resources to converting the message to JSON or running an arbitrary user-defined javascript functions. Below we see an example of a flow as seen from the web editor.

Image X shows a flow in the node-RED web editor, where multiple nodes are defined and connected to create a certain application logic. The flows start with an MQTT listen node which will be triggered whenever an MQTT message is broadcasted in a certain topic.

The project was started from IBM’s Emerging Technology Services group and has a vivid community. You can find more information on the site and in the forums.

EdgeX Integration

As mentioned above, we will be using Node-RED as a custom device service, replacing the standard EdgeX Foundry device-sdk-go library which is used to develop custom device services.

A device-service is a “service” that defines and controls an array of IoT devices, but following the EdgeX micro-services architecture, a device-service as seen from the EdgeX system, is in essence a RESTful API.

Thus, by following the device-service specifications document, one can easily create the appropriate flows in Node-RED so that:

  1. The device-service properly registers itself to EdgeX
  2. The device-service has the necessary API resources according to the device-service spec
  3. The device-service performs arbitrary functionality to manage it’s devices

In our use-case implementation, we will be using Node-RED to introduce a proof-of-concept integration of a Lora-device, using the ChirpstStack (aka Loraserver) network stack and their application-level server. In essence, since the application server can not be directly integrated into EdgeX (different API structure), we will be using Node-RED service as a middleware, translating the EdgeX commands/API calls to Chirpstack’s application server and vice-versa.

Image XX illustrates the high-level architecture of the device service system we described, showcasing the use of Node-RED as a middleware for the 2 distinct RESTful APIs. The image is taken from an original work, please see #More Information.

Node-RED introduction

The development of an application in Node-RED is fairly simple, the user installs Node-RED using a deployment of choice (npm, docker, etc.), as detailed in the docs, and then access the web-editor at http://localhost:1880. The user then proceeds to select nodes and connect one to another. There are a handful of tutorials on the node-RED docs for the user to grab the gist of the platform, the learning curve is truly small.

After creating the flow, the user simply clicks “deploy” and the flow is activated by Node-RED. Node-RED is fairly customisable, enabling the change various aspects of the application, using the settings.js file. We invite the user to explore the documentation and the node-RED forum so as to gain better understanding of the capabilities of the platform.

An important aspect that is worth mentioning is the variable (context) storage mechanism (Context Store). The variables (flow, global) are normally stored in memory but in order to achieve persistency even at the event of a reboot, the user should enable the file-storage, as indicated in the docs. This will save the variables every X seconds in a JSON file, performing checkpoints of persistency. The interval can be reduced, but it can have an impact on performance, especially if we use a flash-storage (such as an sd card) which in the long-term will greatly stress the card.

EdgeX Foundry Registration

In order for the device-service to register with EdgeX, it simply has to perform a series of API calls to the EdgeX core-services, namely to core-data and to core-metadata, according to the EdgeX API walkthrough that is available at the EdgeX docs.

Disclaimer: Please note that the docs are somewhat outdated and the device addressable is no longer needed, the device resource is defined at the provisioning phase.

X2

The reference flow is shown in image X2. The main building blocks are the HTTP REQUEST node and FUNCTION node. For ease of use, for each http request, we define every attribute of the request (body, url) at the function node that proceeds each HTTP REQUEST node. This enables complete customisation and easy debugging for each node. For increased ease-of-use, we defined the majority of the bodies in a function at the start of the flow so we can easily modify common parts (like device name).

The bodies can either be saves as different attributes of the msg object or as flow variables that are loaded before each HTTP REQUEST node. The first is more memory efficient.

After a successful registration, a special flag is saved that is checked at the start of the flow so in the case of a service restart, the device-service will know not to repeat the registration. Moreover, the use-case flow lacks advance flow control mechanisms that will pause the registration in case of an error or controls that enable the device-service to restart registration from the last successful step.

At the moment, the PoC flow we simply restart from the start in case of restart. This is acceptable as EdgeX will simply ignore duplicate objects.

Regarding chirpstack, the registration subflow starts at the end of the EdgeX Registration flow. At some point in the registration, an endpoint is defined so that the Chirpstack application server makes an HTTP request at the Node-RED API endpoint, each time a value is received from the LoRa device. Node-RED receives that value and transforms the request to an EdgeX appropriate format in order to forward it to EdgeX-core-data service.

Device-service API resources

The PoC chooses to implement a subset of the available API specification and doesn’t support the addition of more than one device under the device service. The API conforms to the device specification where the reader can read in-detail the description of each resource.

The API structure is shown in image X1. Note that according to the EdgeX specs, the commands are issued to the device service using a this url structure: device/<device_id>/<command_name>, where device_id is generated at the device provisioning phase, while the command_name is defined at the device profile.

In order to support this structure, the API endpoint is set to listen for any url with the structure device/:variable_1/:variable2, and then proceeds to check the variables at the FUNCTION node that supersedes the HTTP endpoint node. Thus, the user can create a single endpoint to receive all the requests with the above structure and then differentiate depending on the variables.

Finally, the /health endpoint is used by the consul service registry. The user could implement a flow logic where errors are caught and saved into a flow or global variable so they can be used to generated the appropriate error code and message when the /health endpoint is used by consul. The PoC does not implements such a logic and the device-service is set to always as healthy in Consul.

Moreover, a command is defined, that simply returns the last read value from the lora-device.

Arbitrary Functionality

We could enable any kind of functionality, from running arbitrary shell commands on the system or entire program logic in FUNCTION nodes. In this PoC the device-service simply works as a middleware.

More Information:

The source-code for the above blog-post can be found on Github, it is part of a larger project where all the platforms that are described are presented in depth (such as ChirpStack aka Loraserver). The project’s document can be found on ResearchGate.

To learn more about EdgeX Foundry, visit the website or wiki.  Or, you can join the conversation and ask questions on our Slack channel.

This blog originally ran on Odysseas’ blog on Notion. You can view the original here

EdgeX Foundry F2F: Sun, Community and Code

By Blog, EdgeX Foundry

By Jim White, Co-Chair of the EdgeX Foundry Technical Steering Committee and CTO of IOTech Systems

Earlier this month, the EdgeX Foundry Technical Steering Committee (TSC) met in Phoenix, Arizona to finalize our Fuji release (due out at the end of this week – November 15th) and scope the effort of our next release – code named Geneva – that we expect to release in the spring of 2020.  While officially this was a TSC meeting, we are an open project and always invite our developer community to participate in the discussions and planning effort whenever possible.

Hosted by Intel in downtown Phoenix, this season’s meeting was attended by more than 60 people in person and another dozen on line – our largest meeting yet.  Intel did a fabulous job of providing a great meeting space and allowing the community to enjoy the surrounds of the Phoenix area.  If they were responsible for the picture-perfect weather, they couldn’t have made it any nicer!  80 degrees and sunny each day.

Fuji is the community’s fifth release of EdgeX and a minor dot release (version 1.1) to our 1.0 Edinburgh release launched this past spring.  We have developed a well-established cadence that is two years in the making.  We have two releases a year (spring and fall) with the planning of the next release right on the heels of completed release.

If you are wondering what is in Fuji that is about to be released, the highlights of this release include:

  • New and improved security services – fully integrated with existing micro services (API Gateway, secure storage)
  • Application services and application functions SDK as full replacements for older export services (we expect to deprecate the export services with the next release)
  • System management improvements to include ability to set configuration
  • Improved testing and quality assurance procedures and tools
  • Addition of an many more device services (actually to be released independently in mid-December with the device service SDK release).

The fact that Fuji is a dot release on top of our 1.0 release is an important.  As the project matures and stabilizes, more companies are building products on top of EdgeX and the community wanted to provide them with affirmation that EdgeX is fit for purpose without changing everything each release – while still adding new features in a way that supports backward compatibility.  Companies like IOTech, Beechwoods, RSA and others (see https://www.edgexfoundry.org/edgex-in-market/) continue to leverage EdgeX and need the stability in order to avoid lots of thrashing each six months.  ObjectBox is releasing their version of core EdgeX services (replacements for the EdgeX reference implementation of these services) that incorporate their embedded database with Fuji this month to coincide with the EdgeX release.  These are prime examples of the community that now rely on EdgeX Foundry.

Looking ahead – what’s in the Geneva release?  Based on our planning this past week, Geneva will be version 2.0 – a major release.  It will include many new features and some changes.  Specifically, the Geneva release will feature:

  • Automatic and dynamic device/sensor provisioning and on-boarding – allowing for more zero touch deployments
  • Interoperability testing – allowing the community and users to get a better appreciation that all the micro services are working together properly
  • Replacing the reference implementation rules engine service – the last of the legacy EdgeX Java micro services (allowing the footprint of the overall system to be significantly reduced)
  • Use of Redis as the default reference implementation database (replacing MongoDB)
  • Improved security services (more secret store usage, per service token use, token revocation/expiration/rotation)
  • User guidance on platform needs (more performance statistics, number of devices allowed per service/EdgeX instance recommendations, platform and hardware recommendations per edge use case)
  • Exploration of an alternate message support (offering an alternative to Zero MQ)
  • Archive of Export Services (the new Application Services and App Functions SDK taking its place)
  • Use of Jenkins Pipelines to improve and enhance our CI/CD processes
  • A refactor of the EdgeX APIs to provide more flexible and more nimble request and response bodies in the message exchange, which should improve testing and improve some performance aspects
  • A number of system and sub-system designs are also forecast to be completed with this release. These designs are pre-cursor work toward the Hanoi (fall 2020) and beyond releases

It’s starting to look like winter outside in the northern hemisphere.  Holiday season right around the corner.  EdgeX is heating up.  Good time to stay inside and curl up next to EdgeX and try out the latest features and explore the future roadmap.  Come join the fastest growing open source edge platform project.

Edge Computing at IoT Solutions World Congress 2019

By Blog, EdgeX Foundry, Home Edge, Project EVE

Every year one of the world’s largest Internet of Things trade shows, IoT Solutions World Congress, is held in Barcelona, Spain. It brings together device manufacturers, service providers, AI & ML companies and solutions integrators from around the world to share information about their products and the state of IoT ecosystems. Filling multiple convention halls at the Fira Barcelona center, and featuring the biggest names in IoT and technology, you can spend days walking the expo hall and talking to vendors.

Crowd at the LF Edge Booth

This wasn’t the first time the EdgeX Foundry has had a booth at IOTSWC, but this year they were joined by other LF Edge projects, specifically Home Edge and Project EVE, to present solutions across the edge landscape. Our booth was staffed by project contributors from all over the world, from the US and Europe to India and Taiwan, and featured real world examples of the open source technology that is being developed under the LF Edge umbrella.  Not only did our members get a chance to learn about each other’s projects during this time, they were able to explain those other projects to the visitors to our booth. It was truly a community coming together to support and promote the LF Edge as a whole.

EdgeX Smart Building Demo EVE deployments on a wind turbine

We spoke with thousands of people over the 3 days of conference, and gave countless demonstrations. One notable change in conversations from a year ago is that most attendees we spoke to this year already knew and understood the importance of edge computing, and were looking for specific solutions to the problems that they are now facing. And while many vendors at the show offered some of these solutions, only the LF Edge projects offered open, vendor agnostic platforms that prevent lock-in and promote an ecosystem of 3rd party development around commonly developed core.

Selfie of the LF Edge booth staffIf you missed us at IOTSWC, you can join our projects online where we have a public Slack, mailing lists and host our meetings in the open. You can also look for us at events in 2020!

EdgeX Foundry Reaches 1 Million + Platform Container Downloads, Launches New Fuji Release

By Announcement, EdgeX Foundry

  • EdgeX’s fifth release offers more scalable solutions to move data from devices to cloud, enterprise and on-premises applications
  • The first LF Edge project to achieve Stage 3 ratification, EdgeX hits widespread adoption and production-level maturity
  • EdgeX and LF Edge onsite at IoT Solutions World Congress with demos from Dell Technologies, Home Edge, IOTech and Project EVE

BARCELONA, SPAIN and SAN FRANCISCOOctober 28, 2019EdgeX Foundry, a project under the LF Edge umbrella organization within the Linux Foundation that aims to establish an open, interoperable framework for IoT edge computing independent of connectivity protocol, hardware, operating system, applications or cloud, today announced the availability of its “Fuji” release. This release offers additional security and testing features on top of the production-ready “Edinburgh” release launched this spring.

“EdgeX Foundry has experienced significant momentum in developing an open IoT platform for edge-related applications and shows no signs of slowing down,” said Arpit Joshipura, general manager, Networking, Edge and IoT, the Linux Foundation. “As the only Stage 3 project under LF Edge, EdgeX Foundry is a clear example of how open collaboration is the key to an active community dedicated to creating an interoperable open source framework across IoT, Enterprise, Cloud and Telco Edge.”

Launched in April 2017, and now part of the LF Edge umbrella, EdgeX Foundry is an open source, loosely-coupled microservices framework that provides the choice to plug and play from a growing ecosystem of available third-party offerings or to augment proprietary innovations. With a focus on the IoT Edge, EdgeX simplifies the process to design, develop and deploy solutions across industrial, enterprise, and consumer applications. As a Stage 3 project under LF Edge, EdgeX is a self-sustaining cycle of development, maintenance, and long-term support. As an example of the rapidly accelerating use of the code, EdgeX hit a milestone of 1 million platform container downloads, which almost half of these took place in the last few months.

“The 1M container download isn’t our only milestone,” said Keith Steele, EdgeX Foundry chair of the Technical Steering Committee and LF Edge Governing Board member. “The development team has expanded with more than 150 active contributors globally and the partner ecosystem of complementary products and services continues to increase. As a result, we’re seeing more end-user case studies that range from energy and utilities, building automation, industrial process control and factory automation, smart cities, retail stores and distribution and health monitoring.”

The Fuji Release

As the fifth release in the EdgeX Foundry roadmap,  Fuji offers significant enhancements to the Edinburgh 1.0 release, which launched in July, including:

  • New and improved security features to include PKI infrastructure for token/key generation.
  • Application services that now offer full replacement capability to the older export services provided with previous EdgeX releases. These application services offer more scalable and easier to use solutions to get data from the EdgeX framework to cloud, enterprise and on-premises applications.
  • Example application services are provided with this release to allow users to quickly move data from EdgeX to the Azure and AWS IoT platforms.
  • A new applications function Software Development Kit (SDK) also provides the EdgeX user community with the ability to create new and customized solutions on top of EdgeX – for example, allowing EdgeX to move edge data to legacy and non-standard environments.
  • Unit test coverage is considerably increased (in some services by more than 200 percent) across EdgeX core and supporting microservices.
  • New device service connectors to BLE, BACNet, IP camera, OPC UA, GPS, and REST device services.
  • Choices for commercially-supported EdgeX device connectors are also starting to blossom with offerings for CANopen, PROFINET, Zigbee, and EtherCat available through EdgeX community members.

LF Edge on Display

Live demonstrations of EdgeX Foundry use cases will be available at the LF Edge booth (booth A151) at IoT Solutions World Congress in Barcelona, October 29-31, 2019. Dell Technologies and IOTech will also be on-site debuting new demos based on EdgeX Foundry while other featured LF Edge projects include Home Edge and Project EVE.

EdgeX Foundry leaders will present on “Leveraging EdgeX Foundry as an Open, Trusted Data Framework for Smart Meter Monitoring,” on Tuesday, October, 29 at 12:05-12:50 pm.

Additionally, LF Edge will host a workshop entitled “State of the (LF) Edge” on October 31 in Lyon, France, co-located with  Open Source Summit Europe (October 28-30).  More details are available here.

Inaugural EdgeX Open

The EdgeX Foundry community recently kicked off a series of hackathons, titled the EdgeX Open. More than 70 attendees participated in the first event on October 7- 8, 2019, in Chicago. Hosted by LF Edge and the Retail Industry Leader Association (RILA), and sponsored by Canonical, Dell Technologies, Deep Vision, HP, Intel, IOTech, IoTium and Zededa, the event featured five teams that competed in retail use case categories. More details on the event, including the winning use case from Volteo, are available in this blog post.

The next hackathon will coincide with the Geneva release, targeted for Spring 2020. It will be centered on the Manufacturing vertical and held in a location in Europe.

For more information about LF Edge and its projects, visit https://www.lfedge.org/ 

About the Linux Foundation

Founded in 2000, the Linux Foundation is supported by more than 1,000 members and is the world’s leading home for collaboration on open source software, open standards, open data, and open hardware. Linux Foundation’s projects are critical to the world’s infrastructure including Linux, Kubernetes, Node.js, and more.  The Linux Foundation’s methodology focuses on leveraging best practices and addressing the needs of contributors, users and solution providers to create sustainable models for open collaboration. For more information, please visit us at linuxfoundation.org.

###

The Linux Foundation has registered trademarks and uses trademarks. For a list of trademarks of The Linux Foundation, please see our trademark usage page: https://www.linuxfoundation.org/trademark-usage. Linux is a registered trademark of Linus Torvalds.

The Inaugural EdgeX Open Hackathon

By Blog, EdgeX Foundry

Written by Jason Shepherd, LF Edge Board Member

On October 7th and 8th, I had the pleasure of attending the inaugural EdgeX Open Hackathon in Chicago. EdgeX Foundry is focused on facilitating interoperability between devices and applications, regardless of underlying hardware, OS, and connectivity protocol. The project is ultimately about creating a de-facto standard open API that binds together a preferred mix of open source and commercial value-add.

Once EdgeX hit 1.0 status in June with the Edinburgh release, the community started planning the EdgeX Open Hackathon series for leveraging the framework in customer-valued use cases.

The inaugural EdgeX Open, hosted at the Tech Nexus coworking space in Chicago, hosted by LF Edge, EdgeX Foundry and RILA

Six teams participated in this inaugural event, representing HAVI, Intel/Intuiface, Johnson Controls, UST Global and Volteo in addition to a small independent team of registered individuals. Pre-work was allowed but a “secret ingredient” (Iron Chef-style) was introduced the day of the event to level the playing field a bit. In this case, it was a camera using Intel’s OpenVINO computer vision and image recognition model to output an object recognition algorithm to an API. Teams were able to earn extra points by integrating this technology into their solution stack.

Read on for how the hackathon went down!

Day 1:

The first day began with pitches from top sponsoring companies Dell, HP and Intel on what EdgeX Foundry means to the IoT market. Nicholas Ahrens of the Retail Industry Leaders Association (RILA) talked about the importance of innovation in retail and then Brad Corrion of Intel walked the teams through the objectives and introduced the secret ingredient.

Brad Corrion walking through the event rules

During my pitch, I had the pleasure of announcing that the EdgeX Foundry project recently hit a million total microservice downloads since the April 2017 launch. To get a sense of the accelerating momentum, half of these downloads occurred in the past two months!

With intros completed, the developers got to work. Most of the teams brought a plethora of devices to work with including cameras, sensors, scanners and a thermal printer and many had done some pre-work. Numerous developer attendees had never used EdgeX before and all were able to get the framework running quickly. Once the set-up was completed, they started with their integration of various devices and application stacks to build out their use cases.

Teams diligently working on their solutions

The participants had their choice of one of three use cases, or an open category:

  1. Advanced loss prevention – leveraging EdgeX to correlate computer vision events with telemetry from sensors such as RFID and transaction log data from Point-of-Sale systems for improved loss prevention/theft detection
  2. Dynamic personalized retail experience – leveraging computer vision and sensor data to drive an improved in-store customer experience based on individual shopper preference
  3. Inventory management – using data from sensors and scanners (hand-held and/or drone-based) to improve inventory accuracy
  4. Open category – any retail-centric use case deemed valuable by end users

While it appeared that most of the users picked the open category, the reality is that they did variants of the three main use cases. The teams wasted no time getting to work (actually many were working during the intro pitches…) and the room was bustling all day with activity.

From top (counter clockwise): Team Havi, Team Johnson Controls, Team Skanna

The UST Global team came up with an innovative solution for highly perishable food using Augmented Reality (AR) and RFID to enable grocery store associates to point a smartphone at fresh meat and produce displays to see products that are nearing or beyond the expiration date, i.e. “How fresh is the meat?” This would benefit the grocery store in terms of streamlining how they find, sort and discount expiring food, and benefit the consumer in terms of choosing between either the freshest products or benefiting from dynamic price markdowns or food nearing the expiration date. They came prepared, complete with props including fake chicken nuggets and lamb chops, making me hungry every time I walked by their table.

The UST Global team working on their solution for “How Fresh is the Meat?”

Day one wound down with a whiskey tasting which reminded me of the face-to-face TSC meeting in Edinburgh a year prior where we also ended the first day with a whiskey tasting. I sense a theme here!  Whiskey sommelier Anthony Dina selected three boutique whiskeys from the “edges of the earth” – one from a small batch distiller in the US, one from Scotland and one from New Zealand.

Whiskey from the edges of the earth

We then had some tasty Chicago deep dish pizza, followed by the “EdgeX Open Mic” – a community music jam.  Tony Espy (Canonical) and I worked up a variety of singalongs and managed to get a handful of folks belting out Neil Diamond’s Sweet Caroline and John Denver’s Country Roads, plus he and I did some pretty decent versions of Radiohead’s High and Dry and Jeff Buckley’s “Halleluiah”… especially considering this was only the second time we’ve played together (the first being an open mic night in Edinburgh during the Fall 2018 EdgeX F2F TSC).

Tony and I belting out the jams

Several folks came up to us afterwards and talked about how they played instruments spanning guitar to saxophone. At the next EdgeX Open, we clearly need to prepare more in advance and get a full band together, or perhaps we should just serve a little more whiskey beforehand! Or, both?

Day 2:

Day two started early with the teams continuing to build out their solutions unified by the EdgeX framework. Around 11am the judges we’re introduced – Eran Harel from AppCard, Nicholas Ahrens from RILA, Juan Santos from Tavistock Group, Mark Stutzman from Area 15, and Scott Gregory from HP. The judges subsequently spent time with each team to learn about their solutions before deliberating.

Hackathon Judges

Each team was then able to formally pitch to the judges and all participants in a final presentation that walked through their solution, what ingredients they used and how EdgeX was used for integration. The judges deliberated a bit more and then we had the closing ceremony, during which the winners were announced… and… drum roll… here they are!

The Intel/Intuiface team meeting with the judges

1st Place – Team Volteo: An inventory management and loss prevention solution that used RFID sensors and networked cameras for accurate inventory management and to record door exit events by combining POS transaction data together with merchandise movement tracked by RFID sensors and cameras.

Team Volteo

2nd Place – Team Intel/Intuiface: A predictive self-service checkout assistance solution that used RFID and computer vision to trigger an alert when a customer failed to scan items within a reasonable time and/or based on OpenVINO emotion detection during customer interaction with the kiosk.

Team Intel/Intuiface

3rd Place – Team UST Global: An AR and RFID-based solution to track ultra-perishable goods in grocery stores and allow for dynamic pricing, e.g. how fresh is the meat? They developed an AR mobile app to scan food aisles and provide details on freshness, current price, etc.

Team UST Global

And this wasn’t just for bragging rights – 1st, 2nd and 3rd place winners received $5000, $2500, and $1000 in cash respectively!  As co-founders of the EdgeX Foundry project, Jim White and I had the pleasure of handing out big checks during the award ceremony, summarily checking off a to-do on my bucket list!

Congrats to Team Volteo for winning the Grand Prize!

Thanks to our sponsors!

It has been an honor for me to participate in the EdgeX community over the years and this event was no exception. Big thanks to the LF Edge and the Retail Industry Leaders Association (RILA) for hosting the event, and to sponsors Canonical, Deep Vision, Dell Technologies, HP, Intel, IoTium and ZEDEDA who also provided their commercial offerings for the developers to use in their solutions as well as tech support on-site. Also, a shout-out to the planning committee which included volunteers from Dell, HP, IBM, Intel and the Linux Foundation.

EdgeX Foundry community leaders helped answer questions and more during the hackathon

Looking forward

The concept behind the EdgeX Open Hackathon is for it to be a global franchise series. Other markets in discussion for future events include manufacturing, smart cities, oil and gas, utilities/energy, agriculture, healthcare and beyond.

Stay tuned for more detail on the next installment, for which we also plan to include more about the overall LF Edge value prop by pulling from other enabling projects within the umbrella, combined with sponsor content. We’re thinking manufacturing in the Spring 2020 timeframe, likely aligned with an industry event such as Hannover Messe in a nearby town in Europe.

In the meantime, download EdgeX and build something great!

 

End User Case Study: Monitoring industrial equipment using EdgeX Foundry

By Blog, EdgeX Foundry

By Jason Shepherd, LF Edge Governing Board member and IoT and Edge Computing CTO, Dell Technologies

Founded in 1996, Technotects is an IoT technology consulting firm with broad domain expertise in industrial use cases. When one of their industrial equipment OEM customers independently realized the power of the EdgeX Foundry framework, Technotects planned and executed a Proof-of-Concept (PoC) with one of their customer’s typical process skid use cases.

This blog walks through the successful PoC, including what the solution entailed and Technotects’ experience working with the EdgeX platform. We’re seeing more and more of these types of real-world applications go public in the community on the heels of the EdgeX Foundry “1.0” Edinburgh release.

The use case

The use case for the PoC is monitoring sensor and pump information from a process skid used in a variety of applications, including agricultural, flavors and fragrances, pharmaceutical, petro-chem and food/beverage industries. Technotects’ goal of the effort was to prove that the EdgeX Foundry platform, combined with commercial value-add from the ecosystem, can provide an Internet of Things (IoT) solution stack that can address the unique interoperability challenges that industrial applications present, such as a mix of connectivity protocols and near real-time I/O processing, all while giving them the freedom of choice by being decoupled from proprietary, single-vendor solutions. In turn, this would allow their customers to improve their overall solution architectures, reduce runtime royalties and accelerate their time-to-market.

EdgeX-enabled Dell gateway utilized in the Technotects PoC

Technotects’ initial interest in EdgeX Foundry was the flexibility offered by the open ecosystem and the potential of reducing excessive runtime licensing fees per deployed host node, based on the combination of a proprietary edge application framework, edge historian and both southbound and northbound connectivity. In addition, they were attracted to the ability to make build-or-buy decisions with EdgeX without being locked into any specific choice for connectivity or applications value-add services.

The PoC basics

For the PoC, Technotects leveraged a Dell Edge Gateway 3002, Photon OS and VMware Pulse IoT Center, Edge Xpert from IOTech, RedisEdge from Redis Labs, Project Iris from RSA Labs, both AWS and Azure cloud platforms (hosting Redis for data backup) and a custom-built edge management console. Refer to the figure below for a block diagram of the setup and read on for more detail on how the effort came together.

IIoT Edge Stack Block Diagram for the Technotects PoC

Solution deep dive

For the EdgeX foundation of the stack, Technotects chose to work with IOTech’s Edge Xpert offering – a commercially-supported variant of the open source code that is available from the project GitHub within the Linux Foundation. Their use of Edge Xpert enabled them to focus on the integration with their customer’s preferred value-add software components rather than dealing with the open source code. They found IOTech’s documentation to be clear and the initial installation to be quick and straightforward – benefits when using a commercial variant that has additional hardening and packaging. Of course, using a commercially-supported variant versus simply downloading the open source code is a matter of personal preference.

EdgeX is completely neutral to OS, underlying hardware, protocol and programming language, and for this PoC, Technotects chose to leverage the Dell Edge Gateway 3002 and both Ubuntu from Canonical and Photon OS. Photon OS is an open source, container-optimized Linux distribution that has been nested within VMware’s vSphere offering for some time. Technotects was able to run their console, communication drivers, Edge Xpert and all the other referenced value-add software components in Docker containers in both operating systems, all without issue. They find that having the flexibility to deploy on any combination of hardware (x86 or ARM) and operating systems (Linux or Windows) in the field depending on customer need is valuable.

For southbound connectivity, Technotects leveraged a hybrid model. The process skids leverage a programmable logic controller for process control and for this PoC, Technotects used a commercially available Ethernet/IP driver to communicate with it. In turn, they connected this off-the-shelf, licensed driver package into the OPC-UA Device Service native to EdgeX. To connect to other devices on the skid, Technotects used the Modbus TCP protocol from IOTech’s Edge Xpert offer, written using the native EdgeX Device Service SDK. With the plug-in Device Service model, any combination of devices and protocols can be readily added in the future as needs evolve.

The solution architecture is a great example of both 1) how existing connectivity stacks can be used alongside native EdgeX Device Services in a hybrid model and 2) that in the EdgeX model, even connectivity written with the open EdgeX Device Service SDK can be monetized. Commercially-supported variants of EdgeX Device Services are likely to be attractive to end users with mission-critical use cases that involve bespoke and/or proprietary protocols in that support for this southbound connectivity often requires institutional knowledge gleaned from reverse engineering.

Meanwhile, end users can benefit from a growing number of open source Device Service options available within the community and increasingly Device Services that are supported by sensor makers for greenfield applications, coming with the sensor just like a keyboard comes with a driver for a PC. (Side note: There are numerous additional opportunities in development in the EdgeX ecosystem, although I must be sensitive to NDAs until they’re made publicly available). Net-net, the value of the open, vendor-neutral EdgeX ecosystem is in providing developers and end users with choices based on whatever is most valuable for their business.

Technotects leveraged VMware’s Pulse IoT Center to manage and monitor the underlying gateway hardware, OS and the EdgeX application framework above. VMware Pulse is a massively scalable, platform and application-independent solution for onboarding, managing, securing and monitoring IoT devices and gateways. System update campaigns can be applied in bulk and admins are alerted to any issues with their devices deployed out in the field, all in real-time. While VMware Pulse can be used standalone with its embedded device agent, it’s especially powerful when used in concert with the EdgeX framework. Any preferred console to manage applications and the underlying host system can be used with the EdgeX framework, with application-level functionality being enhanced by taking advantage of the EdgeX System Management Agent (SMA).

Technotects found the northbound connectivity to both Azure and AWS available in IOTech’s Edge Xpert to be very easy to configure. This highlights a key benefit of the EdgeX framework – decoupling investments in southbound data ingestion from any given cloud to enable choice over the long term, including realizing true-multitenancy from the edge. With the addition of support for multiple application services in the recent 1.0 Edinburgh release, data related to infrastructure monitoring and management can be sent to their management console of choice (in this case VMware’s Pulse IoT Center), whereas data related to the process for data analytics and taking action can be sent to any combination of on-prem or cloud-based application stacks of choice.

For local data persistence, Technotects chose RedisEdge over the MongoDB reference database that has been the baseline in the project until the recent 1.0 Edinburgh release. Technotects found it very easy to replace MongoDB with RedisEdge with no functionality differences, thanks to the work of Redis Labs in terms of making it an available plug-in within the EdgeX ecosystem. This is yet another example of how EdgeX is truly open and vendor-neutral, enabling users to leverage any enhancing functionality of their choice.

Finally, the PoC explored RSA Labs’ Project Iris active threat monitoring solution. Iris is a container that plugs into the EdgeX framework (and any other stack that supports containers) to profile baseline behavior for the stack and connected devices and then uses machine learning to detect anomalies. In turn Iris create alerts linked back to RSA’s popular Netwitness offering.

Conclusion

In closing, Technotects found EdgeX Foundry easy to work with and was able to successfully replicate their customer’s use case for process skid monitoring by leveraging the commercially supported framework from IOTech and value-add from Canonical, Dell, Redis, RSA and VMware. The flexibility to simply plug value-add into the open, vendor-neutral EdgeX foundation will provide both Technotects and their customers with more options in the future and help mitigate lock-in to proprietary edge platforms.

The EdgeX project has matured over the past two years to the current 1.0 state, and if you’re one of the thousands of end users that has been quietly prototyping with the platform, we welcome you to come forward and share your story on the project website through a blog or simple testimonial statement. The more people that come forward to share their success stories, the faster EdgeX will become the de-facto standard interoperability framework for the IoT Edge and the more we can all focus on innovation rather than reinvention!

Thank you for your time, and now’s your time to download the code or contact any of the providers in the ecosystem and build something great! Perhaps, as many have, even start your own business model around the EdgeX framework – just think of what Android did for scaling out an application and services ecosystem for mobile devices.

f you have questions or comments, visit the EdgeX Foundry Slack Channel and share your thoughts in the #community channel. Or, join the LF Edge Slack Channel and share your thoughts in the #EdgeX channel.

EdgeX Open Hackathon & Snaps

By Blog, EdgeX Foundry

Snaps are self-contained application packages designed to run on any system that supports them. Each snap is a compressed SquashFS package (bearing a .snap extension), containing all the assets required by an application to run independently, including binaries, libraries, icons, etc.

Snaps are managed by snap, the command-line userspace utility of the snapd service. With the snap command, users can query the Snap Store, install and refresh (update) snaps, remove snaps, and perform many other tasks such as managing application snapshots, setting command aliases, enabling or disabling services, etc.

The EdgeX Foundry project publishes a  snap named edgexfoundry, which includes all of the EdgeX core, export, security and support services, Mongo/Redis, and all of the 3rd party runtime dependencies (Consul, Vault, Kong, …). Hackathon participants should use the version from the latest/stable channel in the Snap Store, which is the 1.0.1 release (Edinburgh). See the snap’s README for details. To install from latest/stable run:

sudo snap install edgexfoundry

After installing the edgexfoundry snap view the services by issuing the snap services command.

sudo snap services edgexfoundry

Notice that after running this one simple snap install command, all of the services required to runEdgeX will have been installed and are already running in the background on your system. Note which services are enabled and which are active by running the snap services command.

Upon installation, the following EdgeX services are automatically enabled:

  • cassandra (persistent storage for Kong)
  • consul (aka ‘the registry’)
  • core-command
  • core-config-seed (one-shot)
  • core-data
  • core-metadata
  • edgexproxy (one-shot)
  • kong-daemon
  • mongod
  • mongo-worker (one-shot)
  • pkisetup (one-shot)
  • sys-mgmt-agent
  • vault
  • vault-worker (one-shot)

Note – some of the above services are “one-shot” services which run once and then exit. These will show up as “enabled” but “inactive”.

The following services are disabled by default:

  • support-notifications
  • support-logging
  • support-scheduler
  • export-client
  • export-distro
  • device-virtual
  • device-random

Any disabled service can be enabled and started using snap set. For example:

sudo snap set edgexfoundry support-notifications=on

To turn a service off (thereby disabling and immediately stopping it) set the service to off:

sudo snap set edgexfoundry support-notifications=off

On install, all services in a snap have corresponding systemd service units dynamically generated by snapd, thus if enabled, each will automatically start running when the system boots.

To keep things simple for EdgeX Open the security services in the edgexfoundry snap should be disabled by running:

sudo snap set edgexfoundry security-services=off

Currently, all log files for the snaps can be found inside $SNAP_COMMON, which is /var/snap/edgexfoundry/common. Additionally, logs can be viewed using the systemd journal or snap logs. To view the logs for all services in the edgexfoundry snap use:

sudo snap logs edgexfoundry

Individual service logs may be viewed by directly specifying the service name:

sudo snap logs edgexfoundry.consul

Once the EdgeX snap has been installed and the desired services have been successfully started, we are ready to set up an application service and a device service.

As a quick test the Mosquitto snap can be installed and a test topic can be published using the mosquitto_pub command. Use the following command to install Mosquitto:

sudo snap install mosquitto

Edgex-device-mqtt is a device service which supports importing device/sensor data readings via the MQTT protocol. It requires a running MQTT broker, as well as a peer MQTT application. The device service listens on a specific topic for incoming readings which it injects into EdgeX via the device service SDKs’ asynchronous readings feature. A peer MQTT application will be provided for the hackathon which will generate a steady stream of incoming readings related to the hackathon retail scenarios. This peer application will be setup to publish multiple scenario-specific streams on different topics. The device-mqtt service configuration provides a configuration value called “IncomingTopic” which can be used to change the topic the service listens on for incoming readings. Use the following command to install edgex-device-mqtt from the stable channel:

sudo snap install edgex-device-mqtt

After installation, check the status of the edgex-device-mqtt device service:

sudo snap services edgex-device-mqtt

Notice that the edgex-device-mqtt device service is disabled and inactive. This was done intentionally as the configuration and device profile need to be specific to each installation. You’ll find the configuration and device profile in the writable area of the snap (aka $SNAP_DATA):

/var/snap/edgex-device-mqtt/current/config/device-mqtt/res

After making the necessary modifications to configuration.toml (e.g. setting the “IncomingTopic” or changing “Port”) and mqtt.test.device.profile.yml (e.g. modifying device-resources, device-commmands, or core-commands), start and enable edgex-device-mqtt like this:

sudo snap start --enable edgex-device-mqtt

You should now be ready to receive peer MQTT application readings.

Now let’s publish a topic with a randfloat32 value of 1.2:

mosquitto_pub -t DataTopic -m '{"name":"MQTT test device","cmd":"randfloat32","randfloat32":"1.2"}'

You can check the readings from core-data with the following command:

curl -s localhost:48080/api/v1/reading | jq

Note – jq is a lightweight and flexible command-line JSON processor. In its simplest form with no command-line arguments specified, it simply outputs JSON its been given in a human-readable format. If not available on your system, it can be installed using sudo snap install jq.

If you see something similar to the following output then edgex-device-mqtt is working correctly. Float values are encoded base64 by default. The value “P5mZmg==” is 1.2 in base64.

[
   {
     "id": "4f922fd7-5c0d-48e0-8a06-6218d4c05fa9",
     "created": 1568926981304,
     "origin": 1568926981290,
     "modified": 1568926981304,
     "device": "MQTT test device",
     "name": "randfloat32",
     "value": "P5mZmg=="
   }
 ]

Once the device service has been started the configuration information is now in Consul. If you need to make further modifications to either the configuration or device profile, you’ll need to make the modifications in Consul which can be accessed from a browser at http://localhost:8500. After making modifications in Consul, the device service needs to be restarted like this:

sudo snap restart edgex-device-mqtt

If you would like to manage your EdgeX instance using a web browser, adding devices, device profiles, as well as visualizing data sent through the export service, you can do this through the EdgeX Web management UI. To install the edgex-ui-go snap run the following:

sudo snap install edgex-ui-go --channel=latest/beta

Now navigate with your browser to http://localhost:4000. The default user credentials are username: admin password:admin. Add your gateway and you’re ready to manage your EdgeX instance through the web UI.

Extending EdgeX

This section gives some hints as to how you can build your hackathon entry by creating or using additional EdgeX services.

App-Service-Configurable

Edgex-App-Service-Configurable – this is a new snap built from the current development release of EdgeX (Fuji). It allows a variety of use cases to be met by simply providing configuration (vs. writing code). For more information about this service, please refer to the README. As with device-mqtt, this service is disabled when first installed, as it requires configuration changes before it can be run. As with the device-mqtt snap, the configuration.toml file is found in the snap’s writable area:

/var/snap/edgex-app-service-configurable/current/config/res/

Profiles

In additional to base configuration.toml in this directory, there are a number of sub-directories that also contain configuration.toml files. These sub-directories are referred to as profiles. The service’s default behavior is to use the configuration.toml file from the /res directory. If you want to use one of the profiles, use the snap set command to instruct the service to read its configuration from one of these sub-directories. For example, to use the push-to-core profile you would run:

$ sudo snap set edgex-app-service-configurable profile=push-to-core

In addition to instructing the service to read a different configuration file, the profile will also be used to name the service when it registers itself to the system.

Note, as this service is based on the latest development release of EdgeX, not all use cases are supported, in particular integration with the EdgeX rules-engine will not work when used in conjunction with the Edinburgh release of EdgeX. Perform the following steps to install the edgex-app-service-configurable application service using the mqtt-export-configuration example and Mosquitto to test:

sudo snap install edgex-app-service-configurable

sudo snap set edgex-app-service-configurable profile=mqtt-export

sudo snap start --enable edgex-app-service-configurable.app-service-configurable

mosquitto_sub -t "edgex-events"

Multiple Instances

Multiple instances of edgex-app-service-configurable can be installed by using snap Parallel Installs. This is an experimental snap feature and must be first be enabled by running this command:

sudo snap set system experimental.parallel-instances=true

Now you can install multiple instances of the edgex-app-service-configurable snap by specifying a unique instance name when you install the snap. The instance name is made of the name of the snap plus a unique suffix which starts with the character “_”. This name only needs to be specified for the second and susbequent instances of the snap.

sudo snap install edgex-app-service-configurable edgex-app-service-configurable_http

or

sudo snap install edgex-app-service-configurable edgex-app-service-configurable_mqtt

Note – you must ensure that any configuration values that might cause conflict between the multiple instances (e.g. port, log file path, …) must be modified before enabling the snap’s service.

New Application or Device Services

Participants can also choose to construct their entry by building new device services (using the device SDKs) or new application services (using the application SDK). As the hackathon is time-boxed, most participants may just build new services natively vs. choosing to create Docker containers and/or snaps. For those interested in creating snaps for their new services, the following services can be useful as templates:

EdgeX Open: Training

By Blog, EdgeX Foundry

What is EdgeX Foundry?

The EdgeX Foundry is a Linux Foundation project with the goal of providing an open and extensible platform for IoT edge computing. As a platform, EdgeX doesn’t try to solve business problems directly, but rather to provide a solid base for such a solution to be built using off the shelf components, provided by the EdgeX Foundry project or 3rd parties, which all interoperate using the same open APIs.

EdgeX is built as a collection of microservices which communicate with each other over a set of standard, open REST APIs. This design gives it a few  distinct advantages over other approaches to edge computing. First, it allows you to run the microservices on different machines, or even on different parts of the network. For example, you can run device controlling services on the devices themselves, with the data collection and processing services on a computer with more storage and CPU capability. This design also means that individual components can be substituted with alternative implementations that fill a specific need, without having to replace or modify any of the other services. Finally, it allows you to add new services that bring in new capabilities. The most common types of services to add into EdgeX are custom Device and Application services.

How EdgeX fits into a smart edge solutions

Every IoT project needs to address the difficulties of connecting multiple, disparate devices together and to controlling software, often over slow or unreliable connections. As such, managing that communication, providing fault tolerance, security, and near-device compute capabilities are a functions any successful IoT project must provide. This common plumbing is precisely what EdgeX Foundry provides.

By using EdgeX components in your solution, you get a mature, tested, stable foundation on which you can build your own value-add products or services.

  • If you are building smart IoT devices, you can use EdgeX to connect to existing cloud offerings or datacenter software without having to build those connections into your device.
  • If you are developing analytics, automation or other kinds of business intelligence software, EdgeX lets you ingest data from devices that speak any number of protocols and use many different data models, without having to build those translations and transformations yourself.
  • If you provide custom deployments, EdgeX gives you an ecosystem of plug-and-play components that you can use to build up complex solutions quickly and reliably.

Running EdgeX in a development environment

You can build the EdgeX Foundry services using the open source code on Github, but more often than now you just need to get these services running so that you can connect your own services to them. To support that, the project publishes Docker images based on the latest stable release of the open source code, as well as docker-compose.yml files that will run all the necessary services together on your development machine.

  1. Install Docker and Docker Compose
  2. Download the latest stable docker-compose.yml file
  3. Run `docker-compose up -d`
  4. Verify that the services are all working with `docker-compose ps`
  5. Test the APIs with http://localhost:48080/api/v1/ping

Once you have the EdgeX services running, you can take our Quick Start guide, or more in-depth API Walkthrough to get a feel for how EdgeX services work together.

Extending EdgeX to hardware with Device Services

In order to connect new devices to your EdgeX instance you will need to use a Device Service. These specialized services are responsible for communicating to devices over their own protocol, sending data from them into the EdgeX core-data service, and taking commands from the EdgeX core-command service and using them to control the device.

The EdgeX Foundry provides reference device services for a number of common IoT and smart device protocols, including MQTTModbus and plain HTTP, and you can use those pre-written services if your device supports those protocols. But if you need something more, the EdgeX Foundry Device SDKs make it easy for you to build a new device service capable of supporting your device.

Using either the Go or C SDKs, you can bootstrap a new Device Service that will already handle all of the setup and configuration for your new service, including uploading your Device Profiles into EdgeX core-metadata, provisioning any devices you have pre-defined, and scheduling automatic readings from your devices. The SDK also provides functions for calling all the common EdgeX APIs in a language-friendly way. All you have to do is add your device-specific connection and control code.

Training Tip: You can do end-to-end testing of your new Device Service by connecting your local EdgeX deployment up to a cloud service or NodeRed instance, and watch the readings flow in and commands go out.

Extending EdgeX to the cloud with Application Services

Since EdgeX Foundry itself doesn’t try to do anything other than efficiently moving data off the edge, you’re eventually going to want to send that data to some software for further processing. To do that, EdgeX provides a couple of ways to publish data to software running either on the edge, in a data center, or the cloud.

The first method is to use the pre-built Export Services, which are capable of sending data as JSON or XML over simple HTTP or MQTT to another service. This is a good option if you are using a service that already knows how to handle these common protocols, and can do any data transformations you need.

But if those aren’t suitable, the EdgeX Foundry also provides an Application Functions SDK for writing custom handlers, which can do anything from publishing data to a remote host, to performing local transformations, analytics and responses right from the edge. The SDK allows you to trigger you application functions whenever data comes into EdgeX, or on-demand, and even provides functions for publishing your data (via HTTP or MQTT) when you’re done handling it locally. Application Functions can even be chained together to build complex pipelines, reusing the same Application Functions in different ways.

Training Tip: You can do end-to-end testing of your new Application Service by connecting the Virtual Device Service to your local EdgeX deployment, which can simulate device data coming in.