How WSO2 API Manager helps to open the Quby Smart Thermostat and Energy Monitor to developers.
WSO2 Webinar that describes the deployment of the WSO2 API Manager in order to open Quby's APIs to developers
Watch the recording of the WSO2 API Manager webinar here: http://www.yenlo.com/en/web-wso2manager-open-quby
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
How WSO2 API Manager helps to open the Quby Smart Thermostat and Energy Monitor to developers
1. Michiel Fokke, IT Architect, Quby
Nuwan Dias, Technical Lead, WSO2
Rob Blaauboer, Senior Consultant, Yenlo
How WSO2 API Manager helps to
open the Quby Smart Thermostat
and Energy Monitor to developers
August 26th 2015
2. About the presenters
2
Michiel Fokke
IT Architect, Quby
Seasoned IT Architect, Michiel Fokke, specializes in high availability and high security environments. He
prefers to work with open source software and has been working in different roles in telecommunications
and utilities for over 15 years. He’s currently realizing Quby’s international ambitions for their Smart
Thermostat platform.
Nuwan Dias
Technical Lead, WSO2
Nuwan is Technical Lead in the solutions technologies team where he mainly focuses on the WSO2 API
Manager and WSO2 ESB. Nuwan has also participated in numerous WSO2 QuickStart development
consulting engagements. Nuwan is an active contributor of the Apache Synapse and Apache Axis2 projects
and has spoken in various user conferences.
Rob Blaauboer
Senior Consultant, Yenlo
Rob is a Senior Business Consultant and Solution Architect with more than twenty years experience. In
addition to his work he is an active blogger working on a number of articles on the 'Internet of Things' and a
WSO2 'Getting Started with ...' series in which he talks about WSO2 components and their purpose
especially aimed at non technical readers.
3. 3
About Yenlo
• Global enterprise, founded in 2007
with an international focus on
delivering integration solutions based
on Java open source
• #1 in the field of Integration Solutions
• #1 in Managed Services for middleware
environments
• #1 Global Strategic Alliance partner of
WSO2
• WSO2 Product Support
• WSO2 Development
• WSO2 QuickStarts
• WSO2 Training & Certifications
• WSO2 24/7 Managed Services
• WSO2 Events
4. What Yenlo delivers
4
Enterprise Architecture Software Development Managed Services
WSO2 Product Support WSO2 Development Support WSO2 QuickStart
WSO2 Training & Certifications WSO2 Managed Services WSO2 Events
5. Agenda
5
Using the WSO2 API Manager to open the Quby Smart thermostat
• WSO2 API Manager: Features and functions
• An introduction to Toon Smart Thermostat and Energy Meter
• Giving developers controlled and secure access to Toon
7. What is WSO2 API Manager?
WSO2 API Manager (APIM) is a complete solution for creating and
publishing APIs and managing all aspects of their lifecycle.
Using WSO2 APIM, you can
o Create and publish APIs
o Advertise APIs in the storefront
o Version APIs
o Manage the lifecycle
o Monetize API usage
o Implement governance and security
o Facilitate community engagement
o Provide extension points
https://docs.wso2.com/display/AM190/About+API+Manager
9. API Store
o A collaborative Web
interface to
o Self sign up
o Subscribe to
advertised APIs
o Get access token to
invoke APIs
o Invoke APIs
o Engage with the API
community
(commenting/rating)
10. API Publisher
Collaborative Web
interface to
o Create APIs/API
documentation
o Publish and
advertise APIs
o Manage API
lifecycle
o Receive
community
feedback
o Monetize usage
o Analyze statistics
11. API Gateway/Key Manager
o API Gateway
o Based on WSO2 ESB to manage all back-end
functionality such as
o Security/throttling policies
o Security validations
o Scaling API calls
o Caching
o Processing statistical data
o Key Manager
o Part of the Gateway that handles security and access
tokens
12. View API Statistics
Statistical Dashboards
o Understand performance
o Derive trends and insights
o Explore and discover usage patterns
Need to set up WSO2 BAM to collect data, analyze them
and present information in the statistical dashboards.
https://docs.wso2.com/display/AM190/Working+with+Statistics
13. Monetize APIs
o Configure API Manager to view Billing & Metering tab
on the Publisher UI
o Generate API usage summary reports
o Generate bills for API consumers on usage
14. API Publisher
Collaborative Web
interface to
o Create APIs/API
documentation
o Publish and
advertise APIs
o Manage API
lifecycle
o Receive
community
feedback
o Monetize usage
o Analyze statistics
28. Current Architecture
• Unmanaged No visibility on alternative use of API
• Proprietary login need for (encrypted) storage of
selfcare password on device
• Undocumented & unsupported API
30. Business Objectives
• Stimulate innovation by offering Open API
• Build ecosystem with 3rd parties
• Enhance control on access
• Enhance security
31. Solution Selection Criteria
• Off the shelf product
• Support for OAUTH2
• Developer selfcare
• Extensibility
• Open source
• Affordable support
• Nice to have: documentation portal
32. Solution candidates considered
• MuleSoft
• WSO2
Pro’s for WSO2:
• Fully Open Source
• Clear pricing model for support and development
33. Open API solution design
Backend
Applications
Access Layer
Asset
ManagementInternet
Internet
Energy Displays
Mobile devices
VPN
concentrator
Utility Backend
WSO2
API Manager
Self care
Authentication
Service
Mobile
Backend
35. Implementation Experiences
• Stable software and easy to deploy
• Bundling of components into product confusing at first
• Elaborate documentation, but still insufficient to
develop plugin successfully (dev support solved that)
• Solution quite complete, but lacks portal functionality
to withdraw access tokens by end-users
43. Winner: Who pays Watt?
• Cost sharing app for students
• Using smart plug usage data
https://youtu.be/HjufeirKJiI
44. What are the next steps?
Now deploying or will deploy) a number of WSO2
products:
• API Manager 1.9.0
• Identity Server 5.0
• Business Activity Monitor 2.50
Thinking about developer community management
HA Setup for production
Migrate own apps to new API
Start using API manager for internal API usage too
45. Architectural overview
Mobile devices
API Gateway
Self care
Authentication
Service
Mobile
Backend
Key managerAPI Store
API Publisher
Identity
Server
Business
Activity
Monitor
Reporting
46. What APIs are going to be developed?
Status API
Get Toon Status
Thermostat API
Get Thermostat Program
Update Temperature
Update Thermostat Heating
Program
Update Device Status
Update Scenario
Update Thermostat Program
Update Temperature for
Thermostat Program Setting
Toon Coach API
• Log Event
RRD API
• Get Electricity Graph Data
• Get Electricity Flow Data
• Get Gas Graph Data
• Get Gas Flow Data
• Get District Heat Graph Data
• Get Solar Graph Data
• Get Solar Flow Data
• Get Solar Production and Delivered
to the Grid
• Get Smartplug Graph Data
• Get Smartplug Flow Data
47. Status API
Context
/statuses
Get Toon Status
Resource:
/toons
HTTP Verb Mapping
GET
Response can contain from one to eight datasets. Empty variables are not
included in message. If only thermostat information has been updated:
{
"success": true,
"thermostatInfo": {
"currentTemp": 2170,
"currentSetpoint": 1200,
"currentDisplayTemp": 2150,
"programState": 2,
"activeState": 3,
"nextProgram": 1,
"nextState": 0,
"nextTime": 1345478400,
"nextSetpoint": 2000,
"randomConfigId": 1804289383,
"errorFound": 255,
"zwaveOthermConnected": 0,
"burnerInfo": "0",
"otCommError": "0",
"i2CError": "0"
}
}
Request
GET http://<API_MANAGER_GATEWAY>:8400/apis/statuses/v1/toons
Required Request Headers
Authorization: Bearer <ACCESS_TOKEN_VALUE>
48. Internal
DMZ
Overview deployment of API Manager
Gateway
Key
manager
Publisher
BAM
Load
balancer
Gateway
MySQL
(cluster)
Key
Manager
Cassandra
(cluster)
https
http
passive node
Store
Load
balancer