Frontend Web
Developer
+ Backend
+ Hardware
+ Other stuff
Slide 6
Slide 6 text
Oxford
Slide 7
Slide 7 text
Oxford, UK
Slide 8
Slide 8 text
No content
Slide 9
Slide 9 text
No content
Slide 10
Slide 10 text
No content
Slide 11
Slide 11 text
Evening meet-ups
Hack days
Slide 12
Slide 12 text
Last month with
Oxford Python, OxRUG,
Codebar, DotNetOxford,
DevOpsOxford, Drupal &
WPOx
Slide 13
Slide 13 text
The Oxford
Mega Super
Meetup Meetup
Slide 14
Slide 14 text
No content
Slide 15
Slide 15 text
HTTP
Slide 16
Slide 16 text
HTTP
kind of sucks
Slide 17
Slide 17 text
HTTP
kind of sucks
(sometimes)
Slide 18
Slide 18 text
Problem 1.
HTTP was designed with
wires in mind
wireless/flaky networks can be challenging
Slide 19
Slide 19 text
Problem 2.
HTTP resources need to
be constantly online
can be a issue for low-power devices
Slide 20
Slide 20 text
Problem 3.
HTTP responses need a
request
getting content to a client can be tricky
Slide 21
Slide 21 text
The problems:
1. Wireless
2. Low energy devices
3. P2P data flow
Slide 22
Slide 22 text
this sounds a bit like the
Internet
of Things
Slide 23
Slide 23 text
1. Many small (movable) devices -
wires become an issue
2. Batteries - constrains compute
resource
3. Things need to be able to talk to
each other
Slide 24
Slide 24 text
Part 1.
A deep dive into IoT networking,
and it can fit with WordPress
Slide 25
Slide 25 text
An example network of
Things
Slide 26
Slide 26 text
No content
Slide 27
Slide 27 text
1. a thing you can
press down
Slide 28
Slide 28 text
No content
Slide 29
Slide 29 text
2. some things that
light up
Slide 30
Slide 30 text
target outcome:
When I press this thing,
these things should turn
red
(wherever they are)
Slide 31
Slide 31 text
Sending a post request to our LED strip?
POST /led-strip HTTP/1.1
Host: benjaminbenben.com
User-Agent: curl/7.51.0
content-type: application/json
Accept: */*
Cache-Control: no-cache
Content-Length: 15
{"color":"red"}
More useful things with this
—Displaying sensor content
—weather sensors
—door opening counters
—whatever you can build
Slide 89
Slide 89 text
More useful things with this
—A device registry
—Smart home
—Sensors in the field
Slide 90
Slide 90 text
~
Slide 91
Slide 91 text
Doing this at home
MQTT brokers
Slide 92
Slide 92 text
No content
Slide 93
Slide 93 text
No content
Slide 94
Slide 94 text
No content
Slide 95
Slide 95 text
No content
Slide 96
Slide 96 text
Doing this at home
Electronics
Slide 97
Slide 97 text
No content
Slide 98
Slide 98 text
Espruino
Slide 99
Slide 99 text
ESP8266
Slide 100
Slide 100 text
Pi Zero W
Slide 101
Slide 101 text
~
Slide 102
Slide 102 text
Part 2.
How can we take
inspiration from the way
we build Things.
Slide 103
Slide 103 text
A Thing
Slide 104
Slide 104 text
A Thing
Is more than the stuff it's
made from
Slide 105
Slide 105 text
A wooden table
A table
Slide 106
Slide 106 text
We build applications
from source code
print 'hello world';
Slide 107
Slide 107 text
Working out what you're
trying to build
Slide 108
Slide 108 text
No content
Slide 109
Slide 109 text
No content
Slide 110
Slide 110 text
Try and work out what
your thing does
Slide 111
Slide 111 text
A Thing
Slide 112
Slide 112 text
A Thing
Is a point of interaction
Slide 113
Slide 113 text
Someone needs to
understand
Slide 114
Slide 114 text
No content
Slide 115
Slide 115 text
No content
Slide 116
Slide 116 text
No content
Slide 117
Slide 117 text
No content
Slide 118
Slide 118 text
No content
Slide 119
Slide 119 text
No content
Slide 120
Slide 120 text
When you build
something
Make sure it's a thing
Slide 121
Slide 121 text
A Thing
Slide 122
Slide 122 text
A Thing
Doesn't have to be simple
(but it can be)
Slide 123
Slide 123 text
No content
Slide 124
Slide 124 text
No content
Slide 125
Slide 125 text
No content
Slide 126
Slide 126 text
No content
Slide 127
Slide 127 text
No content
Slide 128
Slide 128 text
The SR-71 is still just a thing
Slide 129
Slide 129 text
A thing that
flies very fast
& very high up
Slide 130
Slide 130 text
No content
Slide 131
Slide 131 text
No content
Slide 132
Slide 132 text
No content
Slide 133
Slide 133 text
Keep is Simple Stupid
Slide 134
Slide 134 text
Keep is Simple, Stupid
Slide 135
Slide 135 text
Have a clear idea of what
your thing is
Build that thing as simply
as you can
Slide 136
Slide 136 text
For way more about this,
see Skunk Works by
Nickolas Means
Slide 137
Slide 137 text
No content
Slide 138
Slide 138 text
Part 3.
How we can make our
phones into things
Slide 139
Slide 139 text
MQTT over WebSockets
Our device becomes another thing on the network
const mqt = new MQT('test.mosquitto.org:8080')
mqt.subscribe('/sensor/value' (value) =>
document.querySelector('#sensor').textContent = value
)
mqt.publish('/phone/visit', document.location.pathname)
Slide 140
Slide 140 text
bit.ly/ADORB
Slide 141
Slide 141 text
Browsers can do more
than displaying
documents
Slide 142
Slide 142 text
Power
navigator.getBattery()
.then(({value, charging}) => {})