From 8262498b2a76968d78ff7ac44ce9ee3cd59d0e81 Mon Sep 17 00:00:00 2001
From: Alain Saas
Date: Mon, 27 Dec 2021 06:22:30 +0900
Subject: [PATCH] Update awair_to_bangle.html
---
apps/awairmonitor/awair_to_bangle.html | 367 ++++++++++++-------------
1 file changed, 179 insertions(+), 188 deletions(-)
diff --git a/apps/awairmonitor/awair_to_bangle.html b/apps/awairmonitor/awair_to_bangle.html
index 8624d01f6..69c52499f 100644
--- a/apps/awairmonitor/awair_to_bangle.html
+++ b/apps/awairmonitor/awair_to_bangle.html
@@ -1,124 +1,204 @@
-
-
-
-
+
+
+
+
+
- function checkIfSupported() {
- // Hack for windows
- if (navigator.platform.indexOf("Win")>=0 &&
- (navigator.userAgent.indexOf("Chrome/54")>=0 ||
- navigator.userAgent.indexOf("Chrome/55")>=0 ||
- navigator.userAgent.indexOf("Chrome/56")>=0)
- ) {
- console.warn("Chrome <56 in Windows has navigator.bluetooth but it's not implemented properly");
- if (confirm("Web Bluetooth on Windows is not yet available.\nPlease click Ok to see other options for using Web Bluetooth"))
- window.location = "https://www.espruino.com/Puck.js+Quick+Start";
- return false;
- }
- if (navigator.bluetooth) return true;
- console.warn("No Web Bluetooth on this platform");
- var iOS = /iPad|iPhone|iPod/.test(navigator.userAgent) && !window.MSStream;
- if (iOS) {
- if (confirm("To use Web Bluetooth on iOS you'll need the WebBLE App.\nPlease click Ok to go to the App Store and download it."))
- window.location = "https://itunes.apple.com/us/app/webble/id1193531073";
- } else {
- if (confirm("This Web Browser doesn't support Web Bluetooth.\nPlease click Ok to see instructions for enabling it."))
- window.location = "https://www.espruino.com/Quick+Start+BLE#with-web-bluetooth";
- }
- return false;
- }
+
+How to use
+
+Step 1: Enable the Local API on your Awair: https://support.getawair.com/hc/en-us/articles/360049221014-Awair-Local-API-Feature
+
+Step 2: Launch the Awair Monitor app on your BangleJS
+
+Step 3: Input your Awair IP address and click the Connect button:
+
+
+
+Step 4: Optionally, open the web inspector's console (Right click > Inspector > Console) to read the Bluetooth logs
+
+Step 5: Once you are done, click the Disconnect button to properly close the Blutooth connection
+
+
- var NORDIC_SERVICE = "6e400001-b5a3-f393-e0a9-e50e24dcca9e";
- var NORDIC_TX = "6e400002-b5a3-f393-e0a9-e50e24dcca9e";
- var NORDIC_RX = "6e400003-b5a3-f393-e0a9-e50e24dcca9e";
- var DEFAULT_CHUNKSIZE = 20;
+