Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
LINE Things - Connecting the Unconnectable
Search
LINE Developers
PRO
June 04, 2019
Technology
0
180
LINE Things - Connecting the Unconnectable
LINE Thailand Developer Conference 2019
https://www.facebook.com/events/410021356453349/
LINE Developers
PRO
June 04, 2019
Tweet
Share
More Decks by LINE Developers
See All by LINE Developers
LINEスタンプのSREing事例集:大きなスパイクアクセスを捌くためのSREing
line_developers
PRO
1
1.4k
Java 21 Overview
line_developers
PRO
6
800
Code Review Challenge: An example of a solution
line_developers
PRO
1
830
KARTEのAPIサーバ化
line_developers
PRO
1
370
著作権とは何か?〜初歩的概念から権利利用法、侵害要件まで
line_developers
PRO
5
1.8k
生成AIと著作権 〜生成AIによって生じる著作権関連の課題と対処
line_developers
PRO
3
1.7k
マイクロサービスにおけるBFFアーキテクチャでのモジュラモノリスの導入
line_developers
PRO
9
2.4k
A/B Testing at LINE NEWS
line_developers
PRO
2
630
LINEのサポートバージョンの考え方
line_developers
PRO
2
790
Other Decks in Technology
See All in Technology
Python と Snowflake はズッ友だょ!~ Snowflake の Python 関連機能をふりかえる ~
__allllllllez__
1
120
今年のRubyKaigiはProfiler Year🤘
osyoyu
0
110
FrontDoorとWebAppsを組み合わせた際のリダイレクト処理の注意点
kenichirokimura
1
520
エンジニア候補者向け資料2024.04.24.pdf
macloud
0
3.3k
Delivering Millions of Messages within seconds @ Duolingo
pelelgrino
0
350
Reducing Cross-Zone Egress at Spotify with Custom gRPC Load Balancing Recap
koh_naga
0
210
反実仮想機械学習とは何か
usaito
PRO
11
4.6k
GraphQL 成熟度モデルの紹介と、プロダクトに当てはめた事例 / GraphQL maturity model
mh4gf
7
1.3k
MapLibreとAmazon Location Service
dayjournal
1
160
MySQL の SQL クエリチューニングの要所を掴む勉強会
andpad
3
6.4k
プロトタイピングによる不確実性の低減 / Reducing Uncertainty through Prototyping
ohbarye
5
390
開発生産性大幅アップ!Postman VS Code拡張機能
nagix
2
380
Featured
See All Featured
Distributed Sagas: A Protocol for Coordinating Microservices
caitiem20
322
20k
Documentation Writing (for coders)
carmenintech
60
3.9k
A Modern Web Designer's Workflow
chriscoyier
689
190k
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
17
1.4k
Making Projects Easy
brettharned
108
5.5k
RailsConf 2023
tenderlove
4
540
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
244
20k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
501
140k
Learning to Love Humans: Emotional Interface Design
aarron
267
39k
Product Roadmaps are Hard
iamctodd
44
9.7k
Statistics for Hackers
jakevdp
789
220k
A Philosophy of Restraint
colly
197
16k
Transcript
UKRIT PONGSATHAPORN Lead Hardware Engineer LINE THAILAND LINE THINGS CONNECTING
THE UNCONNECTABLE
A brief look at previous IoT solutions What you can
do right now Something New ? LINE THINGS History Developer Trial ???
HISTORY
Messaging API
LINE Messaging API IoT Use Case IoT device LINE server
Device directly connects with a third party web Messaging API Your server
LINE BEACON
LINE Beacon LINE LINE server Your server LINE BEACON Messaging
API
FEATURES Relative location of the user to the beacon Segment
and specify only users that are near your designated area Provide a more relevant and useful service Location Segmentation Relation
GOING FURTHER Two-way communication Data can be sent and received
Support for almost all BLE devices Seamless integration for users. Out of sight, out of mind. Bi-directional Full Support Seamless
A universal platform for IoT devices
None
WHAT IS LINE THINGS ? A n I o T
p l atfo r m w i t h i n L I N E ’s ecosystem, open to everyone A bridge to connect users, devices, and services Universal hub for your IoT devices and online services Open IoT Platform Bridge to Connect Universal Hub
LINE THINGS LINE LINE server Device Messaging API LIFF BLE
Your server LIFF app
CONNECTION PROCESS Device Scanning Connect Advertising
DEVICE LINK LIFF BLE
HOW DOES LIFF BLE WORK ? LINE LIFF SDK (BLE
plugin) BLE native component Device LIFF app
function initializeApp() { liff.init(() => initializeLiff(), error => uiStatusError(makeErrorMsg(error), false));
} function initializeLiff() { liff.initPlugins(['bluetooth']).then(() => { liffCheckAvailabilityAndDo(() => liffRequestDevice()); }).catch(error => { uiStatusError(makeErrorMsg(error), false); }) } IMPLEMENTATION
function initializeApp() { liff.init(() => initializeLiff(), error => uiStatusError(makeErrorMsg(error), false));
} function initializeLiff() { liff.initPlugins(['bluetooth']).then(() => { liffCheckAvailabilityAndDo(() => liffRequestDevice()); }).catch(error => { uiStatusError(makeErrorMsg(error), false); }) } IMPLEMENTATION
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); characteristic.addEventListener('characteristicvaluechanged', (e) => { console.log('value changed to:' + e.target.value); }); await characteristic.startNotifications(); IMPLEMENTATION
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue(); CONNECTION PROCESS
Characteristic: Read Characteristic: Read Characteristic: Write Characteristic: Notify Characteristic: Read
Characteristic: Write Characteristic: Notify BLUETOOTH STACK Service:LINE Things Trial Service:Custom1 Service:Custom2
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue(); DATA ACCESS
Device Read Device Write Device Notify DATA ACCESS LINE app
LINE app LINE app
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); const value = await characteristic.readValue(); READ
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); await characteristic.writeValue( new TextEncoder('utf-8').encode('LIFF BLE') ) WRITE
const device = await liff.bluetooth.requestDevice(); const gatt = await device.gatt.connect();
const service = await gatt.getPrimaryService( 'E625601E-9E55-4597-A598-76018A0D293D' ); const characteristic = await service.getCharacteristic( '26E2B12B-85F0-4F3F-9FDD-91D114270E6E' ); characteristic.addEventListener('characteristicvaluechanged', (e) => { console.log('value changed to:' + e.target.value); }); await characteristic.startNotifications(); NOTIFY
LINE THINGS DEVELOPER TRIAL
REQUIREMENTS Create a LINE Things-compatible device Add LIFF app to
your channel Create a Channel Create a LIFF app for LINE Things Create a Provider Register a Product 1 2 3 4 5 6
REGISTER YOUR PRODUCT curl -X POST https://api.line.me/things/v1/trial/products \ -H 'Authorization:
Bearer {channel access token}' \ -H 'Content-Type:application/json' \ -d '{ "name": "{trial product name}", "liffId": "{LIFF APP ID}" }'
{ "id": {productId}, "name": "{trial product name}", "type": "BLE", "channelId":
{channelId}, "actionUri": "{LIFF APP URL}", "serviceUuid": "{serviceUuid}", "psdiServiceUuid": "{psdiServiceUuid}", "psdiCharacteristicUuid": "{psdiCharacteristicUuid}" }
LINE THINGS STARTER DEMONSTRATION
AUTOMATIC COMMUNICATION ???
Seamless experience of LINE Things, does not require user interaction
Devices with great services all connected through LINE Setting up is as easy as 1-2-3 Seamless Intuitive Super Simple FEATURES
LINE THINGS LINE LINE server LINE Things Device Messaging API
Returns execution results Your server Executes a scenario set
REGISTERING A SCENARIO SET { "autoClose": false, "suppressionInterval": 0, "scenarios":
[ { "trigger": { "type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] }
{ "autoClose": false, "suppressionInterval": 0, "scenarios": [ { "trigger": {
"type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] } SCENARIO SET
{ "autoClose": false, "suppressionInterval": 0, "scenarios": [ { "trigger": {
"type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] } SCENARIO SET
{ "autoClose": false, "suppressionInterval": 0, "scenarios": [ { "trigger": {
"type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] } SCENARIO SET
{ "autoClose": false, "suppressionInterval": 0, "scenarios": [ { "trigger": {
"type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] } SCENARIO SET
{ "autoClose": false, "suppressionInterval": 0, "scenarios": [ { "trigger": {
"type": "BLE_NOTIFICATION", "serviceUuid": "<YOUR SERVICE UUID>", "characteristicUuid": "62FBD229-6EDD-4D1A-B554- 5C4E1BB29169" }, "actions": [] } ] } SCENARIO SET
{ "events": [ { "type": "things", "replyToken": "7219516709304f028ddf1540d6953518", "source": {
"userId": "u11111111111111111111111111111111", "type": "user" }, "timestamp": 1558610209312, "things": { "deviceId": "t016ae2ae6b5d3fabed4cd0700cf16612", "result": { "scenarioId": "01DBG55W4AQX75G66X83QX46ZY", "revision": 2, "startTime": 1558610206362, Webhook Event
AUTOMATIC COMMUNICATION DEMONSTRATION
HANDS-ON-ATHON LINE THAILAND LINE Developers Thailand ONE MORE THING...
THANK_YOU