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

Evolution of LINE Things and inside of released...

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
  2. Sho Tachibana Technical Evangelist > Technical Support > Planning Support

    > Alliance Support > Biz Support Contact Me Anytime!
  3. Agenda > Overview > New Feature: Automated BLE Communication >

    Service Prototypes by Developers > Products With LINE Things > Our Booth
  4. 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();
  5. 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
  6. 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();
  7. 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();
  8. 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’) );
  9. 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();
  10. 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==" } ] } ] }
  11. { "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
  12. { "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
  13. { "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
  14. 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. 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" } ] } ] }
  16. 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==" } ......
  17. { "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
  18. > 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
  19. > 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
  20. > 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
  21. > 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
  22. > 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. > 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