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
June 04, 2019
Technology
0
200
LINE Things - Connecting the Unconnectable
LINE Thailand Developer Conference 2019
https://www.facebook.com/events/410021356453349/
LINE Developers
June 04, 2019
Tweet
Share
More Decks by LINE Developers
See All by LINE Developers
LINEスタンプのSREing事例集:大きなスパイクアクセスを捌くためのSREing
line_developers
1
2.3k
Java 21 Overview
line_developers
6
1.2k
Code Review Challenge: An example of a solution
line_developers
1
1.3k
KARTEのAPIサーバ化
line_developers
1
530
著作権とは何か?〜初歩的概念から権利利用法、侵害要件まで
line_developers
5
2.1k
生成AIと著作権 〜生成AIによって生じる著作権関連の課題と対処
line_developers
3
2.1k
マイクロサービスにおけるBFFアーキテクチャでのモジュラモノリスの導入
line_developers
9
3.5k
A/B Testing at LINE NEWS
line_developers
3
970
LINEのサポートバージョンの考え方
line_developers
2
1.3k
Other Decks in Technology
See All in Technology
250627 関西Ruby会議08 前夜祭 RejectKaigi「DJ on Ruby Ver.0.1」
msykd
PRO
2
270
登壇ネタの見つけ方 / How to find talk topics
pinkumohikan
5
440
Node-REDのFunctionノードでMCPサーバーの実装を試してみた / Node-RED × MCP 勉強会 vol.1
you
PRO
0
110
プロダクトエンジニアリング組織への歩み、その現在地 / Our journey to becoming a product engineering organization
hiro_torii
0
130
~宇宙最速~2025年AWS Summit レポート
satodesu
1
1.8k
AIのAIによるAIのための出力評価と改善
chocoyama
2
550
解析の定理証明実践@Lean 4
dec9ue
0
180
Agentic Workflowという選択肢を考える
tkikuchi1002
1
500
mrubyと micro-ROSが繋ぐロボットの世界
kishima
2
260
Windows 11 で AWS Documentation MCP Server 接続実践/practical-aws-documentation-mcp-server-connection-on-windows-11
emiki
0
960
LinkX_GitHubを基点にした_AI時代のプロジェクトマネジメント.pdf
iotcomjpadmin
0
170
Amazon Bedrockで実現する 新たな学習体験
kzkmaeda
2
540
Featured
See All Featured
Balancing Empowerment & Direction
lara
1
370
jQuery: Nuts, Bolts and Bling
dougneiner
63
7.8k
[Rails World 2023 - Day 1 Closing Keynote] - The Magic of Rails
eileencodes
35
2.3k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
34
5.9k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
138
34k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
20
1.3k
Become a Pro
speakerdeck
PRO
28
5.4k
Code Review Best Practice
trishagee
68
18k
A better future with KSS
kneath
239
17k
Building Adaptive Systems
keathley
43
2.6k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
32
2.3k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
507
140k
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