From 038bd20b14b40a2055371e21b32bce3c3e08de91 Mon Sep 17 00:00:00 2001 From: Scrin Date: Mon, 26 Jul 2021 18:59:55 +0300 Subject: [PATCH] Adjust logging, gitignore, readme, changelog --- .gitignore | 3 ++- CHANGELOG.md | 6 ++++++ README.md | 8 +++++++- src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java | 9 --------- 4 files changed, 15 insertions(+), 11 deletions(-) diff --git a/.gitignore b/.gitignore index a2816d2..6c257e3 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,8 @@ target/ /ruuvi-names.properties .idea/ *.iml -.settings/org.eclipse.m2e.core.prefs +.settings +.vscode .classpath .factorypath .project diff --git a/CHANGELOG.md b/CHANGELOG.md index f114ccd..407f06d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,11 @@ # Changelog +### v0.2.7 + + - Added support for ibeacon and eddystone uid/tlm beacon formats (thanks Julia Goudsmith and Mustafa Yuecel (Siemens Mobility)) + - Added a configurable "receiver" tag (thanks Erkki Seppälä) + - Added prometheus backend (thanks Joe Kearney) + ### v0.2.6 - Fix UTF-8 support in config files (ruuvi-collector.properties and ruuvi-names.properties). This might be a breaking change if your config relied on broken charset support. diff --git a/README.md b/README.md index ba80805..661a068 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ RuuviCollector is an application for collecting sensor measurements from RuuviTags and storing them to InfluxDB. For more about how and for what this is used for, see [this](https://f.ruuvi.com/t/collecting-ruuvitag-measurements-and-displaying-them-with-grafana/267) post. -Note: As this application is still early in development, there is very little documentation at this point, so some knowledge in Linux and Java is necessary for fully understanding how to use this at this point. +Note: This tool is primarily intended for advanced users, so some knowledge in Linux and Java might be necessary for fully understanding how to use this. However there is a more beginner friendly setup "guide" [here](https://ruuvi.com/setting-up-raspberry-pi-as-a-ruuvi-gateway/) ### Features @@ -13,6 +13,12 @@ Supports following RuuviTag [Data Formats](https://github.com/ruuvi/ruuvi-sensor - Data Format 4: Eddystone-URL, URL-safe base64 -encoded, with tag id - Data Format 5: "RAW v2" BLE Manufacturer specific data, all current sensor readings + extra +Additionally basic support for iBeacon and Eddystone exists: + + - iBeacon: MAC, RSSI and other receiver-side generated data + - Eddystone UID: MAC, RSSI and other receiver-side generated data + - Eddystone TLM: temperature, battery voltage, MAC, RSSI and other receiver-side generated data + Supports following data from the tag (depending on tag firmware): - Temperature (Celsius) diff --git a/src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java b/src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java index 4d28a10..df3e153 100644 --- a/src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java +++ b/src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java @@ -13,15 +13,12 @@ import fi.tkgwf.ruuvi.parser.EddystoneTLMParser; import fi.tkgwf.ruuvi.parser.EddystoneUIDParser; import java.util.Optional; -import org.apache.log4j.Logger; /** * Creates {@link RuuviMeasurement} instances from raw dumps from hcidump. */ public class BeaconHandler { - private static final Logger LOG = Logger.getLogger(BeaconHandler.class); - private final DataFormatParser parser = new AnyDataFormatParser(); /** @@ -57,8 +54,6 @@ public Optional handle(HCIData hciData) { enhancedMeasurement.setReceiver(Config.getReceiver()); return Optional.of(enhancedMeasurement); } else if (adData.dataBytes()[0] == (byte) 0x4C && adData.dataBytes()[1] == (byte) 0x00 && adData.dataBytes()[2] == (byte) 0x02 && adData.dataBytes()[3] == (byte) 0x15) { - LOG.debug("iBeacon"); - IBeacon beacon = IBeaconParser.parse(adData.dataBytes()); if (beacon == null) { return Optional.empty(); @@ -71,8 +66,6 @@ public Optional handle(HCIData hciData) { enhancedMeasurement.setReceiver(Config.getReceiver()); return Optional.of(enhancedMeasurement); } else if ((adData.dataBytes()[0] == (byte) 0xAA) && (adData.dataBytes()[1] == (byte) 0xFE) && (adData.dataBytes()[2] == (byte) 0x00)) { - LOG.debug("Eddystone UID"); - EddystoneUID eddystoneUID = EddystoneUIDParser.parse(adData.dataBytes()); if (eddystoneUID == null) { return Optional.empty(); @@ -85,8 +78,6 @@ public Optional handle(HCIData hciData) { enhancedMeasurement.setReceiver(Config.getReceiver()); return Optional.of(enhancedMeasurement); } else if ((adData.dataBytes()[0] == (byte) 0xAA) && (adData.dataBytes()[1] == (byte) 0xFE) && (adData.dataBytes()[2] == (byte) 0x20)) { - LOG.debug("Eddystone TLM"); - EddystoneTLM eddystoneTLM = EddystoneTLMParser.parse(adData.dataBytes()); if (eddystoneTLM == null) { return Optional.empty();