Samsung IoT Academy Malaysia

Menu

IoT: WordPress REST API are able to talk to Devices

When you start to consider the implications of a globally connected world on the device level, it quickly becomes obvious that the WordPress REST API is arriving into core at just the right time (it has been merged into WordPress 4.4, which is due out on 8 December  2015).

The WordPress REST API makes IoT integration substantially easier.

With billions of devices out in the wild chatting away to each other, the future of the web is obviously going to be heavily dependent on having clear protocols and open APIs available to facilitate that communication – which is exactly what the REST API is designed to do.

The standard range of endpoints it enables gives you access to pretty much everything in WordPress core. You’ve also got the option of defining your own endpoints for custom use cases. If you’re brand new to this area, Daniel Pataki put together a great overview of getting up and running with the REST API here on the blog recently that’s well worth a read.

Having a fully-fledged API defined for WordPress means there is an established route available for external devices to communicate directly with WordPress and vice versa. The potential range of applications here is dazzling, but all of them rest on this clear data in/data out pathway being available for use.

Let’s take two hypothetical examples:

  • Push notifications: The owner of a WooCommerce-enabled store wants to boost morale every time a sale is made. A little tinkering with the WooCommerce API and littleBits enables him to ring a real-world sales bell in the office every time a sale is made. Check out Scott Evans’ lightning talk at WordCamp London and his Sparky plugin for tips on how you could mock this up.
  • Data aggregation and display: A health-conscious blogger is reveling in using his new Apple Watch to track various exercise movement metrics. He rigs up WordPress to talk directly with Apple’sHealthkit and he’s able to seamlessly integrate his own personal health data into any aspect of his WordPress environment.

Our two hypothetical examples are limited in scope but, as the possibilities of the REST API begin to be truly explored by WordPress developers, the potential for integration with IoT devices is likely to be bound only by our imaginations down the line.

The plugin ecosystem and REST API push our creative limits for what we can imagine building with WordPress – and it’s time we looked at powering physical devices using open source platforms like LittleBits and Arduino. This talk will examine use cases and methods for building real-time physical displays powered by WordPress.

For an excellent current snapshot of how WordPress is positioned to benefit from the possibilities IoT opens up, check out Thomas Puig’s WordPress and the Internet of Things presentation below and  download the Presentation Slides »

Hopefully the scale of the opportunity potentially on offer here is starting to become clear by now.

Let’s move on to a quick look at existing external APIs, products and services that you can use to communicate directly with internet-enabled devices from within WordPress.

Integrating WordPress with Third-Party Devices

It’s still relatively early days in IoT, so there is as yet no universally implementable way of connecting to any and all devices. Direct IoT integration with WordPress to date has been somewhat limited with early projects such as the Nike+ plugin and Google Glass plugin withering on the digital vine.

Expect all of that to change soon, however, as the number of solid third-party systems you can easily use to integrate with either existing or brand new IoT devices continues to grow. Here’s a quick list of three likely candidates for your own projects.

littleBits

If you’re going down the maker route in terms of creating your own IoT devices, littleBits is going to be a particularly interesting option to explore. It’s a platform of easy-to-use electronic building blocks that enable you to create your own devices from scratch and connect them to the wider world via the littleBits API or through IFTTT.

A littleBits WordPress plugin is also available to make connecting WordPress and littleBits even simpler. It’s the brainchild of RC Lations, whose WordPress.tv talks are also worth consulting on the topic of IoT and WordPress.

Source: wpmudev.org

Categories:   News

Comments

Welcome to Live Support.