Skip to content

Commit

Permalink
1.0.3
Browse files Browse the repository at this point in the history
  • Loading branch information
asednev committed Sep 28, 2020
1 parent 23e7359 commit 02580aa
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion index.d.ts.map

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 3 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,18 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
Object.defineProperty(exports, "__esModule", { value: true });
exports.stopDiscovery = exports.startDiscovery = exports.debug = void 0;
const noble_1 = __importDefault(require("@abandonware/noble"));
process.env.NOBLE_REPORT_ALL_HCI_EVENTS = '1'; // needed on Linux including Raspberry Pi
const h5075_uuid = "ec88";
const h5075_uuid_rev = "88ec";
const govee_bt_mac = "a4-c1-38";
const govee_bt_mac_alt = "a4:c1:38";
let DEBUG = false;
const validPeripheral = (peripheral) => {
const { address, advertisement } = peripheral;
if (!advertisement || !advertisement.manufacturerData) {
return false;
}
if (address && !address.toLowerCase().startsWith(govee_bt_mac)) {
if (address && (!address.toLowerCase().startsWith(govee_bt_mac) && !address.toLowerCase().startsWith(govee_bt_mac_alt))) {
return false;
}
const hex = advertisement.manufacturerData.toString('hex');
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "govee-bt-client",
"version": "1.0.1",
"version": "1.0.3",
"description": "Govee H5075 Thermometer Hygrometer Bluetooth Client",
"main": "index.js",
"types": "index.d.ts",
Expand Down

0 comments on commit 02580aa

Please sign in to comment.