Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Small BLE Transmitter enhancement, handle Bluetooth state changes better, improve robustness #1384

Merged
merged 23 commits into from
Mar 1, 2021

Conversation

Alfiegerner
Copy link
Contributor

Summary

An addition to the recent BLE Transmitter changes. It's been working well for me in general , but noticed some odd behaviours on changing BT state.

Screenshots

N/A

Link to pull request in Documentation repository

Documentation: home-assistant/companion.home-assistant#

N/A

Any other notes

Alfiegerner and others added 23 commits February 3, 2021 00:20
…luetoothSensorManager.kt

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
  - Power transmitter values between high and ultra low.  Defaults to ultra low, should help with Battery concerns
  - A setting which allows the sensor to be turned on by default when the Enable all toggle is turned on.  This is off by default, users have to actively seek out this sensor to turn it on.
# Conflicts:
#	app/src/main/java/io/homeassistant/companion/android/sensors/BluetoothSensorManager.kt
…stant#1366)

Some points which may fix this issue
* Make notification objects static
* Use ServiceCompat for stopForeground
* Additionally call cancel to remove notification
…ssistant#1343)

* First cut add BLE beacon as new sensor.

* Lint issues, also using hardcoded strings for state.

* Fixes and small tidies following review.

* Add command_ble_transmitter to MessagingService.kt, to control BLE Transmitter from HA notifications.

* Make description more specific for settings.

* Return if sensor not enabled

* Spaced.

* Command turn on for transmitter should stop it first, as state could be incorrect on Bluetooth being disabled.

* Don't attempt to transmit if BT is off, and include that information in the state.

* Update app/src/main/java/io/homeassistant/companion/android/sensors/BluetoothSensorManager.kt

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>

* Add 2 new settings:
  - Power transmitter values between high and ultra low.  Defaults to ultra low, should help with Battery concerns
  - A setting which allows the sensor to be turned on by default when the Enable all toggle is turned on.  This is off by default, users have to actively seek out this sensor to turn it on.

* Add battery warning to description.

* Fix build - stray merge comma deletion.

* Fix small description text error.

Co-authored-by: Justin Bassett <bassett.justint@gmail.com>
…p sense of when device parameters have changed in one place.
Copy link
Collaborator

@JBassett JBassett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In the future please make sure your commits are based off master and that master is up to date to prevent conflicts.

@JBassett JBassett merged commit e12c6e3 into home-assistant:master Mar 1, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants