aprbrother/ab-ble-gateway

SDK for AB BLE Gateway

Maintainers

Package info

github.com/AprilBrother/ab-ble-gateway-sdk-php

pkg:composer/aprbrother/ab-ble-gateway

Statistics

Installs: 257

Dependents: 0

Suggesters: 0

Stars: 6

Open Issues: 3

dev-master 2020-05-08 06:17 UTC

This package is not auto-updated.

Last update: 2026-03-15 09:57:31 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);