Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix ble-shelly-btn-gateway-for-other-devices/ble-shelly-btn #137

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ble-shelly-btn-gateway-for-other-devices.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ function bleScanCallback(event, result) {
lastPacketId = receivedData["pid"];

//getting and execuing the action
let actionType = ["", "singlePush", "doublePush", "triplePush", "longPush"][receivedData["Button"]];
let actionType = ["", "singlePush", "doublePush", "triplePush", "longPush"][receivedData["button"]];

let actionUrls = CONFIG.actions[actionType];

Expand Down
3 changes: 3 additions & 0 deletions ble-shelly-btn.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,9 @@ let CONFIG = {
const ALLTERCO_MFD_ID_STR = "0ba9";
const BTHOME_SVC_ID_STR = "fcd2";

const SCAN_DURATION = BLE.Scanner.INFINITE_SCAN;
const ACTIVE_SCAN = true;

const uint8 = 0;
const int8 = 1;
const uint16 = 2;
Expand Down