リアルタイムな位置の取得や過去の履歴の保存
自由なプログラムで各種機器に対応
無線・有線で既存機器を状況に合わせ操作
メール・電話・データベース・APIと連携
obnizは、デバイスに関するすべての操作をobnizクラウドのAPI経由で行います。
IoTに必要なデバイス上のファームウェア、クラウドとの通信と暗号化、クラウド上でのデバイス認証と管理機能は全て、obnizより提供されます。
サーバーで動くソフトウェアを用意するだけで、屋内位置情報・施設管理ソリューションを開発できます。
リアルタイム・低遅延はもちろん豊富なBLEビーコンやセンサーとの組み合わせも自由。
BLEデバイスとobnizを組み合わせた屋内位置情報や施設管理サービスは以下のような特徴のある開発が可能です。
エッジデバイスのファームウェア開発は必要ありません。全てクラウド上のプログラムから操作します。
新規デバイスの追加やスキャン方法の変更などはサーバーをリロードするだけで全国のデバイスに即時適用できます。また、問題のある施設の数台のみ違う動作をさせたり、問題が解決するまで何度も変えるなども容易です。
設置されるデバイスの位置や担当センサーなどもサーバー上のソフトウェアで制御可能です。デバイスを交換した場合もデバイスには何もせずサーバー上の情報切り替えで即座に行うことができます。
重要な機器と繋ぐ場合、obnizなら電源が抜かれて動作しなくなったときに近くのデバイスに自動で担当を切り替えるといった動作も可能です。
エッジデバイスにファームウェアは書き込まれていません。デバイス盗難が起きたとしても、プログラムやデバイスに保存していたBLEペリフェラルを操作するための秘密情報が漏洩することはありません。
「UUID指定」「Major, Minor指定」や「RSSIの強度」はもちろん「1度送ったら2分は送らない」などプログラムで自由な設定が可能。また、デバイスは「Wi-Fi」「有線LAN」「携帯回線」といった回線に対応でき、携帯回線での常時スキャン時もエッジ側のフィルターで回線帯域を節約します。
const Obniz = require("obniz"); const obnizList = [ { "obniz_id": "1111-1111", "memo": "入り口に設置" }, { "obniz_id": "1111-1112", "memo": "出口に設置" } ] for (const setting of obnizList) { const obniz = new Obniz(setting.obniz_id, {access_token: setting.access_token}); obniz.onconnect = onconnect; obniz.onclose = onclose } async function onconnect(obniz) { await obniz.ble.initWait(); obniz.ble.scan.onfind = async (peripheral) => { // Beacon Found console.log(`Found beacon localName=${peripheral.localName} by obniz ${obniz.id}`) }; await obniz.ble.scan.startWait( { uuids: ["2acb"] }, { duplicate: true, duration: null }, ) } async function onclose(obniz) { }
const Obniz = require("obniz"); const obnizList = [ { "obniz_id": "1111-1111", "memo": "入り口に設置" }, { "obniz_id": "1111-1112", "memo": "出口に設置" } ] let founds = {}; for (const setting of obnizList) { const obniz = new Obniz(setting.obniz_id, {access_token: setting.access_token}); obniz.onconnect = onconnect; } async function onconnect(obniz) { await obniz.ble.initWait(); obniz.ble.scan.onfind = async (peripheral) => { // Beacon Found console.log(`Found beacon localName=${peripheral.localName} by obniz ${obniz.id}`) // Filter by RSSI if (founds[peripheral.address] && founds[peripheral.address].rssi > peripheral.rssi) { return; } founds[peripheral.address] = { rssi: peripheral.rssi, localName: peripheral.localName, obniz: obniz.id } }; await obniz.ble.scan.startWait( {}, { duplicate: true, duration: null }, ) } // every 1 min setInterval(()=>{ for (const address in founds) { const found = founds[address]; console.log(`${found.localName} is closed to ${found.obniz}. RSSI=${found.rssi}`) } founds = []; }, 60 * 1000)
ビーコンの有無だけでなく、advertisementに含まれる温度情報などの値の読み取りと送信も可能。また、スキャンとBLE機器との接続も両立可能。施設内の接続が必要なBLEドアセンサーや温度センサーと通信しつつスキャンを行うことができます。
const Obniz = require("obniz"); const Logtta_TH = Obniz.getPartsClass('Logtta_TH'); const obniz = new Obniz("1111-1111", {access_token: "v]rhyiYkZY9JH3SA8rbS4dY"}); obniz.onconnect = async (obniz) => { await obniz.ble.initWait(); obniz.ble.scan.onfind = async (peripheral) => { console.log(`Found beacon localName=${peripheral.localName} by obniz ${obniz.id}`) // LogttaTH 温度センサーなら接続 if (Logtta_TH.isDevice(peripheral)) { try { const device = new Logtta_TH(peripheral); await device.connectWait(); console.log(`connected`); await obniz.ble.scan.startWait(); // start scannning again } catch(e) { console.error(e); } } }; obniz.ble.scan.onfinish = async function(peripherals, error){ await obniz.ble.scan.startWait(); }; await obniz.ble.scan.startWait(); }
const Obniz = require("obniz"); const fetch = require("node-fetch"); const Logtta_TH = Obniz.getPartsClass('Logtta_TH'); const obnizList = [ { "obniz_id": "1111-1111" }, { "obniz_id": "1111-1112" } ] for (const setting of obnizList) { const obniz = new Obniz(setting.obniz_id, {access_token: setting.access_token}); obniz.onconnect = onconnect; } let connecteds = [] async function onconnect(obniz) { await obniz.ble.initWait(); obniz.ble.scan.onfind = async (peripheral) => { console.log(`Found beacon localName=${peripheral.localName} by obniz ${obniz.id}`) // LogttaTH 温度センサーなら接続 if (Logtta_TH.isDevice(peripheral)) { try { const device = new Logtta_TH(peripheral); device.ondisconnect = (reason) => { console.log(`closed reason ${reason}`) connecteds.splice(connecteds.indexOf(device), 1); } await device.connectWait(); console.log(`connected`); connecteds.push(device); await obniz.ble.scan.startWait(); // start scannning again } catch(e) { console.error(e); } } }; obniz.ble.scan.onfinish = async function(peripherals, error){ await obniz.ble.scan.startWait(); }; await obniz.ble.scan.startWait(); } // every 1 min setInterval(async ()=>{ for (const device in connecteds) { const temperature = await device.getTemperatureWait(); console.log(`temperature=${temperature}`); await fetch(`https://api.example.com/post`, { method: "post", body: JSON.stringify({ temperature }), headers: { "Content-Type": "application/json" }, }); } founds = []; }, 60 * 1000)
SMSや電話のWebサービス・Amazon KinesisやRedisなどへの連携はもちろん、独自APIなども自由にプログラム。現在サービス提供中でも、システムをそのままにobnizを導入できます。
const Obniz = require("obniz"); const AWS = require("aws-sdk"); const Logtta_TH = Obniz.getPartsClass('Logtta_TH'); const kinesis = new AWS.Kinesis({ region: process.env.region }); // give IAM permission to Lambda exports.handler = function(event, context, callback) { // obniz setup const obniz = new Obniz("1111-1111", {access_token: "v]rhyiYkZY9JH3SA8rbS4dY"}); obniz.onconnect = async (obniz) => { await obniz.ble.initWait(); obniz.ble.scan.onfind = async (peripheral) => { console.log(`Found beacon localName=${peripheral.localName} by obniz ${obniz.id}`) // LogttaTH 温度センサーなら接続 if (Logtta_TH.isDevice(peripheral)) { try { const device = new Logtta_TH(peripheral); await device.connectWait(); const temperature = await device.getTemperatureWait(); await report(temperature) obniz.close(); // close socket to obniz callback(null, "success"); } catch(e) { console.error(e); } } }; await obniz.ble.scan.startWait(); } } async function report(temperature) { const record = { Data: JSON.stringify({ temperature }), PartitionKey: "1", StreamName: 'your-stream', }; await kinesis.putRecord(record).promise(); }
株式会社ビーキャップ
ビーコンのBLE信号を検知し、オフィスや工場・倉庫などのマップ上で所在地を確認できるクラウドサービス「Beacapp Here」。
既存サービスにobnizを導入し、機能の強化とメンテナンスの簡略化を実現。
Beacapp Hereサービスサイトへ(外部サイト)
サイズ | 50mm×35mm×13mm プラグ部除く |
---|---|
電源 | AC100V 50/60Hz |
消費電流 | 最大0.1A |
動作環境 | 温度:0℃〜40℃、湿度:10%〜90% |
主な素材 | 難燃性ポリカーボネート |
製造 | エンコアードジャパン株式会社 |
Bluetooth | Bluetooth 4.2 |
Wi-fi | IEEE 802.11b/g/n (2.4 GHzのみ) |
同時接続数 | 7台(状況により異なります) |
obnizの開発パートナーがあなたのシステム構築のお手伝いをします。まずは弊社までお気軽にご相談ください。