20
4/6/2015 SIDA 1 Centre for Energy Efficiency in Sweden with leading companies, entrepreneurs and scientists Fosdem 2015 XMPP-IoT.org XMPP an open scalable IoT infrastructure. @joachimlindborg SUST.SE, LSYS.SE

Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

Embed Size (px)

Citation preview

Page 1: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1

Centre for Energy Efficiency in Sweden

with leading companies, entrepreneurs and scientists

Fosdem 2015 XMPP-IoT.org

XMPP an open scalable IoT infrastructure.

@joachimlindborg SUST.SE, LSYS.SE

Page 2: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 33

To bridge the valley of death for new technology regarding energyefficiency

Page 3: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 442015-04-06

1951: “The house controlled through phone pads“.

A phone switchboard act as the message board, 2 digit adressing, uniform relay messaging

Planning for a wireless connection for the garage door courtesy to Carl Olov Elmsjö

Page 4: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 55

IoT today

Move data to a server and make it useful there.

Page 5: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 6

The problem: How can any thing work together?

API API API API APIAPI

API API

Especially if there is a business model?

Page 6: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 8

We need an open messaging layer to share information

API API API API APIAPI

API API

No more api of api layering

Page 7: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 99

XMPP Federated messaging network • Many Servers, Clients

• Android, iOS, Cordova

• Combine server with any client

• Federation between servers

• Scalable for Millions of users

• Running for years

• Publish Subscribe

• Anonymity

• SECURITY fokused

grandma

@old.co

m

oldfriend

@me.com

Java, smackPython, SleekXMPP Plain C,

Page 8: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1010

Frienship • Double agreement

• Between any [email protected]

• Only between federated domains

[email protected]

FriendRequest

Agree

FriendRequest

Agree

Page 9: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1111

Provisioning parent • Friend management

• Authorization

• Node

• Field

• Value?

[email protected]

OK?

grandma@ol

d.com

Page 10: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 12

Creating services across business borders.

Utility

Health

Heat

Alarm

House

Page 11: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 13

A thing in one domain sends messages to a friend in another domain

[email protected]

[email protected]

[email protected]

[email protected]

[email protected]

Page 12: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 14

SECURITY

• Client to sever encryption

• Server to server encryption

• End to End encryption

• Authentication

• Authorization, Node, field

• Discovery, take ownership

Page 13: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1515

Demo

SwedenFosdem

XMPP network

HouseRaspberryMe Relays Hue

Page 14: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1616

The Demo

SwedenFosdem

XMPP network

HouseRaspberryMe Relays Hue

[email protected]

[email protected]

[email protected]

Page 15: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1717

The standard http//xmpp.org/extensions

http://wiki.xmpp.org/

http://xmpp-iot.orgRead a value, Xep 323

Write a value, Xep 323

Provisioning, Xep 324

Concentrator, Xep 326

Page 16: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1818

The standard Xep 323 • Readout data from

device

• Need to be friends

• More granularity on

security

• Can be big readouts

• Who to read what

Alarm Power

XMPP

federated

transportXMPP server

Verisure.seXMPP server

Maingate.se

Ext APIExt API

Page 17: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 1919

Xep 323 Read xml<iq type='get'

from='[email protected]/amr'

to='[email protected]'

id='1'>

<req xmlns='urn:xmpp:sn' seqnr='1' momentary='true'/>

</iq>

<iq type='result'

from='[email protected]'

to='[email protected]/amr’ id='1'>

<accepted xmlns='urn:xmpp:sn' seqnr='1'/>

</iq>

<message from='[email protected]'

to='[email protected]/amr'>

<fields xmlns='urn:xmpp:sn' seqnr='1' done='true'>

<node nodeId='Device01'>

<timestamp value='2013-03-07T16:24:30'>

<numeric name='Temperature' momentary='true' automaticReadout='true' value='23.4' unit=’C'/>

</timestamp>

</node>

</fields>

</message>

Page 18: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 2020

Xep 325 Write a value

<iq type='set'

from='[email protected]/amr'

to='[email protected]'

id='1'>

<set xmlns='urn:xmpp:sn:control' xml:lang='en'>

<boolean name='Output' value='true'/>

</set>

<iq type='result'

from='[email protected]'

to='[email protected]/amr'

id='1'>

<setResponse xmlns='urn:xmpp:sn:control' responseCode='OK'/>

</iq>

Page 19: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 2121

The Big question nobody asked

BUT it’s XML !!???

• XEP 322 http://xmpp.org/extensions/xep-0322.html

• W3C binary compression EXI http://www.w3.org/TR/exi/

• Very efficient

• Small devices can do binary stanzas without building xml only C

stubs

• And still valid XML

Page 20: Fosdem IoT devroom, 2015, open scalable IoT systems with XMPP

4/6/2015 SIDA 22

About Joachim Lindborg•Currently CTO of sust.se, I'm a technology enthusiast that believe that IoT is really about human interaction with systems adding value to life and that closed systems will die in favor for open one.

•For the past 15 years I have been working with system integration, especially at the intersection of energy and IT. I was one of the founders of homesolutions.se a start-up company integrating systems for supervision and maintenance of buildings.

•In the IT boom during the late 1990s I was employed by the swedish Utility Vattenfall to develop solutions for the smart home. It was an exciting time but it ended in disappointment. Now we are back again and with Internet of Things and a more stable technology I do believe that this time we will succeed. Right now I am working with companies in home security, heating and air conditioning, with energy companies and service developers in a project integrating all these technologies with sound business models for smart home services for energy control and efficiency.

Email: [email protected]

Linkedin: se.linkedin.com/in/joachimlindborg/