Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Evolution of LINE Things and inside of released products

Evolution of LINE Things and inside of released products

Sho Tachibana
LINE Technical Evangelism Team Technical Evangelist
https://linedevday.linecorp.com/jp/2019/sessions/F2-1

LINE DevDay 2019

November 21, 2019
Tweet

More Decks by LINE DevDay 2019

Other Decks in Technology

Transcript

  1. 2019 DevDay
    Evolution of LINE Things and
    Inside of Released Products
    > Sho Tachibana
    > LINE Technical Evangelism Team Technical Evangelist

    View Slide

  2. Sho Tachibana
    Technical Evangelist
    > Technical Support
    > Planning Support
    > Alliance Support
    > Biz Support
    Contact Me
    Anytime!

    View Slide

  3. Nov 2018

    View Slide

  4. Trial Products
    1,800+

    View Slide

  5. MAU In TOP 4
    164,000,000

    View Slide

  6. Install
    Signup
    Credit Card
    Unreachable User
    Useless Development
    NO

    View Slide

  7. Install
    NO

    View Slide

  8. Signup
    NO

    View Slide

  9. Credit Card
    NO

    View Slide

  10. Unreachable User
    NO

    View Slide

  11. Useless Development
    NO

    View Slide

  12. Agenda
    > Overview
    > New Feature: Automated BLE Communication
    > Service Prototypes by Developers
    > Products With LINE Things
    > Our Booth

    View Slide

  13. Overview

    View Slide

  14. Device link
    LIFF BLEʢLIFF SDK BLE pluginʣ
    New feature: Automated BLE communication
    LINE Things Features

    View Slide

  15. LINE Things

    View Slide

  16. LINE Things

    View Slide

  17. LIFF - LINE Front-end Framework

    View Slide

  18. Device Link & LIFF BLE

    View Slide

  19. View Slide

  20. LIFF BLE
    Device Link

    View Slide

  21. How Does LIFF BLE Work?

    View Slide

  22. 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();

    View Slide

  23. 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

    View Slide

  24. Data Access
    LINE app
    Device
    Read
    LINE app
    Device
    Write
    LINE app
    Device
    Notify

    View Slide

  25. 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();

    View Slide

  26. 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'
    );
    const value = await characteristic.readValue();

    View Slide

  27. 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'
    );
    await characteristic.writeValue(
    new TextEncoder(‘utf-8‘).encode(‘LIFF BLE’)
    );

    View Slide

  28. Notify
    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();

    View Slide

  29. Automated BLE Communication

    View Slide

  30. View Slide

  31. How Does Automated BLE Communication Work?

    View Slide

  32. Scenario
    {
    "autoClose": false,
    "suppressionInterval": 0,
    "scenarios": [
    {
    "trigger": {
    "type": "BLE_NOTIFICATION",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    },
    "actions": [
    {
    "type": "GATT_WRITE",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3",
    "data": "Zm9vCg=="
    }
    ]
    }
    ]
    }

    View Slide

  33. {
    "autoClose": false,
    "suppressionInterval": 0,
    "scenarios": [
    {
    "trigger": {
    "type": "BLE_NOTIFICATION",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    },
    "actions": [
    {
    "type": "GATT_WRITE",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3",
    "data": "Zm9vCg=="
    }
    ]
    }
    ]
    }
    Scenario

    View Slide

  34. {
    "autoClose": false,
    "suppressionInterval": 0,
    "scenarios": [
    {
    "trigger": {
    "type": "BLE_NOTIFICATION",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    },
    "actions": [
    {
    "type": "GATT_WRITE",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3",
    "data": "Zm9vCg=="
    }
    ]
    }
    ]
    }
    Scenario

    View Slide

  35. {
    "autoClose": false,
    "suppressionInterval": 0,
    "scenarios": [
    {
    "trigger": {
    "type": "BLE_NOTIFICATION",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    },
    "actions": [
    {
    "type": "GATT_WRITE",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3",
    "data": "Zm9vCg=="
    }
    ]
    }
    ]
    }
    Scenario

    View Slide

  36. Scenario
    {
    "autoClose": false,
    "suppressionInterval": 0,
    "scenarios": [
    {
    "trigger": {
    "type": "BLE_NOTIFICATION",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    },
    "actions": [
    {
    "type": "GATT_WRITE",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3",
    "data": "Zm9vCg=="
    }
    ]
    }
    ]
    }

    View Slide

  37. Scenario
    {
    "autoClose": true,
    "suppressionInterval": 600000,
    "scenarios": [
    {
    "trigger": {
    "type": "IMMEDIATE",
    },
    "actions": [
    {
    "type": "GATT_READ",
    "serviceUuid": "4812a0a6-10af-4afb-91f0-b4434e55763b",
    "characteristicUuid": "91a6fb1d-d365-4229-9d41-4358a96388e3"
    }
    ]
    }
    ]
    }

    View Slide

  38. Webhook
    {
    "events": [
    {
    "type": "things",
    ...
    "things": {
    "type": "scenarioResult",
    "deviceId": "tXXX",
    "result": {
    "scenarioId": "XXX",
    "revision": 2,
    "startTime": 1547817845950,
    "endTime": 1547817845952,
    "resultCode": "success",
    "bleNotificationPayload": "AQ==",
    "actionResults": [
    {
    "type": "binary",
    "data": "/w=="
    }
    ......

    View Slide

  39. {
    "events": [
    {
    "type": "things",
    ...
    "things": {
    "type": "scenarioResult",
    "deviceId": "tXXX",
    "result": {
    "scenarioId": "XXX",
    "revision": 2,
    "startTime": 1547817845950,
    "endTime": 1547817845952,
    "resultCode": "success",
    "bleNotificationPayload": "AQ==",
    "actionResults": [
    {
    "type": "binary",
    "data": "/w=="
    }
    ......
    Webhook

    View Slide

  40. > Background communication works(with a few expetions)
    > Sleep action must be less than 5 seconds
    > autoClose = true with just BLE_NOTIFICATION trigger does not works
    Important Notes
    Regarding Automated BLE Communication
    > Background Behavior of BLE depends on OS

    View Slide

  41. > Background communication works(with a few expetions)
    > Sleep action must be less than 5 seconds
    > autoClose = true with just BLE_NOTIFICATION trigger does not works
    Important Notes
    Regarding Automated BLE Communication
    > Background Behavior of BLE depends on OS

    View Slide

  42. > Background communication works(with a few expetions)
    > Sleep action must be less than 5 seconds
    > autoClose = true with just BLE_NOTIFICATION trigger does not works
    Important Notes
    Regarding Automated BLE Communication
    > Background Behavior of BLE depends on OS

    View Slide

  43. > Background communication works(with a few expetions)
    > Sleep action must be less than 5 seconds
    > autoClose = true with just BLE_NOTIFICATION trigger does not works
    Important Notes
    Regarding Automated BLE Communication
    > Background Behavior of BLE depends on OS

    View Slide

  44. > Background communication works.(with a few expetions)
    > Sleep action must be less than 5 seconds
    > autoClose = true with just BLE_NOTIFICATION trigger does not works
    Important Notes
    Regarding Automated BLE Communication
    > Background Behavior of BLE depends on OS

    View Slide

  45. Service Prototypes
    By Developers

    View Slide

  46. Car Battery Checker
    LIFF BLE Automated

    View Slide

  47. LINE Things Drink Bar
    LIFF BLE Messaging API

    View Slide

  48. LINE Beacon Bacon
    LIFF BLE Automated

    View Slide

  49. Mirai Gomibako
    LINE Pay API

    View Slide

  50. Quiz Buzzer
    LIFF BLE
    LIFF

    View Slide

  51. Products With LINE Things

    View Slide

  52. View Slide

  53. Smart Pen

    View Slide

  54. Our Booth

    View Slide

  55. View Slide

  56. View Slide

  57. View Slide

  58. > Will be charged from the second year, but calculated based on the number
    of users
    > Push message of LINE Messaging API will be charged, and we plan to
    monetize by them
    > Free for the first year after submission for the production plan
    Price of LINE Things Platform
    > The campaign will go on for a limited time

    View Slide

  59. Last but at Least

    View Slide

  60. LINE Things
    WebApp Messanger Payment
    Social

    View Slide

  61. Life on LINE

    View Slide

  62. Thank You

    View Slide