Merge pull request #17 from jptrsn/master

update develop
This commit is contained in:
Edu_Coder 2019-07-10 23:06:45 -04:00 committed by GitHub
commit 1c2c2e3db1
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 103 additions and 9 deletions

36
.github/ISSUE_TEMPLATE/bug_report.md vendored Normal file
View File

@ -0,0 +1,36 @@
---
name: Bug report
about: Create a report to help us improve
title: ''
labels: bug
assignees: ''
---
**Describe the bug**
A clear and concise description of what the bug is.
**Configuration**
Please copy and paste your `settings_local.h` (or equivalent) with any sensitive data redacted. It can also help to see the entry for your sensors in your Home Assistant configuration.
**Logs**
If possible, copy and paste any logs from the serial monitor from the time that you see the bug.
**Hardware Details**
If the bug is related to tracking a specific piece of hardware (e.g. iBeacon, phone, etc), please enter any relevant details about the hardware (such as firmware version, MAC address, etc).
**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error
**Expected behavior**
A clear and concise description of what you expected to happen.
**Screenshots**
If applicable, add screenshots to help explain your problem.
**Additional context**
Add any other context about the problem here.

View File

@ -0,0 +1,20 @@
---
name: Feature request
about: Suggest an idea for this project
title: ''
labels: enhancement
assignees: ''
---
**Is your feature request related to a problem? Please describe.**
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
**Describe the solution you'd like**
A clear and concise description of what you want to happen.
**Describe alternatives you've considered**
A clear and concise description of any alternative solutions or features you've considered.
**Additional context**
Add any other context or screenshots about the feature request here.

View File

@ -6,8 +6,16 @@ Generic beacon hardware should be compatible, provided it meets a beacon standar
* [eBay](https://www.ebay.com/sch/i.html?_nkw=nrf51822+ibeacon)
* [Ali Express](https://www.aliexpress.com/wholesale?SearchText=nrf51822+ibeacon).
## Non-beacon Hardware
Some other devices that advertise as BLE (such as the Mi Flora plant sensors or the Mi Band fitness tracker) can also be tracked, as long as you can scan the device and see its hardware ID. Here is a list of devices known to be "trackable":
* MiFlora plant sensor
* MiBand 2 Fitness tracker
* [Puck-JS](https://www.espruino.com/Puck.js), if programmed to [broadcast beacon packets](https://gist.github.com/jptrsn/d6cb9b9cdbcd41f3500708f8b694cad2 "An example project to broadcast iBeacon packets")
## configuration.yaml
Here is an example of how an entry into your `configuration.yaml` file should look:
```yaml
sensor:
# One entry for each beacon you want to track
- platform: mqtt_room
device_id: "fda50693a4e24fb1afcfc6eb07647825-5-0" # Note that major version must match, but any minor version will be ignored
name: 'iBeacon Room Presence'
state_topic: 'room_presence'
timeout: 60
away_timeout: 120
```

26
docs/generic_ble.md Normal file
View File

@ -0,0 +1,26 @@
# Generic BLE Hardware
Here is a list of devices known to be "trackable":
* MiFlora plant sensor
* MiBand 2 Fitness tracker
* [Puck-JS](https://www.espruino.com/Puck.js), if programmed to [broadcast beacon packets](https://gist.github.com/jptrsn/d6cb9b9cdbcd41f3500708f8b694cad2 "An example project to broadcast iBeacon packets")
## Device ID
To track generic BLE advertisements, you will need to know the hardware MAC address of the device. You can use an app on your smart phone to scan for and identify the correct device - I recommend [NRF Connect](https://play.google.com/store/apps/details?id=no.nordicsemi.android.mcp) from [Nordic Semiconductor](https://play.google.com/store/apps/dev?id=7265678888812659353) for Android (and I believe there is an iOS version as well).
Alternatively, you can subscribe to the `room_presence` topic and view what devices are being reported there. Note that modern smart phones will randomize their hardware MAC address when broadcasting advertisements, so you must use a beacon app to track your phone (see the [section on tracking phones](./android.html) for more information).
To track the device, specify the `device_id` entry as the hardware MAC address, without the colons.
## configuration.yaml
Here is an example of how an entry into your `configuration.yaml` file should look:
```yaml
sensor:
# One entry for each beacon you want to track
- platform: mqtt_room
device_id: C80F104DC7EB # Match the Bluetooth MAC address of the device
name: 'Mi Band'
state_topic: 'room_presence'
timeout: 60
away_timeout: 120
```

View File

@ -1,12 +1,12 @@
# Home Assistant Configuration
Once the ESP32 is running, it is important to configure Home Assistant to use the information from the MQTT topic to determine what devices to track. You can read the full documentation [on the Home Assistant website](https://www.home-assistant.io/components/sensor.mqtt_room/). It is critical that you configure your device IDs to include the Major and Minor versions, in the format ``{{beacon uuid}}-{{major}}-{{minor}}``
Once the ESP32 is running, it is important to configure Home Assistant to use the information from the MQTT topic to determine what devices to track. You can read the full documentation [on the Home Assistant website](https://www.home-assistant.io/components/sensor.mqtt_room/). It is critical that you configure your device IDs to include the Major and Minor versions, in the format `{{beacon uuid}}-{{major}}-{{minor}}`
### configuration.yaml
Here is an example of how an entry into your `configuration.yaml` file should look:
```yaml
sensor:
# One entry for each BLE beacon you want to track
# One entry for each beacon you want to track
- platform: mqtt_room
device_id: "fda50693a4e24fb1afcfc6eb07647825-5-0" # Note that major version must match, but any minor version will be ignored
name: 'iBeacon Room Presence'

View File

@ -30,8 +30,12 @@ It is possible to update the device using "Over the Air" (OTA) updates from the
See the section on [configuring Home Assistant](./home_assistant.html).
## Trackable Devices
### Beacon Hardware
See the section on [tracking beacon hardware](./beacons.html)
### Beacons
See the section on [tracking beacons](./beacons.html)
### Generic Bluetooth Low-Energy (BLE) Devices
Some other devices that advertise as BLE (such as the Mi Flora plant sensors or the Mi Band fitness tracker) can also be tracked, as long as you can scan the device and see its hardware ID. See the section on [tracking generic BLE devices](./generic_ble.html).
### Tracking Android Phone
[Read more here](./android.html) about getting your Android phone configured and tracked.