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

Be4518b119b8eb017625e0ead20f8fe7?s=128

LINE DevDay 2019

November 21, 2019
Tweet

Transcript

  1. 1.

    2019 DevDay Evolution of LINE Things and Inside of Released

    Products > Sho Tachibana > LINE Technical Evangelism Team Technical Evangelist
  2. 2.

    Sho Tachibana Technical Evangelist > Technical Support > Planning Support

    > Alliance Support > Biz Support Contact Me Anytime!
  3. 12.

    Agenda > Overview > New Feature: Automated BLE Communication >

    Service Prototypes by Developers > Products With LINE Things > Our Booth
  4. 13.
  5. 14.
  6. 19.
  7. 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();
  8. 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
  9. 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();
  10. 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();
  11. 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’) );
  12. 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();
  13. 30.
  14. 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==" } ] } ] }
  15. 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
  16. 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
  17. 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
  18. 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==" } ] } ] }
  19. 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" } ] } ] }
  20. 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==" } ......
  21. 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
  22. 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
  23. 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
  24. 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
  25. 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
  26. 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
  27. 52.
  28. 53.
  29. 54.
  30. 55.
  31. 56.
  32. 57.
  33. 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
  34. 62.