More Related Content Similar to Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 2019 (20) More from Cisco DevNet (15) Webex Devices xAPI - DEVNET_2071 - Cisco Live - San Diego 20191. #CLUS
Stève Sfartz – API Architect
DEVNET-2071
Integrated, Automated
Meetings Rooms with
xAPIs and Macros
2. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
/Cisco/DevNet/SteveSfartz
• API Architect at Cisco DevNet
• Working to deliver the greatest Developer
Experience for the DevNet community
• Webex Teams & Devices API
• Contributor to DevNet CodeExchange
• code samples, developer tools, postman collections,
awesome-webex, awesome-xapi…
“vision without
execution is
hallucination”
mailto: stsfartz@cisco.com
github: ObjectIsAdvantag
twitter: @SteveSfartz
DEVNET-2071 2
3. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Agenda
• CE programmability - xAPI
• Programming with ssh, http, websocket and the
‘jsxapi’ module
• Embedding code as JavaScript Macros
• Creating custom interface with In-Room Controls
• Latest CE features
• Roadmap
DEVNET-2071 3
4. Questions?
Use Cisco Webex Teams to chat
with the speaker after the session
Find this session in the Cisco Live Mobile App
Click “Join the Discussion”
Install Webex Teams or go directly to the team space
Enter messages/questions in the team space
How
Webex Teams will be moderated
by the speaker until June 16, 2019.
1
2
3
4
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco Webex Teams
cs.co/ciscolivebot#DEVNET-2071
4
5. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
https://projectworkplace.cisco.com
DEVNET-2071 5
6. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
7 participants, video call & presentation in progress
DEVNET-2071 6
7. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
In-Room Controls & Macros
DEVNET-2071 7
8. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Hue Controls
8DEVNET-2071
172.17.101.71 172.17.101.69
10. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Hue Controls
https://github.com/ObjectIsAdvantag
/xapi-samples/tree/master/controls/hue
10DEVNET-2071
Macro
Command
Event
In-Room Control
HTTP Put
11. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco Collaboration Devices Programmability
11DEVNET-2071
configure
events
macros
status
command
12. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco Collaboration Devices Programmability
Available on all devices running CE & RoomOS
12DEVNET-2071
13. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xAPI reference
13DEVNET-2071
14. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xAPI reference
14DEVNET-2071
15. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xAPI reference
15DEVNET-2071
16. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xstatus RoomAnalytics PeopleCount
*s RoomAnalytics PeopleCount Current: 3
PeopleCount (status)
• from t-shell
16DEVNET-2071
demo
17. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xstatus RoomAnalytics PeopleCount
*s RoomAnalytics PeopleCount Current: 3
PeopleCount (status)
• from t-shell
• from code
17DEVNET-2071
18. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
PeopleCount (event)
• from t-shell
• from code
18DEVNET-2071
xfeedback register /Status/RoomAnalytics/PeopleCount
*s RoomAnalytics PeopleCount Current: 3
*s RoomAnalytics PeopleCount Current: 4
demo
19. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Dial (command)
• from t-shell
• from code
19DEVNET-2071
xcommand Dial Number: stsfartz@cisco.com
*r DialResult CallId: 2
*r DialResult ConferenceId: 1
20. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Dial (command)
20DEVNET-2071
demo
21. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
21DEVNET-2071
configure
events
status
command
23. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
macros
Embedded
custom JavaScript
DEVNET-2071 23
24. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Launch the Macro Editor
https://10.10.20.17X/web
DEVNET-2071 24
25. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Listening with a Macro
DEVNET-2071 25
26. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE Macro Editor
1
2
3
4
DEVNET-2071 26
27. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xAPI JavaScript Macros
• Duktape JavaScript runtime (version 2.2+) with Babel
• babel-preset-latest’ is specified to support latest ES6+ features
• async/await is supported
• CE & RoomOS devices (but SX10)
• Maximum number of macros
• Executes as ‘admin’ role
• Macro tutorial accessible from the codec
• http://<ip-address>/static/docs/macro-tutorial.pdf
DEVNET-2071 27
28. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Hue Controls
https://github.com/ObjectIsAdvantag
/xapi-samples/tree/master/controls/hue
28DEVNET-2071
Macro
Command EventHTTP Put
29. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Changing Color of a Philips Hue bulb
29DEVNET-2071
http://172.17.201.69/api/SECRET/lights/4/state
{ "hue": 25500 }
200 OK
[ { "success": { "/lights/4/state/hue": 25500 } } ]
PUT
Hue bridge IP light numberHue user
color
demo
30. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 30DEVNET-2071
31. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Changing Color of a Philips Hue bulb
31DEVNET-2071
32. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
HttpClient with response body
32DEVNET-2071
demo
33. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
HttpClient command
• Available starting with CE 9.6+
• Support for HTTP POST and PUT
• HTTP response status only
• Configure
• Coming (in EFT)
• Support for GET, DELETE, PATCH
• HTTP response Body and Headers
33DEVNET-2071
xConfiguration HttpClient Mode: On
xConfiguration HttpClient AllowInsecureHTTPS: True
34. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
HttpClient command
34DEVNET-2071
demo
36. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS DEVNET-2071 36
37. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS DEVNET-2071 37
38. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
In-Room Control editor
38DEVNET-2071
39. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Launch the In-Room Control Editor
https://10.10.20.17X/web
1
2
DEVNET-2071 39
41. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Listening to User Interface events
41DEVNET-2071
42. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Controlling the lights
42DEVNET-2071
demo
43. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
DEVWKS-2074 workshop
• Connect to a RoomKit from the DevNet Sandbox
• Build and deploy a custom In-Room Control (CE 9.2.1+)
• Create and run JavaScript Macros (CE 9.2.1+)
• Learn the HttpClient POST command (comes with CE 9.6.1)
DEVNET-2071 43
Wednesday 5PM
44. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Connecting the dots: PeopleCount to Color
44DEVNET-2071
demo
46. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
46DEVNET-2071
configure
events
status
command
macros
protocols
serial port
ssh
HTTP
WebSocket
formats
text
XML
JSON
47. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Terminal Mode: t-shell
47DEVNET-2071
serial port
ssh
HTTP
WebSocket
text
XML
JSON
48. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Terminal Mode: t-shell
48DEVNET-2071
serial port
ssh
HTTP
WebSocket
text
XML
JSON
49. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
49DEVNET-2071
macros serial port
ssh
HTTP
WebSocket
text
XML
JSON
50. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
HTTP
50DEVNET-2071
serial port
ssh
HTTP
WebSocket
text
XML
JSON
demo
52. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Node.js ‘jsxapi’ module
• Run code on your own server
• same runtime as the Macros
• MIT License, available on npm, Github & CodeExchange
• https://github.com/cisco-ce/jsxapi
• Connect to the codec via ‘ssh’ or ‘websocket’
• Use cases
• import existing Node.js libraries (‘require() npm modules)
• debug macros
52DEVNET-2071
53. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 53DEVNET-2071
demo
54. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
https://github.com/cisco-ce/jsxapi
54DEVNET-2071
serial port
ssh
HTTP
WebSocket
text
XML
JSON
jsxapi
Node.js application
Events, Status,
Configuration, Commands
55. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE & RoomOS Programmability (xAPI)
https://github.com/cisco-ce/pyxows
55DEVNET-2071
serial port
ssh
HTTP
WebSocket
text
XML
JSON
pyxows
Python application
Events, Status,
Configuration, Commands
57. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Webex Room Kit
https://projectworkplace.cisco.com/#/en-us/product/webexroomkit/0/0
DEVNET-2071 57
58. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
CE devices are API-native
https://<device-ip>/config/NetworkServices
58DEVNET-2071
59. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
https://admin.webex.com
DEVNET-2071 59
60. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Admin UI for cloud-registered Webex Devices
https://admin.webex.com/devices
DEVNET-2071 60
61. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
REQUIREMENT: local connectivity to the device
61DEVNET-2071
https://<device-ip>/cloud-loginhttps://admin.webex.com/devices
62. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Adding user roles to access your device
https://<device-ip>/web/localusers
• Create a local user: ‘control’, ‘integrator’ or ‘admin’ role
DEVNET-2071 62
63. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
User Roles
https://collaborationhelp.cisco.com/article/en-us/jkhs20
Admin Have unrestricted access to the device's local web interface.
Access the API over SSH, serial connection, or HTTP(S).
Create and manage users with the Integrator and RoomControl roles.
Integrator Access the device’s local web interface. Integrator has the same access as
an Admin user, except creation of new users.
Access the API over SSH, serial connection, or HTTP(S).
RoomControl Access the In-Room Control editor and corresponding development tools
on the web interface, to create touch interface extensions (in-room
controls).
Access the API commands that are required to create touch interface
extensions.
User Make calls and search the People lists.
Modify a few settings, for example adjust the ringtone volume and set the
time and date format.
DEVNET-2071 63
64. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
https://developer.cisco.com/site/sandbox/
DEVNET-2071 64
65. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Build with the RoomKit Sandboxes
DEVNET-2071 65
66. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
In-Room Simulator
https://controls-editor.herokuapp.com/playground.html?virtualroom
End-to-end enriched
User Experience for
Meeting Rooms
• In-Room Control
• Node.js jsxapi
DEVNET-2071 66
68. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco Collaboration Devices Programmability
Available on all devices running CE
68DEVNET-2071
69. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cisco Collaboration Devices Programmability
69DEVNET-2071
configure
events
macros
status
command
70. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
• Admin role and Macros for cloud-registered devices
• Events for 3rd-Party USB Input Devices (keyboards)
• POST/PUT with HTTP response status code (more coming)
• xAPI over WebSockets
• Ambient Noise reporting in Room Analytics (dBa)
• Hide Default Buttons (Call, Share, Settings)
• Video Mute APIs
New API Additions (over last 6 months)
DEVNET-2071 70
71. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Webex Boards: catching up
• xAPI support: since RoomOS migration (jan19)
• WebSocket support (same GA as other devices apr19)
• Macros support (may19)
• Coming
• In-Room Controls support
71DEVNET-2071
72. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Cloud APIs for Webex Devices
• Manage your devices (device info, status, activation codes)
• /devices
• /places
• Wrapper for status and commands
• /xapi
72DEVNET-2071
74. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Webex Devices sessions at CLUS 2019
• Monday 4PM – Workshop 1 - DEVWKS-2074
• Create custom In-Room Controls and Macros for CE & Webex Devices
• Tuesday 5PM – Theater - DEVNET-1462
• Exposing the power of the Webex Devices platform with APIs
• Wednesday 11AM – Theater – DEVNET-2071
• Integrated, Automated Meetings Rooms with CE xAPI and Macros
• Wednesday 5PM – Workshop 1 - DEVWKS-2074
• Create custom In-Room Controls and Macros for CE & Webex Devices
• Thursday 1PM – Theater – DEVNET-2610
• Webex APIs for Administration and Serviceability
74DEVNET-2071
75. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS 75DEVNET-2071
76. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Interactive Live Map
https://github.com/ObjectIsAdvantag/roomkit-react-map
Interactive map showing
PeopleCount analytics
from a set of Room Kits
• React
• Node.js
• ‘jsxapi’
DEVNET-2071 76
77. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Maze Game
https://github.com/ObjectIsAdvantag/xapi-samples/tree/master/controls/maze-scores
End-to-end enriched
User Experience for
Meeting Rooms
• In-Room Control
• macro
DEVNET-2071 77
78. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Ultrasound
https://github.com/ObjectIsAdvantag/xapi-samples/tree/master/controls/ultrasound
Give users control to your
devices’ Ultrasound
MaxVolume
• In-Room Control
• Macro-compatible
custom message pushed to your
devices’ Touch10/DX interface
as pairing is enabled / disabled.
DEVNET-2071 78
79. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Agenda with notifications
https://github.com/ObjectIsAdvantag/xapi-samples/tree/master/controls/agenda_push
Pushes session details to
a Webex Teams space
• In-Room Control
• Javascript Macro
• HttpClient command
• Webex Bot account
DEVNET-2071 79
80. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
xAPI module at DevNet
https://developer.cisco.com/learning/modules/xapi-intro
DEVNET-2071 80
81. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Technical Resources
• Dev Center
• https://developer.cisco.com/roomdevices
• xAPI learning module
• https://learninglabs.cisco.com/modules/xapi-intro
• ‘xAPI devs’ community space
• http://bit.ly/join-xapi-devs
• awesome-xapi: curated list of developer resources
• code samples, sandboxes, labs…
• https://github.com/CiscoDevNet/awesome-xapi
• xAPI samples
• https://github.com/ObjectIsAdvantag/xapi-samples
81DEVNET-2071
82. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Specialist LevelAssociate Level Professional Level Expert Level
Network
Infrastructure
Software
For specific questions, ask for the Cisco Certification SME in the Meet the Developer area!
Future
Offering
Learn more about the Evolution of Cisco Certifications
Questions? Join us for one of the hourly sessions
offered in the Certifications & Training area!
Read more: developer.cisco.com/certification
82
83. Complete your
online session
evaluation
• Please complete your session survey
after each session. Your feedback
is very important.
• Complete a minimum of 4 session
surveys and the Overall Conference
survey (starting on Thursday) to
receive your Cisco Live water bottle.
• All surveys can be taken in the Cisco Live
Mobile App or by logging in to the Session
Catalog on ciscolive.cisco.com/us.
Cisco Live sessions will be available for viewing
on demand after the event at ciscolive.cisco.com.
© 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS DEVNET-2071 83
84. © 2019 Cisco and/or its affiliates. All rights reserved. Cisco Public#CLUS
Continue your education
Related sessions
Walk-in
self-paced labs
Demos in the
Cisco campus
Meet the engineer
1:1 meetings
DEVNET-2071 84