Commit graph

1248 commits

Author SHA1 Message Date
99572f9731
Sanity check to prevent empty objects from being propagated to sensor.transform_entities 2023-04-01 23:41:28 +02:00
3f3726c50a
Fixed another occurrence of "Subscripted generics cannot be used" etc. error 2023-04-01 23:34:22 +02:00
e2e73d0fdb
Fix another Python < 3.10 subscripted generic issue. 2023-04-01 23:23:51 +02:00
c1d0f21ead
Migrated ltr559 integration to the new API.
Merged `backend.sensor.ltr559` and `gpio.sensor.ltr559` into the new
`sensor.ltr559` plugin, which extends the new `SensorPlugin` API.
2023-04-01 23:16:03 +02:00
8e0f88ea16
Don't swap the argument of SensorPlugin.publish_entities with a list if not required 2023-04-01 23:06:37 +02:00
0047d85b9d
Dirty fix for "Subscripted generics cannot be used with class and instance checks" on Python < 3.10 2023-04-01 22:52:24 +02:00
98ec018292
Replaced NoneType reference.
`types.NoneType` is not always available on all Python versions, so we
have to make our own type for it.
2023-04-01 22:42:13 +02:00
5dabfed365
Migrated sensor.bme280 to the new SensorPlugin interface.
Removed the old `backend.sensor.bme280` and the old `gpio.sensor.bme280`
plugin. They have now been merged into the new `sensor.bme280` runnable
plugin, which extends the `SensorPlugin` API and supports entities.
2023-04-01 22:31:24 +02:00
6f237a1500
Support the deprecated poll_seconds option on RunnablePlugin 2023-04-01 22:02:59 +02:00
c23e8867e2
Added enabled_sensors to the sensor plugin 2023-04-01 21:56:56 +02:00
7912a59ff8
vl53l1x plugin migrated to the new SensorPlugin interface. 2023-04-01 19:31:13 +02:00
6a5a5de03e
serial plugin migrated to the new SensorPlugin interface. 2023-04-01 19:29:56 +02:00
bf4db76830
Legacy sensor backend replaced by an extended sensor runnable plugin. 2023-04-01 19:24:35 +02:00
7bdd877e49
Support the binary flag both on serial.read and serial.write. 2023-03-31 14:31:45 +02:00
1efaff878e
Rewritten serial plugin.
`backend.serial` has been removed and the polling logic merged into the
`serial` plugin.

The `serial` plugin now supports the new entity engine as well.
2023-03-31 14:31:45 +02:00
a3e8c7c155 Rewritten vl53l1x integration as a runnable plugin with entity support 2023-03-31 14:25:05 +02:00
6fb362a6fb gpio.sensor.distance.vl53l1x -> sensor.distance.vl53l1x 2023-03-31 14:21:48 +02:00
2781eb1fb1
Merge branch 'master' into 29-generic-entities-support 2023-03-27 00:36:50 +02:00
7a368ebbb8
[#240] Migrated clipboard plugin from pyperclip to pyclip.
Closes: #240
2023-03-26 23:52:15 +02:00
bce2fdee25
Replaced deprecated asyncio.wait([]) with asyncio.gather(*[]). 2023-03-26 23:15:53 +02:00
c0251ef2f7
s/instance/instance_name/g in LinodeInstanceStatusChanged.
For sake of consistency - we also have `instance_id` and having the
instance name assigned to the `instance` attribute is quite ambiguous.
2023-03-26 22:58:20 +02:00
6d674fef21
Fixed small JSON syntax error in the docstring of ntfy.send_message. 2023-03-26 22:53:42 +02:00
295758bb20
Added frontend components for cloud instances. 2023-03-26 12:27:17 +02:00
bc2730c841
Rewritten linode integration.
- Support for cloud instances as native entities.
- Using Marshmallow dataclasses+schemas instead of custom `Response`
  objects.
- Merge `linode` backend into `linode` plugin.
2023-03-26 11:23:33 +02:00
3c355352c5
Using the new StoppableThread API. 2023-03-24 16:39:30 +01:00
998793e94f
Added OBEX_FILE_TRANSFER constant to directory stub. 2023-03-24 15:41:20 +01:00
2f49ddf33a
Fallback logic that uses DBus to disconnect from a BT device.
This logic will be used if the connection wasn't opened by the current
process and therefore a call to DBus is required to terminate it.
2023-03-24 01:57:05 +01:00
913ef6f8cd
Refresh BluetoothDevice.reachable when a device is found/lost. 2023-03-24 01:56:19 +01:00
d46d4e2300
Added support for Bluetooth devices blacklist.
Based on device address, name or manufacturer.
2023-03-24 01:52:39 +01:00
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