0cebcf4f9b
switchbot.bluetooth
integration migrated to a bluetooth
plugin.
2023-03-23 17:46:54 +01:00
4fac110bb8
Added bluetooth.set
method, whose execution is delegated to the plugins.
2023-03-23 17:45:02 +01:00
cd219f44c4
Pass the list of plugins when creating Bluetooth managers.
2023-03-23 17:42:16 +01:00
43289a3b55
Scan always at least for 10 seconds before failing on get_device
.
2023-03-23 17:41:37 +01:00
6267943786
Wrap BleakError
exceptions into AssertionError
.
2023-03-23 17:40:30 +01:00
d6805a8b18
Added support for custom Bluetooth device plugins.
2023-03-23 17:10:37 +01:00
af125347d6
If no matching services are found when connecting to a device, default to BLEManager.
...
GATT characteristics are not necessarily exposed as services.
2023-03-23 13:00:26 +01:00
a2a5fce6cb
Added Apple Continuity
to the list of blacklisted manufacturers/models
2023-03-22 22:55:19 +01:00
5c23d3aa87
metadata and rssi fields on BLEDevice have been deprecated.
...
Changed the BLE beacon parsing logic to read those fields from
`AdvertisementData` instead of `BLEDevice`.
2023-03-22 22:39:01 +01:00
65bc3ae06d
Noisy beacons device configuration should look both at manufacturer and model.
2023-03-22 22:37:46 +01:00
e10bec88c0
Noisy beacons logging trace moved from info to debug.
2023-03-22 16:31:57 +01:00
99cfd247a5
A more effective logic to exclude noisy BLE beacons.
...
This includes BLE beacons sent from all Google/Apple/Microsoft/Samsung
beacon networks in all of their variants.
2023-03-22 15:35:02 +01:00
01d323fad0
Passing a boolean exclude_known_noisy_beacons
to bluetooth
plugin.
...
The logic to exclude BLE beacons from randomized devices needs to be a
bit more granular and not limited only to the reported device
manufacturer.
2023-03-22 15:29:19 +01:00
f6e09d34e4
A more clever logic of parsing the manufacturer for BLE devices.
...
1. Check the manufacturer parsed via Bleak/Theengs
2. Check the MAC address prefix in the oui numbers table
3. Check from the reported `manufacturer_data`
2023-03-22 14:16:00 +01:00
f7e8cfe5a7
Don't include unit
in BLE sensors when they are matched against the native type.
...
It's likely to just include the native type name anyway.
2023-03-22 14:14:59 +01:00
c750d83188
Prevent name collisions on bluetooth.ServiceClass
.
2023-03-22 03:27:25 +01:00
174b1ee6a9
Use a default list of excluded Bluetooth manufacturers.
2023-03-21 16:03:01 +01:00
b1cb7ef847
Added a list of excluded_manufacturers
to BluetoothPlugin
.
2023-03-21 14:32:45 +01:00
3743ee4f00
s/TheengsGateway/TheengsDecoder/g now that the pip package has been published.
2023-03-20 01:41:21 +01:00
12096f2dbe
Don't fail hard when device disconnection fails.
2023-03-19 12:56:53 +01:00
40f81b105f
Set the connected flag when connecting/disconnecting from a service.
2023-03-19 12:56:31 +01:00
9d66b63266
BluetoothService attributes fixes.
...
BluetoothService IDs should always be in the format `address::uuid` and
the name should always be in title format.
2023-03-19 12:55:14 +01:00
6e9263c4e4
A more elegant logic to infer the manufacturer name.
2023-03-19 12:54:52 +01:00
b568876474
Use a service's UUID as a name instead of Unknown if the service is unknown.
2023-03-19 12:54:09 +01:00
4144e4f842
Fixed self._ip_to_dev expansion
2023-03-19 12:47:07 +01:00
2411b961e8
[WIP] Big, big refactor of the Bluetooth integration.
...
- Merged together Bluetooth legacy and BLE plugins and scanners.
- Introduced Theengs as a dependency to infer BLE device types and
create sub-entities appropriately.
- Using `BluetoothDevice` and `BluetoothService` entities as the bread
and butter for all the Bluetooth plugin's components.
- Using a shared cache of devices and services between the legacy and
BLE integrations, with merging/coalescing logic included.
- Extended list of discoverable services to include all those officially
supported by the Bluetooth specs.
- Instantiate a separate pool of workers to discover services.
- Refactor of the Bluetooth events - all of them are now instantiated
from a single `BluetoothDevice` object.
2023-03-13 02:31:21 +01:00
4a8da80c7c
Don't join self._thread on stop in RunnablePlugin if self._thread = current_thread
2023-03-11 23:45:46 +01:00
72c55c03f2
[WIP] Refactoring/extending models and parsers for Bluetooth entities.
2023-03-03 02:10:11 +01:00
a688e7102e
Changed default poll_interval
for RunnablePlugin
.
...
30 -> 15 seconds.
2023-03-03 02:00:48 +01:00
15fadb93bb
Added stand-alone connect
and disconnect
actions to bluetooth
.
2023-02-25 01:59:35 +01:00
2dfb389630
Added remaining bluetooth
entity types in _mappers.py
.
2023-02-23 21:20:41 +01:00
a0556d3a42
Added PresenceSensor
entities.
2023-02-23 01:42:26 +01:00
886b930e2f
Support for bluetooth
devices with multiple temperature sensors.
2023-02-23 01:27:31 +01:00
56d693032a
Added DewPointSensor
entities.
2023-02-23 01:23:04 +01:00
d212276247
Added PressureSensor
entities.
2023-02-23 01:12:27 +01:00
dd3f683006
Added unit
to bluetooth
mappers whenever available.
2023-02-23 01:04:33 +01:00
d961e2a997
Added TimeDurationSensor
entity.
2023-02-23 01:02:13 +01:00
c3e16f9f9d
Added support for heart rate sensor entities.
2023-02-23 00:55:55 +01:00
3dab94c346
Added StepsSensor
detection to bluetooth
.
2023-02-23 00:50:06 +01:00
dcab766cef
Only scan for the configured Bluetooth service UUIDs.
2023-02-22 03:36:16 +01:00
9776921836
Better way of handling with RawSensor
in bluetooth
integration.
2023-02-22 02:26:51 +01:00
a5a923a752
Added BluetoothDeviceNewDataEvent
.
...
These events handle the case where a Bluetooth device only publishes new
service data without advertising any additional updated properties.
2023-02-22 02:23:11 +01:00
b2ffc08c89
s/MultiValueSensor/CompositeSensor/g on smartthings
2023-02-22 02:18:12 +01:00
7fa545d7f8
Merge branch 'master' into 29-generic-entities-support
2023-02-22 00:46:33 +01:00
b4627ecd04
Removed deprecated use_unicode parameter from MPDClient
2023-02-20 20:35:33 +01:00
aa0b909fff
Use the TheengsDecoder to parse Bluetooth packets and map services to native entities.
2023-02-20 20:27:17 +01:00
73bf2446bd
Wrap bluetooth.connect
in a per-device locked section.
2023-02-19 23:11:19 +01:00
9112239ac3
Better exception management in AsyncRunnablePlugin
.
...
Exceptions that cause the termination of the plugin's loop should always
be logged as such, unless the plugin is supposed to stop and various
exceptions may occur upon teardown.
2023-02-19 23:03:27 +01:00
613e32e7c1
Extended number of supported events and data fields in Bluetooth integration.
2023-02-18 01:15:10 +01:00
7adae272a4
Merge branch 'master' into 29-generic-entities-support
2023-02-15 22:24:41 +01:00
08553f84b9
Added timeout
parameter to websocket.send
.
2023-02-15 22:23:15 +01:00
a3aa186ddf
- Added support for scan_pause
/scan_resume
on bluetooth
integration.
...
- Added `BluetoothDevice` as its own entity type.
2023-02-13 23:12:25 +01:00
1d0be5c929
- Simplified prototype for EntityManager.set
...
- Added small documentation/annotations notes to the `Plugin` module.
- Small LINT fixes
2023-02-11 21:35:00 +01:00
575635fd6b
Defined set
as a base method for all plugins that implement writeable entities
2023-02-11 04:04:21 +01:00
b0cc80ceb0
Rewriting bluetooth.ble
plugin to use bleak
instead of gattlib
.
2023-02-10 17:40:20 +01:00
f30e077a5a
Support for custom Bluetooth adapter on switchbot.bluetooth
.
2023-02-08 23:01:05 +01:00
8469a1027f
Migrated/refactored switchbot.bluetooth
integration.
...
- Out `gattlib` + `pybluez`, in `bleak`. It's not platform-dependent, it doesn't
require libboost and other heavy build dependencies, and it doesn't require the
user that runs the service from having special privileges to access raw
Bluetooth sockets.
- Better integration with Platypush native entities. The devices are now mapped
to write-only `EnumSwitch` entities, and the status returns the serialized
representation of those entities instead of the previous intermediate
representation.
2023-02-08 22:42:00 +01:00
e49a0aec4d
Various improvements.
...
- Better synchronization logic on stop for `AsyncRunnablePlugin`.
- Fixed several thread names by dropping `prctl.set_name` in favour of
specifying the name directly on thread creation.
- Several LINT fixes.
2023-02-08 00:46:50 +01:00
9d028af524
Removed last reference of SwitchPlugin
2023-02-05 23:10:35 +01:00
419a0cec61
More LINTing
...
Better prototype for `MultiLevelSwitchEntityManager.set_value`
2023-02-05 23:07:43 +01:00
fde834c1b1
More LINT fixes + refactors
2023-02-05 22:00:50 +01:00
b8fca97891
Default poll_interval for RunnablePlugin
set to 30 seconds
2023-02-05 17:31:43 +01:00
06dfd1a152
Added support for more entities in switchbot
2023-02-05 15:34:50 +01:00
2047b9b76c
[WIP] Refactoring switchbot
plugin as a runnable plugin + entity manager
2023-02-04 22:22:51 +01:00
0311d87bc3
The switch.wemo
integration now extends SwitchEntityManager
2023-02-04 00:58:28 +01:00
de2849546a
LINT fixes
2023-02-04 00:26:48 +01:00
a160d3217e
Removed legacy get_sensor_plugins
and get_switch_plugins
actions
2023-02-03 22:54:42 +01:00
6ef2feea71
LINT fixes for utils
plugin
2023-02-03 18:08:19 +01:00
3db9c58d31
[WIP] Converted switch.tplink
plugin.
...
`switch.tplink` converted to a `RunnablePlugin` that implements
`SwitchEntityManager`.
2023-02-03 02:20:20 +01:00
be3b99326f
[WIP] Refactoring @manages
annotation into a proper EntityManager
hierarchy
2023-02-02 23:21:12 +01:00
8aff181956
Merged zwave.mqtt
backend into the zwave.mqtt
plugin
2023-01-29 02:34:48 +01:00
0e56d0fff6
Double-check if self._thread != None on stop on the ntfy thread
...
Race conditions may occur here
2023-01-27 22:12:34 +01:00
341e749d23
Merged the zigbee.mqtt
backend into the plugin.
...
- Deprecated the old `zigbee.mqtt` backend
- Black style for the `mqtt` backend
2023-01-27 01:59:57 +01:00
afdeb91f66
Implemented remaining supported entities for the smartthings
integration
2023-01-26 22:10:02 +01:00
ba31dff06a
Major refactor + fixes for smartthings
2023-01-24 23:56:28 +01:00
bb637a1411
Defined a unique stop_timeout
(default=5) for RunnablePlugin
2023-01-22 14:28:16 +01:00
6d4cf64253
More work on smartthings
.
...
- Added support for `Battery` entities
- Fixed saturation range for `Light` entities
- Parsing `min`/`max`/`unit` from the status attributes, if available
2023-01-22 01:01:47 +01:00
ddd516a677
Added polling/RunnablePlugin logic to smartthings
2023-01-22 00:09:10 +01:00
247912799f
Refactored light.hue integration so EntityUpdateEvents won't be triggered on every call to _get_lights
2023-01-21 14:48:33 +01:00
a892bad34c
Refactoring smartthings plugin to support more entity types
2023-01-21 14:09:26 +01:00
9a5e2899e8
Support for external_url and image_url on entities
2023-01-15 20:01:47 +01:00
9df4d5b5b8
Zigbee entities should be marked as unreachable also if they are currently being interviewed
2023-01-14 22:35:17 +01:00
68497e6388
Normalize the light devices' IEEE addresses before retrieving the associated devices
2023-01-13 23:28:12 +01:00
22a566a88b
More refactors and fixes for zigbee.mqtt
2023-01-13 02:58:47 +01:00
38438230d7
The batch of entities currently being processed should have no duplicate keys
2023-01-11 01:22:56 +01:00
4a2851231c
Large refactor of zigbee.mqtt
...
- Support for device options as children configuration entities
- Refactored switches management, removed legacy `switches` plugin
integration, and supporting multiple binary switches for one device
2023-01-09 01:02:49 +01:00
66000a0774
Merge branch 'master' into 29-generic-entities-support
2023-01-08 00:23:57 +01:00
7d90b274ae
Make sure that any existing device monitor is terminated upon disconnection
2023-01-07 23:48:02 +01:00
72454a6583
Merge branch 'master' into 29-generic-entities-support
2023-01-07 23:31:31 +01:00
40bdc3b7f3
Always wait 5 seconds (regardless of the poll interval) in case of errors.
...
Also, print the error only on the first occurrence, to prevent log
spamming.
2023-01-07 23:21:59 +01:00
e8f767d819
Take into account the notify_only_if_changed parameter
2023-01-07 23:11:34 +01:00
c5cf9803ff
Take into account the notify_only_if_changed parameter
2023-01-07 23:09:42 +01:00
6630873e2c
Merge branch 'master' into 29-generic-entities-support
2023-01-07 22:39:46 +01:00
2ee810bdc4
Added missing event to documentation
2023-01-07 22:39:23 +01:00
b7f266cd92
Merge branch 'master' into 29-generic-entities-support
2023-01-07 22:31:36 +01:00
a77206800d
Added HID plugin to support interaction with generic HID devices
2023-01-07 22:30:32 +01:00
01727f53bc
Support for is_configuration flag on zwave
entities
2023-01-03 23:13:34 +01:00
0f60bc2131
Don't delete external_id and data attributes unless they are set
2023-01-02 21:01:46 +01:00
b0671354ea
(Tentative) support for zwave light colors
2023-01-02 12:50:01 +01:00
f9b6799a18
A more robust and scalable way of merging/handling the currentValue/targetValue duality in zwave.mqtt
2023-01-01 12:45:41 +01:00