diff service/wifi/src/index.ts @ 1485:62be73d368df

fixes for streamedgraph build and a surprise with multi-value wifiBands Ignore-this: eea822327a0c66c4462ffd7c404079e5 darcs-hash:9341cc7bcc320e6ef7da3c79e9e3cd3c279bebb6
author drewp <drewp@bigasterisk.com>
date Thu, 09 Jan 2020 00:38:59 -0800
parents 4791c09f915f
children b267511ec4fc
line wrap: on
line diff
--- a/service/wifi/src/index.ts	Mon Jan 06 23:47:30 2020 -0800
+++ b/service/wifi/src/index.ts	Thu Jan 09 00:38:59 2020 -0800
@@ -6,7 +6,7 @@
 
 import { Literal, N3Store } from "n3";
 import { NamedNode, DataFactory } from "n3";
-const { namedNode } = DataFactory;
+const { namedNode, literal } = DataFactory;
 
 import { VersionedGraph } from "streamed-graph";
 import { style } from "./style";
@@ -184,7 +184,13 @@
       bytesPerSecDisplay: bytesPerSec + " B/s",
     };
 
-    const wifiBand = graphUriValue(store, devUri, room + "wifiBand");
+    let wifiBand;
+    try {
+      wifiBand = graphUriValue(store, devUri, room + "wifiBand");
+    } catch (e) {
+      wifiBand = namedNode("multi"); // some have 5G and 2G?
+    }
+    
     const connectedToAp = graphUriValue(store, devUri, room + "connectedToAp");
     if (!this.showGroups || connectedToAp) {
       const key = this.showGroups