aprbrother / ab-ble-gateway
SDK for AB BLE Gateway
dev-master
2020-05-08 06:17 UTC
This package is not auto-updated.
Last update: 2025-04-27 06:02:43 UTC
README
PHP SDK for AB BLE Gateway
Installation
- Install composer
- Run
composer require aprbrother/ab-ble-gateway=dev-master
For BLE Gateway V4, you should install msgpack extension also
pecl install msgpack
Usage
Gateway V4
$parser = new AprBrother\PacketParser4();
$meta = $parser->parse($content);
$rawData = $meta['devices'];
$data = [];
unset($meta['devices']);
foreach($rawData as $v) {
$data[] = $parser->parse($v);
}
Gateway V2 or V3
$parser = new AprBrother\PacketParser();
list($meta, $data) = $parser->parse($content);