Skip to content

Commit

Permalink
Adjust logging, gitignore, readme, changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Scrin committed Jul 26, 2021
1 parent cdff5ff commit 038bd20
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 11 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ target/
/ruuvi-names.properties
.idea/
*.iml
.settings/org.eclipse.m2e.core.prefs
.settings
.vscode
.classpath
.factorypath
.project
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
8 changes: 7 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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)
Expand Down
9 changes: 0 additions & 9 deletions src/main/java/fi/tkgwf/ruuvi/handler/BeaconHandler.java
Original file line number Diff line number Diff line change
Expand Up @@ -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();

/**
Expand Down Expand Up @@ -57,8 +54,6 @@ public Optional<EnhancedRuuviMeasurement> 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();
Expand All @@ -71,8 +66,6 @@ public Optional<EnhancedRuuviMeasurement> 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();
Expand All @@ -85,8 +78,6 @@ public Optional<EnhancedRuuviMeasurement> 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();
Expand Down

0 comments on commit 038bd20

Please sign in to comment.