Kevin Luo
LINE - Application Analyst
Agenda • Why LINE Things
• Service Architecture
• LINE Things LIFF BLE
LINE THINGS
SHOWCASE
WHY LINE THINGS
EVERYONE IS USING LINE
CURRENT IoT
More devices more Apps
Different protocols to connect to your devices
Complicated processes and ways to setup
HASSLE & CHAOS FOR USERS NOW
UI and device management
Hard to manage and use devices
Infrequent usage
BAD EXPERIENCE
WITH LINE THINGS
All the linked devices in One App - LINE
Hassle free, easy to setup
Interact with devices use through CHAT or WEBVIEW
BENEFITS FOR USERS
No more app to develop and to market
Just use WEB technologies
Easy to integrate with current web services
BENEFITS FOR SERVICE PROVIDERS AND
DEVELOPERS
HOW WE DO IT
Online Devices
direct internet connection
Offline Devices
no internet connection
DEVICES SUPPORT
● Wearable type devices
● Home appliance
● Bluetooth(BLE) devices
● Home gateway devices
● Wifi enabled devices
● Devices connect through
server
OVERVIEW
LINE THINGS
Service Management
Event Delivery
Authorization
Authentication
API’s
LINE APP
Communication
UI/UX
BLE
SERVICES
Communication
UI/UX
BLE
OFFLINE Devices ONLINE Devices
OFFLINE DEVICES
LINE THINGSLINE APP SERVICES
OFFLINE Devices
LINE App will proxy device events
Services can directly use web API’s to communicate with devices
Communicate With BLE
Events Events
Webview Data Processing
Data Delivery
CP Server
ONLINE DEVICES
LINE THINGSLINE APP
SERVICES
ONLINE Devices
Online devices can communicate directly with LINE things
CP side can proxy events and API’s for online devices
Device
Events
Events
API’s
Data Delivery
CP Server
RESTful
API
ONLINE DEVICES USE CASES
Remote
Control
Door
Opened
Alarm
ONLINE DEVICES USE CASES
Messaging API
Your
Servers
LINE
Servers
LINE
App
Devices
OFFLINE DEVICES USE CASES
OFFLINE DEVICES USE
BLE- Bluetooth Low Energy
No need to create backend APP for devices
No need for SIM or WIFI module
Devices do not need internet connection
ADVANTAGES OF BLE
WE HAD - LINE BEACON
You can send messages
when your customers
enter your store
WE NEED MORE
Bi-direction communication
Support for almost all BLE devices
BLE communication without user interaction
OUR NEW CHALLENGES
LINE THINGS LIFF BLE
Devices Messaging API
LIFF BLE
Your Servers
Your LIFF
App
LINE
Servers
LINE
App
Device link - Manage devices
LIFF SDK with BLE plugin
Automated BLE(Bluetooth Low Energy) communication (coming in 2019)
LINE THINGS FEATURES
LIFF - APPLICATION
DEVICE LINK & LIFF BLE
HOW DOES LIFF BLE WORK
Devices
LIFF SDK
(BLE plugin)
BLE Native
Component
LIFF
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'
);
characteristic.addEventListener('characteristicvaluechanged', (e) =>
{ console.log('value changed to:' + e.target.value); });
IMPLEMENTATION
CONNECTION PROCESS
Scanning
LINE App
Advertising
Device Connect
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); });
CONNECTION PROCESS
DATA ACCESS
Device LINE App
Read
LIFF BLE
Device
Device
LINE App
LINE App
Notify
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)
DATA ACCESS
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(
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); }
NOTIFY
AUTOMATED
BLE COMMUNICATION
USE CASE
Easy to implement
Free to try
Easy to share demo app
ADVANTAGES OF LINE THINGS
LET’S MAKE SOMETHING
https://developers.line.biz/en/docs/line-things/
LINE DEVELOPERS
https://github.com/line/line-things-starter
SAMPLE CODES
https://engineering.linecorp.com/en/blog/line-things-developer-trial/
BLOG - HOW TO 101
THANK YOU

LINE Things - LINE IoT平台新技術分享

  • 2.
    Kevin Luo LINE -Application Analyst
  • 3.
    Agenda • WhyLINE Things • Service Architecture • LINE Things LIFF BLE
  • 4.
  • 5.
  • 6.
  • 7.
  • 8.
    More devices moreApps Different protocols to connect to your devices Complicated processes and ways to setup HASSLE & CHAOS FOR USERS NOW
  • 9.
    UI and devicemanagement Hard to manage and use devices Infrequent usage BAD EXPERIENCE
  • 10.
  • 11.
    All the linkeddevices in One App - LINE Hassle free, easy to setup Interact with devices use through CHAT or WEBVIEW BENEFITS FOR USERS
  • 12.
    No more appto develop and to market Just use WEB technologies Easy to integrate with current web services BENEFITS FOR SERVICE PROVIDERS AND DEVELOPERS
  • 13.
  • 14.
    Online Devices direct internetconnection Offline Devices no internet connection DEVICES SUPPORT ● Wearable type devices ● Home appliance ● Bluetooth(BLE) devices ● Home gateway devices ● Wifi enabled devices ● Devices connect through server
  • 15.
    OVERVIEW LINE THINGS Service Management EventDelivery Authorization Authentication API’s LINE APP Communication UI/UX BLE SERVICES Communication UI/UX BLE OFFLINE Devices ONLINE Devices
  • 16.
    OFFLINE DEVICES LINE THINGSLINEAPP SERVICES OFFLINE Devices LINE App will proxy device events Services can directly use web API’s to communicate with devices Communicate With BLE Events Events Webview Data Processing Data Delivery CP Server
  • 17.
    ONLINE DEVICES LINE THINGSLINEAPP SERVICES ONLINE Devices Online devices can communicate directly with LINE things CP side can proxy events and API’s for online devices Device Events Events API’s Data Delivery CP Server RESTful API
  • 18.
  • 19.
  • 20.
  • 21.
    ONLINE DEVICES USECASES Messaging API Your Servers LINE Servers LINE App Devices
  • 22.
  • 23.
    OFFLINE DEVICES USE BLE-Bluetooth Low Energy
  • 24.
    No need tocreate backend APP for devices No need for SIM or WIFI module Devices do not need internet connection ADVANTAGES OF BLE
  • 25.
    WE HAD -LINE BEACON
  • 26.
    You can sendmessages when your customers enter your store
  • 27.
  • 28.
    Bi-direction communication Support foralmost all BLE devices BLE communication without user interaction OUR NEW CHALLENGES
  • 29.
    LINE THINGS LIFFBLE Devices Messaging API LIFF BLE Your Servers Your LIFF App LINE Servers LINE App
  • 30.
    Device link -Manage devices LIFF SDK with BLE plugin Automated BLE(Bluetooth Low Energy) communication (coming in 2019) LINE THINGS FEATURES
  • 31.
  • 33.
    DEVICE LINK &LIFF BLE
  • 34.
    HOW DOES LIFFBLE WORK Devices LIFF SDK (BLE plugin) BLE Native Component LIFF app
  • 35.
    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); }); IMPLEMENTATION
  • 36.
  • 37.
    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); }); CONNECTION PROCESS
  • 38.
    DATA ACCESS Device LINEApp Read LIFF BLE Device Device LINE App LINE App Notify Write
  • 39.
    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) DATA ACCESS
  • 40.
    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
  • 41.
    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( WRITE
  • 42.
    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); } NOTIFY
  • 43.
  • 45.
    Easy to implement Freeto try Easy to share demo app ADVANTAGES OF LINE THINGS
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.