Commit graph

1656 commits

Author SHA1 Message Date
beff88986a
Migrated dht integration.
Removed `backend.sensor.dht` and `gpio.sensor.dht`. They have been
merged into the new `sensor.dht` integration, which supports the new
`SensorPlugin` API.
2023-04-02 13:38:53 +02:00
8f604445a2
Migrated old sensor.accelerometer integration.
Removed `backend.sensor.accelerometer` and `gpio.sensor.accelerometer`.
The logic has now been merged in the new `sensor.lis3dh` integration,
which is compatible with the new `SensorPlugin` API.
2023-04-02 13:22:28 +02:00
44cf25271c
Migrated pmw3901 integration.
Removed legacy `backend.sensor.motion.pmw3901` and
`gpio.sensor.motion.pmw3901`. They have been merged in the new
`sensor.pmw3901` integration, compatible with the new `SensorPlugin`
API.
2023-04-02 12:36:08 +02:00
fcdda40c4a
Update the _last_measurement only if some events were processed from the new data. 2023-04-02 12:09:45 +02:00
88784985e1
Should be abs(old_data - new_data) >= tolerance.
Not `abs(old_data - new_data) > tolerance`.
2023-04-02 12:08:40 +02:00
7697c1c6ad
Migrated envirophat to the new SensorPlugin API.
Removed `backend.sensor.envirophat` and `gpio.sensor.envirophat` plugin.
They have now been merged into the new `sensor.envirophat` plugin.
2023-04-02 02:49:08 +02:00
d964167631
s/TimeDurationSensor/TimeDuration/g 2023-04-02 00:57:48 +02:00
f24d0773d1
No need for sensor.vl53l1x.transform_entities to call the parent. 2023-04-01 23:54:43 +02:00
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
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
9ddebb920f
Merge branch 'master' into 29-generic-entities-support 2022-12-17 00:51:51 +01:00
152ebdf737
[#236] Added author and tags attributes to new feed entry event and schema objects. 2022-12-17 00:21:32 +01:00
cf9d34d38e
A more robust logic to parse zwave.mqtt value attributes. 2022-12-10 16:21:29 +01:00
c4f649a0d5
autoflush should be passed as an option to db.get_session. 2022-12-10 16:20:14 +01:00
00a918dd20
Support for the new way of reporting events on ZWaveJS-UI.
The most recent versions of ZwaveJS-UI don't send the `hexId` of the
node on node change events. We have therefore to infer it from the
reported `dbLink`.
2022-12-04 20:56:52 +01:00
3a92bf59ca
Support for the new way of reporting events on ZWaveJS-UI.
The most recent versions of ZwaveJS-UI don't send the `hexId` of the
node on node change events. We have therefore to infer it from the
reported `dbLink`.
2022-12-04 20:48:42 +01:00
1ab85f99d9
Support for illuminance sensor entities on zigbee.mqtt 2022-11-30 02:16:56 +01:00
09d70e2ff1
The zwavejs2mqtt project has been renamed zwave-js-ui
Change the documentation accordingly
2022-11-30 02:04:48 +01:00
b6370b51da
Extended humidity sensors detection for zigbee.mqtt 2022-11-30 01:24:35 +01:00
16c24d799d
Removed custom formatting for child zigbee/zwave entity names
The parent->child relationship is now modelled on the database itself,
so we no longer need value names specifically formatted as
`[DeviceName] ValueName` - the UI will take care of it.
2022-11-30 01:02:25 +01:00
080b21ab70
Added support for reachable flag on zwave.mqtt child entities 2022-11-30 01:01:45 +01:00
2b532c1947
Implemented parent/child support for zigbee.mqtt entities 2022-11-30 00:55:04 +01:00
cc156a53a1
Support for parent/children relationships on zwave.mqtt entities 2022-11-28 21:42:11 +01:00
0e0c90f0f2
zwave.mqtt additions
- Infer entity types on the basis of their semantic type (bool, decimal,
  list) and read-only attribute (read-only bool is `BinarySensor`,
  read-write bool is `Switch`, read-only decimal is `NumericSensor`,
  read-write decimal is `Dimmer`, etc.) instead of trying to infer it
  from the command class. Only a small set of command classes (like
  configurations, vendor-specific or internal values) will be excluded.
  This should greatly increase the number of supported values.

- Added support for `EnumSwitch` entities.

- Added inference for illuminance and humidity sensors.
2022-11-27 22:53:53 +01:00
ba1681fc22 Merge branch 'master' into 29-generic-entities-support 2022-11-21 12:36:01 +01:00
02f89258b8
FIX: Task.set_name only works on Python >= 3.8 2022-11-21 09:49:57 +01:00
ae17a12c12
FIX: UserManager.get_users
`UserManager.get_users` should not return a reference to the query
object, since the query object will be invalidated as soon as the
connection is closed.

Instead, it should return directly the list of `User` objects.
2022-11-21 00:57:00 +01:00
b9e6614b04
Added support for EnumSensor entities 2022-11-21 00:04:07 +01:00
d171000a0e
Initial support for sensor entities in zwave.mqtt 2022-11-14 22:08:15 +01:00
a7bc4f443c
Imports order 2022-11-14 21:30:43 +01:00
45d0e4445b
Sorted entity type names 2022-11-14 00:46:58 +01:00
211372e472
Added support for dimmers on zigbee.mqtt 2022-11-13 18:48:36 +01:00
24f5a8283c
Added PRAGMA foreign_keys = ON before deleting entities on SQLite
SQLite doesn't enable foreign keys cascade on delete by default.
2022-11-13 01:18:45 +01:00
69e097707d
Don't lock read session from the main database 2022-11-12 16:10:57 +01:00
86edd70d93
Fixed session/concurrency management on the main SQLite db
- The `declarative_base` instance should be shared
- Database `session_locks` should be stored at module, not instance
  level
- Better isolation of scoped sessions
- Enclapsulated `get_session` method in `UserManager`
2022-11-12 15:36:17 +01:00
6b7933cd33
Using a different SQLite database for entities
This prevents multiprocessing/concurrency issues when modifying the same
database file both from the main process and from the web server process
2022-11-12 02:00:55 +01:00
02a4c9f667
Added is_query_disabled attribute to entities 2022-11-11 20:40:36 +01:00
00a43dd1f8
Implemented EnumSwitch entity type
Done for `zigbee.mqtt`, other plugins will follow
2022-11-11 01:46:38 +01:00
801ed05684
Added support for binary sensors (in zigbee.mqtt for now) 2022-11-05 01:47:50 +01:00
0f19104512
Improved zigbee.mqtt node property queries.
Now handling cases of nodes with values having multiple levels (> 1) of
nested properties.
2022-11-04 22:51:40 +01:00
5ca3c06f96
Normalize device names in set_lights 2022-11-02 23:32:21 +01:00
d5f8d55b4b
Fixed zigbee.mqtt light entity conversion 2022-11-02 23:07:12 +01:00
636d1ced3a
A more robust way of splitting devices provided in the <ieee_address:value> format 2022-11-02 22:49:19 +01:00
02abef71e3
Fixes for zigbee devices polling
- Don't publish a `get` request if the device has no exposed queriable
  attributes.

- Perform the recursive build of the `get` request payload before
  checking for the `access` attribute.
2022-11-02 21:54:47 +01:00
64513be6b8
Initial implementation of sensor entities.
Implemented (at least in `zigbee.mqtt`, for now):

- `TemperatureSensor`
- `HumiditySensor`
- `VoltageSensor`
- `CurrentSensor`
- `EnergySensor`
- `PowerSensor`
- `NumericSensor` (generic fallback 1)
- `RawSensor` (generic fallback 2)
- `Sensor` (root class)
2022-11-02 16:38:17 +01:00
d7214c4c83
Fix for No converter available warnings on zigbee2mqtt
Only include readable (not state-only) properties on the payload sent to
to `zigbee2mqtt/<device>/get`.
2022-10-31 00:51:26 +01:00
a1cf671334
Added support for link_quality entities to zigbee.mqtt 2022-10-30 11:03:22 +01:00
71ccf6d04a
Support for battery sensors on zigbee.mqtt 2022-10-29 18:16:38 +02:00
42651e937b
LINT fixes on zigbee.mqtt plugin 2022-10-29 14:09:44 +02:00
d61b053f72
Support for battery entities 2022-10-29 13:38:42 +02:00
486cd66885
More LINTs 2022-10-23 21:23:19 +02:00
72c7444a45
LINT 2022-10-23 18:23:20 +02:00
951950c864
Added dimmer entities 2022-10-23 00:30:32 +02:00
1af7ece881
Added deprecation notice for zwave plugin and backend (use zwave.mqtt instead) 2022-10-22 19:17:58 +02:00
7f575bacaa
Implemented the new zwavejs2mqtt features for adding and removing nodes 2022-10-14 23:28:02 +02:00
1b791156bd
Proper support for color zigbee lights 2022-10-12 03:00:42 +02:00
2cc80e7f16
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-10-07 00:05:54 +02:00
b88983f055
Added qos argument to mqtt.publish. 2022-10-05 01:13:47 +02:00
fed7c2c6ff
Fixed typo in schema path 2022-09-30 11:30:57 +02:00
1d78c3e753
FIX: Broken docstring 2022-09-30 10:56:08 +02:00
ae226a5b01
Added tts.mimic3 integration.
Closes: #226
2022-09-30 10:51:17 +02:00
fef7aff245
LINT fixes for mpv plugin 2022-09-30 10:41:56 +02:00
4bab9d2607
[#224] Implemented Wallabag integration 2022-09-29 10:51:16 +02:00
deb25196d2
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-09-28 02:17:10 +02:00
09baceab4b
Include album_id and the list of tracks in music.tidal.get_album 2022-09-19 20:39:21 +02:00
36dd645209
Use session.playlist instead of session.user.playlist to query playlists 2022-09-18 06:04:53 +02:00
61cda60751
Proper implementation for Tidal's add_to_playlist and remove_from_playlist methods
- Using tidalapi's `UserPlaylist.add` and `UserPlaylist.delete` methods
  instead of defining my own through `_api_request`, so we won't have to
  deal with the logic to set the ETag header.

- Added `remove_from_playlist` method.
2022-09-18 05:22:12 +02:00
7c610adc84
FIX: Apply expanduser to the credentials_file setting in music.tidal 2022-09-17 06:30:20 +02:00
a9ebb4805a
Fixed doc warnings 2022-09-17 06:25:28 +02:00
e1aa214bad tidal-integration (#223)
Reviewed-on: platypush/platypush#223
2022-09-16 21:48:09 +02:00
4682fb4210
Throw an assertion error when on_duplicate_update is specified on db.insert with no key_columns 2022-09-04 16:02:37 +02:00
0143dac216
Improved support for bulk database statements
- Wrapped insert/update/delete operations in transactions
- Proper (and much more efficient) bulk logic
- Better upsert logic
- Return inserted/updated records if the engine supports it
2022-09-04 13:30:35 +02:00
1ea53a6f50
Support for query placeholders in db.select 2022-09-04 00:28:08 +02:00
61c96612bc Merge branch 'master' into 219-opml-import-export 2022-09-02 00:23:57 +02:00
6c6e68b512
Added support for OPML import and export in the RSS plugin.
[closes #219]
2022-09-02 00:21:40 +02:00
a286cf5000 Updated PopcornTime base URL 2022-09-01 11:13:16 +02:00
1880a99052
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-08-29 01:41:47 +02:00
540a7d469e
- Fixed documentation errors and warnings
- Split Matrix integration into `plugin` and `client` files.
2022-08-29 00:55:46 +02:00
c417d2f692
Implemented last Matrix integration features.
- Added presence, typing and seen receipt events.
- Added set display_name and avatar methods.
2022-08-28 15:17:11 +02:00
e479ca7e3e
Completing the Matrix plugin integration
Newly implemented actions:

- `get_messages`
- `get_room_members`
- `update_device`
- `delete_devices`
- `room_alias_to_id`
- `add_room_alias`
- `delete_room_alias`
- `kick`
- `ban`
- `unban`
- `forget`
2022-08-28 12:26:27 +02:00
d890b6cbe8
Added create_room action 2022-08-27 23:26:42 +02:00
912168626c
Added join_room, leave_room and invite_to_room and extended handling on invitation events 2022-08-27 21:50:48 +02:00
513195b396
Implemented support for file upload 2022-08-27 15:12:50 +02:00
48ec6ef68b
Implemented proper support for encrypted media and added download method 2022-08-26 23:48:29 +02:00
e4eb4cd7dc
More granular control over trusted devices, and added global synchronization event 2022-08-25 00:34:01 +02:00
c89c712928
Fixed device trust process 2022-08-24 01:49:43 +02:00
05908e1a77
Fixing key verification process 2022-08-17 10:28:31 +02:00
c04bc8d2bc
The matrix plugin joins the AsyncRunnablePlugin family too 2022-08-15 02:18:29 +02:00
2797ffbe53
The websocket plugin now extends AsyncRunnablePlugin too 2022-08-15 02:18:29 +02:00
770a14daae
ntfy plugin migrated to AsyncRunnablePlugin.
This commit removes a lot of the loop management boilerplate.
2022-08-15 02:18:29 +02:00
dba03d3e33
Added AsyncRunnablePlugin class.
This class handles runnable plugins that have their own asyncio event
loop, without the pain usually caused by the management of multiple
threads + asyncio loops.
2022-08-15 02:18:28 +02:00
f4672ce5c3
Refactored concurrency model in ntfy plugin 2022-08-15 02:18:28 +02:00
9e2b4a0043
Removed references to deprecated websockets attributes 2022-08-15 02:18:28 +02:00
dc7ba881f1
Merge branch 'master' into matrix-integration 2022-08-12 14:39:13 +02:00
4e1e6da67e
Added recv action on websocket plugin 2022-08-12 14:16:01 +02:00
354f3906f9
Changed autojoin_on_invite default value 2022-08-12 00:11:15 +02:00
7ab02e705d
Removed redundant _action_wrapper decorator 2022-08-05 19:04:43 +02:00
cbe2e7bbfe
[WIP] 2022-08-04 03:08:54 +02:00
c32142c8b5
Added wait_stop() method to RunnablePlugin 2022-07-23 17:33:23 +02:00
cc29136db7
[#2] Support for caching rooms info and exposing them in the events 2022-07-15 00:37:21 +02:00
719bd4fddf
[#217 WIP] Initial plugin implementation.
- Added initial synchronization and users cache.
- Added loop to poll for new events (TODO: use websocket after the first sync)
- Added login, sync and join actions
2022-07-14 01:50:46 +02:00
3513ee3e1c
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-07-08 23:13:36 +02:00
c6c7128099
Wrapped clipboard management logic in a try-except block to prevent the clipboard plugin from failing hard 2022-06-14 16:47:52 +02:00
8d26c8634d Keep the ntfy process in stop_wait state even when the plugin is configured with no subscriptions 2022-06-09 11:59:29 +02:00
115bed7d8b
Added limit parameter to lastfm.get_similar_tracks 2022-06-06 14:12:45 +02:00
3d22d6b082
Added get_track and get_similar_tracks methods on lastfm plugin 2022-06-05 18:49:34 +02:00
5971ec32c8
Removed clipboard backend.
The relevant clipboard monitoring logic has been moved to the
`clipboard` plugin. Thus, enabling the plugin should provide all the
feature, with no need for an additional backend.
2022-06-04 12:32:02 +02:00
0d0995d71d
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-06-02 20:58:34 +02:00
cb7021152f
Added get_recent_tracks method to the lastfm plugin 2022-06-02 20:57:35 +02:00
d3f4865395
Fixed variable name conflict 2022-06-02 01:44:38 +02:00
f080478385
s/click_url/url/g in ntfy message definitions 2022-06-02 00:40:26 +02:00
2898a33752
s/click_url/url/g in ntfy message definitions 2022-06-02 00:36:14 +02:00
0919a0055d
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-06-02 00:13:43 +02:00
8be515c17b
[closes #219] Added ntfy integration 2022-06-01 23:01:29 +02:00
1df71cb54a
Proper support for light entities on smartthings 2022-05-30 09:23:05 +02:00
89560e7c38
Only include entities associated to enabled plugins or with no plugins in entities.get 2022-05-29 23:59:46 +02:00
30dfdeecb0
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-05-25 10:11:57 +02:00
7a0e39111d FIX: A feed entry may not necessarily have an id attribute 2022-05-06 14:38:25 +02:00
f57f940d57
Made _is_switch more resilient against rogue Z-Wave values 2022-05-01 22:18:46 +02:00
117f92e5b4
Deprecated the light.hue backend
The polling logic has been moved to the `light.hue` plugin itself
instead, so it's no longer required to have both a plugin and a backend
enabled in order to fully manage a Hue bridge.
2022-05-01 21:55:35 +02:00
a5541c33b0
Added support for light entities in zigbee.mqtt
TODO: Support for colors (I don't have a color Zigbee bulb to test it on yet)
2022-05-01 21:10:54 +02:00
8d91fec771
Better implementation for light.hue.set_lights 2022-05-01 15:33:12 +02:00
c22c17a55d
More flexible implementation for LightPlugin abstract methods 2022-05-01 15:31:45 +02:00
46df3a6a98
FIX: reachable is an attribute of state 2022-05-01 01:58:05 +02:00
30a024befb
Manage hue/sat/bri/ct light ranges on the light entity object itself 2022-04-30 19:38:50 +02:00
d29b377cf1
Exclude deleted lights/groups/scenes from the returned lists 2022-04-30 01:39:39 +02:00
8d57cf06c2
Major refactor for the light.hue plugin.
- Added support for lights as native platform entities.
- Improved performance by using the JSON API objects whenever possible
  to interact with the bridge instead of the native Python objects,
  which perform a bunch of lazy API calls under the hood resulting in
  degraded performance.
- Fixed lights animation attributes by setting only the ones actually
  supported by a light.
- Several LINT fixes.
2022-04-30 01:07:00 +02:00
d22fbcd9db
Merge branch 'master' into 191-support-for-general-entities-backend-and-plugin 2022-04-28 01:58:24 +02:00
da73a5f1b9
Replaced deprecated json_output arg in NextCloud client with response.json_data 2022-04-26 19:30:26 +02:00
47f8520f3b
Added support for description/read_only/write_only on entity level 2022-04-24 22:18:29 +02:00
9981cc4746
Backend support for entities deletion 2022-04-24 21:38:45 +02:00
ef6b57df31
Added entity info modal and (partial) support for renaming entities 2022-04-23 01:01:14 +02:00
332c91252c
zwave.mqtt.status renamed to controller_status, while status should return the current state of the values 2022-04-12 23:44:14 +02:00
548d487e73
Publish a switch entity from zigbee.mqtt only if the update includes its state 2022-04-12 14:41:21 +02:00
be4d1e8e01
Proper support for native entities in zigbee.mqtt integration 2022-04-11 21:16:45 +02:00
db4ad5825e
Fire an EntityUpdateEvent when the zwave.mqtt backend gets a value changed message 2022-04-11 01:40:49 +02:00
4471001110
smartthings.toggle should properly publish the updated entity 2022-04-11 00:43:31 +02:00
17615ff028
Support for multiple entity types/plugins filter on entities.get 2022-04-10 21:23:03 +02:00
f52b556219
- icon_class should not be part of the backend model
- Interaction with entities should occur through the `entities.action`
  method, not by implementing native methods on each of the model
  objects
2022-04-08 16:49:47 +02:00
3b4f7d3dad
Added entities plugin to query/action entities 2022-04-07 00:22:54 +02:00
d52ae2fb80
Implemented RunnablePlugin.wait_stop() utility method 2022-04-05 23:33:02 +02:00
061268cdaf
Support for direct actions on native entities [WIP] 2022-04-05 23:22:54 +02:00
8a70f1d38e
Replaced deprecated sqlalchemy.ext.declarative with sqlalchemy.orm 2022-04-05 22:47:44 +02:00
b43ed169c7
Added support for switches as native entities to zwave.mqtt plugin 2022-04-05 20:22:47 +02:00
0dac2c0e92
Fixed handling of possible null device definition in zigbee.mqtt 2022-04-05 00:31:04 +02:00
28b3672432
Added native support for switch entities to the zigbee.mqtt plugin. 2022-04-05 00:07:55 +02:00
9f2793118b
black fix 2022-04-04 22:43:04 +02:00
9d9ec1dc59
Added native support for switch entities to the smartthings plugin 2022-04-04 22:41:04 +02:00
b9c78ad913
Added native support for switch entities to switchbot.bluetooth plugin 2022-04-04 21:12:59 +02:00
91ff8d811f
Added native entities support in switchbot plugin 2022-04-04 20:56:28 +02:00
53da19b638
Added entities engine support to WeMo switch plugin 2022-04-04 17:22:55 +02:00
2c4c27855d
Added .exception action to logger plugin 2022-04-04 17:22:54 +02:00
4ee7e4db29
Basic support for entities on the local db and implemented support for switch entities on the tplink plugin 2022-04-04 16:50:17 +02:00
486801653a
Added .exception action to logger plugin 2022-04-03 00:26:39 +02:00
ffd23cf04d [#212] Support for asynchronous event monitoring on the GPIO plugin 2022-03-27 16:14:30 +02:00
fdf6d8fb4e
Better auto-generated documentation and fixed docstring warnings 2022-03-03 20:26:25 +01:00
0d0797a465
Added Jellyfin integration 2022-03-01 01:32:50 +01:00
71cb73cf63
FIX: The CN of the organizer may not necessarily be set in calendar.ical 2022-02-17 10:55:35 +01:00
94bb3e0541
Added TOC to readme and more LGTM fixes 2022-02-09 21:06:49 +01:00
29a7eff15a
Fixed/suppressed LGTM warnings 2022-02-08 21:51:37 +01:00
786286eac6
Refactored D-Bus integration
- Added ability to listen for signals
- Improved introspection output
- `dbus` plugin and backend have now been merged
- Migrated from `dbus` to `pydbus`
2022-02-07 15:45:43 +01:00
1914322fda
FIX: get_plugin methods should never swallow errors in case of failed initialization 2022-02-07 01:47:38 +01:00
6656bb4ce5
Revert "Support for SSL flag on MQTT plugins without having to specify other tls_* options"
This reverts commit f3be4a50d8.
2022-01-14 21:53:24 +01:00
f3be4a50d8
Support for SSL flag on MQTT plugins without having to specify other tls_* options 2022-01-14 21:39:16 +01:00
a46ce79f0a
Added guard against null variable names 2022-01-06 00:58:14 +01:00
e9f6d9a8bc
Refactored RSS integration into its own rss plugin [closes #199] 2022-01-06 00:46:05 +01:00
3e4b91cd6c
Removed pytz dependency 2022-01-05 18:04:32 +01:00
e242dc53bf FIX: All timestamps should be isoformat strings, otherwise come comparisons may break 2022-01-05 13:39:13 +01:00
ee0b6d237a FIX: Timestamps on calendar parsed objects should be of type string, not datetime 2022-01-05 13:35:10 +01:00
9ba2c18595 Better logic for timezone handling/conversion in calendar plugin 2022-01-05 13:31:07 +01:00
20fc3d91fc
Updated Chromecast plugin to work with pychromecast >= 10.0
pychromecast 10.0 introduced some [breaking changes](https://github.com/home-assistant-libs/pychromecast/pull/556/files)
in the declaration of the Chromecast object -
namely, the `device` attribute has been renamed to
`cast_info`. The code of ChromecastPlugin has been
updated to guarantee compatibility in both cases.
2021-12-11 22:14:47 +01:00
2560bfa03f
Plex searcher extended to include also audio tracks 2021-12-04 00:08:47 +01:00
46d8d575ba
Handle and log media workers search errors 2021-12-03 21:54:41 +01:00
Fabio Manganiello
6023fd3db3 Given the new object-oriented design of the LTR559 library, the sensor object should be initialized in __init__ and read upon get_measurement() 2021-11-28 15:11:20 +01:00
Fabio Manganiello
f6057274a0 Variable name fix 2021-11-28 11:32:03 +01:00
Fabio Manganiello
2d9dff7d4c Fixed LTR559 integration after a change in the core library interface 2021-11-28 11:25:41 +01:00
e615891bf3
Fixed missed assignment 2021-11-27 02:00:43 +01:00
02b5ec1d38
Fixed regex typo 2021-11-27 01:43:57 +01:00
2914a74b75
Replace relative links in converted markdown 2021-11-27 01:19:55 +01:00
1e1bf46f32
Fixed handling of URLs on Pushbullet notes 2021-11-26 19:07:44 +01:00
848b736d6e
Support for output format type on http.webpage.simplify even when outfile is not specified 2021-11-26 19:07:15 +01:00
f9f9c38a8b
Improved robustness of ICal event parser 2021-11-21 23:50:35 +01:00
518d9f20c6
Added docs for config plugin 2021-11-17 23:59:17 +01:00
6ba3128ac4
[#201] Added Mailgun integration 2021-11-14 22:40:59 +01:00
d7b273434b
[#203] Added IRC integration 2021-11-14 19:43:19 +01:00
acdc636b1f Resolve "Mastodon integration" 2021-11-07 01:00:29 +01:00
6db070db1c
- Fixed switchbot.status to handle virtual devices
- Fixed StrippedString schema field serialize handler

- Fixed rendering of lists in documentation schemas
2021-10-26 00:48:05 +02:00
952a2a9379
- Render nested attributes in schemas
- Provide relevant examples for schema fields with no description/examples based on the field type

- Fixed RST warnings in Slack plugin

- Fixed list of events in ngrok plugin
2021-10-24 11:53:38 +02:00
1906876969
FIX: Replaced VLC event.u occurrences
Newer versions of python-vlc have apparently
removed the `event.u` union object from the
events dispatched by the player, resulting in
player callback failures.

The occurrences of `event.u` have therefore
been replaced with the player methods to
correctly retrieve the current state.
2021-10-17 17:56:57 +02:00
f9ce03919b
FIX: Various omxplayer fixes
- Better synchronization with the player upon `play` request - wait until the play started event is received before returning the status

- DBus exceptions should be caught and handled in the status call
2021-10-17 16:54:57 +02:00
c3681e7b2a
FIX: Don't try and set the volume of the omxplayer when the instance may not be ready yet 2021-10-17 16:38:38 +02:00
144700b693
media.mpv should send MediaPlayRequestEvent with player and plugin parameters 2021-10-17 16:17:20 +02:00
4a5bb766af
Fixed some media plugins inconsistencies
- Removed replication of logic between media.get_youtube_url (action) and media.get_youtube_video_url (internal method)

- Added differentiation between MediaPlayEvent and MediaResumeEvent
2021-10-17 16:03:57 +02:00
8c339d0d55
Added support for custom YouTube preferred video/audio formats 2021-10-17 02:53:38 +02:00
64c402b1c0 [#115] Added google.maps.get_travel_time method 2021-10-16 22:35:37 +02:00
31ef9515f8 Added support for virtual IR devices in Switchbot plugin 2021-10-02 23:44:13 +02:00
04a5480d19 Resolve "[Feature Request] Gotify Push Intergration" 2021-10-01 23:50:53 +02:00
68831e9e81 [#196] Added ngrok integration 2021-09-25 01:34:45 +02:00
d18245b15f Fixed Slack plugin docs 2021-09-22 00:38:34 +02:00
f147c44a8a Fixed docs issues 2021-09-22 00:19:14 +02:00
1a314ffd6b Fixed LGTM errors and warnings 2021-09-17 22:21:29 +02:00
85af031c26 Empty torrent responses can sometimes include the objects as an empty list instead of an empty dict 2021-09-17 10:47:01 +02:00
7b8938cb12 Fixed LGTM errors and warnings 2021-09-17 00:47:33 +02:00
3bfc5b83ef Moved to manifest files for describing plugins and backends and their dependencies 2021-09-16 17:53:40 +02:00
a8064d2add parse_magnet_uri can return either a metadata object or a dict depending on the libtorrent version 2021-08-05 20:23:54 +02:00
90ec108580 Added Slack integration 2021-07-28 01:09:09 +02:00
371dd6da0a Added sun plugin [closes #194] 2021-07-22 01:02:15 +02:00
1483d602f8 Added music.spotify UI integration 2021-07-20 01:35:21 +02:00
35c4a30a63 Added music.spotify plugin and refactored MusicPlugin 2021-07-17 22:14:15 +02:00
03631bcebc Fixed import error in Adafruit.IO 2021-07-04 23:49:18 +02:00
a39452124d Refactored PCA9685 backend 2021-05-17 15:32:43 +02:00
7ee869ce42 More robust logic for smooth transients on PCA9685 2021-05-16 18:14:02 +02:00
df36a9f811 s/execute/write/ 2021-05-16 17:53:22 +02:00
abf793e703 Added get_channels() method to PCA9685 driver 2021-05-16 17:51:51 +02:00
132c659d3c Reset self._pca to None on deinit() 2021-05-16 17:42:05 +02:00
acc4f1c0e3 Added PCA9685 PWM driver plugin 2021-05-16 17:29:03 +02:00
9eab526e47 Specify propertyKey on set_value() if exposed/required by the value payload [see #188] 2021-05-13 22:38:04 +02:00
8f6404d0b1 Revert "Support for custom timeout on MQTT message publish" (already implemented in the current logic) 2021-05-13 21:49:24 +02:00
b42c491390 Support for custom timeout on MQTT message publish 2021-05-13 21:33:08 +02:00
18e99c6f12 Added new Google Fit scopes for sleep and heart rate read 2021-05-10 21:21:03 +02:00
664ce4050d Added Switchbot plugin 2021-05-10 18:43:00 +02:00
46aef7c8b5 autodoc fixes 2021-05-08 21:38:32 +02:00
ce882381c0 Fixes to torrent search + SASS library migration
- Support for custom PopcornTime API mirror/base URL.

- Full support for TV series search.

- Fixed torrent search (now using a different PopcornTime API mirror).

- Migrated SASS engine from `node-sass` (currently deprecated and broken on Node 16) to `sass`.

- Fixed alignment of Z-Wave UI header on Chrome/Webkit.
2021-05-06 23:18:47 +02:00
2224681e3c Removed OZW type references altogether to prevent import errors 2021-04-18 02:27:33 +02:00
68c44c0c3c OZW objects should be imported inside of the ZwavePlugin class to prevent ImportError on other Z-Wave plugins that don't depend on OZW 2021-04-18 02:19:53 +02:00
02a22d4a88 The zwave and zwave.mqtt plugins should extend a common abstract class instead of having a zwave.mqtt -> zwave functional dependency that introduces the PyOWZ dependency into zwave.mqtt 2021-04-16 20:54:07 +02:00
c006c4b368 Added zwave.mqtt plugin and backend [closes #186] 2021-04-12 02:45:59 +02:00
f1faa1141e More LINT fixes 2021-04-06 21:10:48 +02:00
2a78f81a7b Major LINT fixes 2021-04-05 00:58:44 +02:00
99831bf0c7 Fix compatibility with all versions of websocket-client, regardless of the list of arguments required by the callbacks (either ws as a first argument or not) 2021-04-02 19:27:25 +02:00
Fabio Manganiello
4313b6e883 media.vlc.status should synchronize on _stop_lock, or it may fail in the middle of its execution if the VLC session is being freed 2021-03-24 15:02:05 +01:00
9e46ab0b60 Wait for _on_stop_event in media.vlc.stop before releasing the instance 2021-03-16 22:34:03 +01:00
14f1c44378 - If a Z-Wave event includes an explicit value update then explicitly set that value on the node, in order to prevent issues with Z-Wave value updates not yet propagated to the node structure
- Added Z-Wave switch component
2021-03-16 20:52:30 +01:00
f92d19a24e media.vlc.stop should be synchronized on the _stop_lock and should call _reset_state instead of simply setting self._player = None 2021-03-16 19:42:59 +01:00
1d3d741212 Fixed Sphinx build warnings 2021-03-14 01:09:01 +01:00
cef310ffd7 Added missing methods docs 2021-03-12 01:53:16 +01:00
02f6845e72 - Added weather.openweathermap plugin and backend, as a replacement for Darksky [closes #177]
- Added note to the Darksky plugin about the decomissioning of the API by the end of the year
2021-03-12 01:31:26 +01:00
4902475caf Added active_scan mode to bluetooth.scanner backend to actively perform a lookup name on each device discovered at least once [see #174] 2021-03-09 11:50:59 +01:00
d860d8aef1 Added SmartThings switch web plugin 2021-03-05 21:29:32 +01:00
Fabio Manganiello
47ba13d985 calendar.ical.get_upcoming_events should fail hard if there was any exception/unsuccessful response
The error should not be swallowed and it should be instead propagated up
to calendar.get_upcoming_events, if it's called from that context. And
calendar.get_upcoming_events should be in charge of handling the
exceptions and make sure that failing to retrieve the events for one
calendar doesn't make the whole method fail.
2021-03-05 11:16:14 +01:00
4ada1c663d Added SmartThings plugin [#148] 2021-03-05 02:23:28 +01:00
210cefc1a4 General improvements on the Zeroconf plugin and backend 2021-03-03 19:20:12 +01:00
0e3845ef88 The vlc _reset_state logic should be wrapped within a lock context to make sure that two threads don't try to deallocate the context at the same time 2021-02-28 20:56:32 +01:00
833f810d4b Fixed stop handler for vlc plugin.
For some reason, vlc event handlers are not re-entrant (https://github.com/oaubert/python-vlc/issues/44#issuecomment-378520074).

This means that the vlc API can't be used from an event handler,
and that an event handler that reacts to stop/end-of-stream by
releasing the player and the vlc instance will likely get stuck
and the app may eventually die with SIGSEGV.

Because of this design limitation on the vlc side, the plugin has
to run another thread in the main app that monitors the stop event
set by the event handler and releases the resources appropriately.
2021-02-28 13:03:10 +01:00
d190560536 Support for media.vlc.play toggling paused state if called with no arguments, and MediaPlayRequestEvent should have player and plugin attributes set 2021-02-28 01:40:29 +01:00
e0e3081eb1 VLC volume should strictly be an integer 2021-02-28 01:31:00 +01:00
66445cb4e4 - Do not parse Zeroconf info at all if not available
- Temporarily skip test_procedure until I find a proper way to clean up the status from the previous run and start a fresh platform
2021-02-27 21:11:37 +01:00
f93df2fd49 Avoid the loop on the Zeroconf addresses object if the object is None (e.g. in the context of some tests) 2021-02-27 20:55:38 +01:00
0d806eeb6e - Removed setUp method from test_event_parse - let the parent setUp run and properly start the daemon
- More resilient logic in case some entries in the Zeroconf registry are still loading and the info object is still None
2021-02-27 20:51:48 +01:00
Fabio Manganiello
b27c9ee630 Make sure to always run .quit() on the _player instance on stop/exit event, even if the player is already stopped, otherwise the OMXPlayer session may be hanging in the background and prevent new DBus connections 2021-02-22 14:22:45 +01:00
ffb7a3e5a3 Extended and updated pieces of documentation on the HTTP server, Zigbee2mqtt and mpd. Also added example dashboard template and event hook script. 2021-02-22 01:20:01 +01:00
Fabio Manganiello
6f9428487f Higher priority to gstreamer plugin over omxplayer for tts 2021-02-21 02:44:26 +01:00
6b5b50d186 Migrated switches plugin 2021-02-19 20:47:29 +01:00
56f8d85feb Migrated switches web panel and refactored switch plugins to expose a more consistent interface 2021-02-19 02:54:12 +01:00
748609c6f4 Migrated settings panel and logout button 2021-02-15 23:09:27 +01:00
b3c28f6773 Added support for JWT token-based authentication 2021-02-12 22:43:34 +01:00
06ca5be54b Still support default host/port fallback on mqtt.publish 2021-02-12 02:19:36 +01:00
3cf91a3f27 Fixed backend.zigbee.mqtt to work with the new zigbee2mqtt API 2021-02-11 23:50:28 +01:00
1a70c6ea0b Fixed remaining Zigbee groups and binding methods to work with the new zigbee2mqtt API [see #163] 2021-02-10 02:00:52 +01:00
1eedcaf2be Moved more zigbee2mqtt methods to the new API 2021-02-09 02:33:43 +01:00
b8979040da Fixed device_get and device_rename to use the new zigbee2mqtt API 2021-02-08 01:45:21 +01:00
816492d3b2 Fixed MQTT over SSL default version spec in case the parameter is not a string 2021-02-08 01:44:26 +01:00
0bddbb0bca Merge branch 'master' into vuejs 2021-02-06 14:46:08 +01:00
314c01ef97 Refactored Zigbee backend and remove unused logic for keeping devices up-to-date 2021-02-06 14:45:50 +01:00
4c5a52417e Support for new zigbee2mqtt API and protocol (see #163) 2021-02-06 02:19:15 +01:00
2abfb2964c Merge branch 'master' into vuejs 2021-02-04 01:57:36 +01:00
4858dbc060 Back/forward seek changed from 60 to 30 2021-02-04 01:56:28 +01:00
Fabio Manganiello
2834ed2a7c Refactored and fixed many bugs on the media.omxplayer plugin 2021-02-04 01:44:21 +01:00
Fabio Manganiello
165f85f8dc Added support for background shell commands 2021-02-04 01:43:51 +01:00
Fabio Manganiello
7f24b82281 Removed deprecated media.ctrl plugin 2021-02-03 22:13:10 +01:00
7e1d232942 Another fix bites the dust 2021-02-03 17:47:33 +01:00
31a7ecee03 Quick fix 2021-02-03 17:46:05 +01:00
346bd9602d The whole get_plugin/.status() block should be under try/except 2021-02-03 17:44:40 +01:00
673351db51 Don't fail if a media plugin can't be imported 2021-02-03 17:43:26 +01:00
86ebc4fae9 Get the plugin name, not the object 2021-02-03 17:42:20 +01:00
118540db8c Fixed unreferenced var 2021-02-03 17:41:06 +01:00
a1d6c4fbe4 Added missing Config import 2021-02-03 17:39:55 +01:00
2bb07ae191 Fixed base class name 2021-02-03 17:39:16 +01:00
1920bd80a3 First search among the configured media plugins in media.ctrl plugin 2021-02-03 17:34:33 +01:00
8e2d590e62 Merge branch 'master' into vuejs 2021-01-23 15:06:14 +01:00
Fabio Manganiello
31b110a06c FIX: zigbee2mqtt applies different logic to /<device_name> and /<device_name>/get 2021-01-22 16:24:43 +01:00
Fabio Manganiello
717ad5d88c Revert "FIX: zigbee2mqtt /get calls require a property field specified on the message"
This reverts commit 7ff08a9587.
2021-01-22 16:13:18 +01:00
Fabio Manganiello
cc839620cf FIX: zigbee2mqtt /get calls require a property field specified on the message 2021-01-22 01:03:52 +01:00
Fabio Manganiello
7a7e00bea2 Migrated music.snapcast UI 2021-01-22 01:00:49 +01:00
Fabio Manganiello
7ff08a9587 FIX: zigbee2mqtt /get calls require a property field specified on the message 2021-01-22 00:45:52 +01:00
Fabio Manganiello
370a7d4c15 Added frontend support for Plex 2021-01-18 01:28:10 +01:00
Fabio Manganiello
85f56cf98c New media panel [WIP] 2021-01-14 00:15:35 +01:00
Fabio Manganiello
6ae76f1f38 Migrating media plugins [WIP] 2021-01-05 00:50:24 +01:00
Fabio Manganiello
e127f2597c music.mpd refactor WIP 2020-12-31 01:36:02 +01:00
Fabio Manganiello
b4fc734a15 music.mpd panel migration - WIP 2020-12-26 15:03:12 +01:00
Fabio Manganiello
5d4f4b0378 Support for subscribe-once/unsubscribe frontend events mechanisms 2020-12-15 00:01:28 +01:00
Fabio Manganiello
0db997c6a0 transitiontime is not supported on hue/sat/bri change 2020-12-14 16:31:24 +01:00
Fabio Manganiello
5e7c6c26c9 Migrating lights panel WIP 2020-12-14 02:13:55 +01:00
Fabio Manganiello
2de1e3ebe6 Lights panel migration - WIP 2020-12-09 21:16:07 +01:00
Fabio Manganiello
0cd120f492 New template for index panel 2020-11-30 20:57:00 +01:00
Fabio Manganiello
39abdfe40a New Vue.js template for dashbord WIP 2020-11-21 01:12:08 +01:00
Fabio Manganiello
c7711d75a1 New pychromecast has replaced host/port with uri 2020-11-11 03:07:42 +01:00
Fabio Manganiello
711ea543bb Use youtube-dl to extract the video URL instead of streaming its content to a local sock file 2020-11-11 03:07:23 +01:00
Fabio Manganiello
a07cb6ec3d Explicit cast of possible dict_keys element to list() before copy() 2020-11-10 22:53:12 +01:00
Fabio Manganiello
c5dc9333f0 Extended light plugin status method signature 2020-10-28 23:19:16 +01:00
Fabio Manganiello
77530b4a06 Use a threading Event to synchronize with the Hue animation thread instead of relying on the Redis backend 2020-10-14 00:18:23 +02:00
Fabio Manganiello
37e006d86e Refined Tensorflow train methods 2020-10-12 01:06:32 +02:00
Fabio Manganiello
8d7e790eda More descriptive attribute names for the Tensorflow predict response.
Using `outputs` instead of `values` and `predictions` instead of `labels`.
2020-10-02 01:17:34 +02:00
Fabio Manganiello
daaa0050d1 Squeeze the extra dimensions in a grayscale image and pass the model name to the response objects 2020-10-01 18:50:36 +02:00
Fabio Manganiello
287b6303ae More flexible module loading and better lock management for models in Tensorflow plugin 2020-10-01 17:41:12 +02:00
Fabio Manganiello
9e6c40d393 media.gstreamer added to the list of compatible media plugins 2020-09-29 15:37:46 +02:00
Fabio Manganiello
05b0a7f14d Added GStreamer media plugin [closes #151] 2020-09-29 15:32:40 +02:00
Fabio Manganiello
6ad5397a25 Removed unused import 2020-09-28 22:13:42 +02:00
Fabio Manganiello
0a9c4fc3a7 Added GStreamer camera plugin [relates to #151] 2020-09-28 22:10:56 +02:00
Fabio Manganiello
e9d9ef252f Frames directory should be created in 0o755 mode 2020-09-28 02:33:27 +02:00
Fabio Manganiello
df1e03f0af Added FFmpeg camera plugin [relates to #150] 2020-09-27 12:52:07 +02:00
Fabio Manganiello
c269c62fe6 Refactored logging names 2020-09-27 01:33:38 +02:00
Fabio Manganiello
6e6092e4b2 Do proper decapsulation for PiCamera wrapped object when reinitialized 2020-09-25 18:25:33 +02:00
Fabio Manganiello
ac42f7eba4 Make sure that the PiCamera session is properly closed and re-opened on each stream request 2020-09-25 18:06:27 +02:00
Fabio Manganiello
258a9b57ce release_device should not fail hard if stop_recording or close fail on ConnectionError 2020-09-25 17:42:21 +02:00
Fabio Manganiello
28409b8688 The device should be released after each streaming session 2020-09-25 17:34:53 +02:00
Fabio Manganiello
c12e7bab90 The streaming thread shouldn't fail and exit if it fails closing a client socket 2020-09-25 17:28:25 +02:00
Fabio Manganiello
09f9e974b1 Camera plugins refactor 2020-09-25 17:19:43 +02:00
Fabio Manganiello
c0f7cc0782 Added NextCloud integration [closes #149] 2020-09-10 11:10:26 +02:00
Fabio Manganiello
a650840429 Refactored variable plugin 2020-09-09 02:14:59 +02:00
Fabio Manganiello
4d0d467292 PIL JPEG format name typo fix 2020-09-08 18:14:49 +02:00
Fabio Manganiello
83122becdb Applied degrees -> PIL rotation ID conversion to the output image 2020-09-08 18:03:18 +02:00
Fabio Manganiello
53ddbad7ce Refactored MLX90640 plugin and HTTP route to work with direct BytesIO - it improves performance over using temporary files or base64-encoded responses 2020-09-08 17:51:46 +02:00