Commit graph

2708 commits

Author SHA1 Message Date
dd80dc998c
Show entity icon and type in the list of children entities on EntityModal. 2023-03-22 21:26:59 +01:00
239dd17f23
Exclude from the list of display children on EntityModal those with no name or that are configuration values. 2023-03-22 16:38:38 +01:00
e10bec88c0
Noisy beacons logging trace moved from info to debug. 2023-03-22 16:31:57 +01:00
5dd95362a1
Include links both to the parent and children entities in EntityModal. 2023-03-22 16:20:29 +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
486f37a45e
Support sensor value reported both on value as well as _value fields. 2023-03-22 14:11:13 +01:00
bfc87e0f7b
Display arrays and objects in the entity modal as prettified JSON. 2023-03-22 13:50:35 +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
e9abb5cb9a
Implemented support for child entities in entity modals. 2023-03-21 16:02:02 +01:00
b1cb7ef847
Added a list of excluded_manufacturers to BluetoothPlugin. 2023-03-21 14:32:45 +01:00
718e0434ba
Display all available entity attributes on EntityModal. 2023-03-20 14:32:03 +01:00
78bbe71be1
Another .pull-right fix. 2023-03-20 02:04:32 +01:00
3743ee4f00
s/TheengsGateway/TheengsDecoder/g now that the pip package has been published. 2023-03-20 01:41:21 +01:00
431dedf3eb
BluetoothDevice moved to its own component, with device connect support. 2023-03-20 01:28:12 +01:00
0a4b22c12e
Implemented connect/disconnect call on BluetoothService component. 2023-03-20 01:27:47 +01:00
714f853751
Pass the list of children to the entity component. 2023-03-20 01:27:21 +01:00
a011de890b
Better .pull-right class implementation. 2023-03-20 01:26:48 +01:00
2b5596820b
Made Types.objectsEqual method more robust against null input 2023-03-19 22:50:23 +01:00
71a3481560
Better style for the sidebar/nav 2023-03-19 22:23:37 +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
aa04741daa
Added BluetoothService UI component 2023-03-19 12:53:23 +01:00
f74fab795d
Added parent component value to Entity. 2023-03-19 12:50:45 +01:00
243de15813
Added connected flag to BluetoothService. 2023-03-19 12:49:38 +01:00
256d9adbf2
Removed children from BluetoothDevice.to_json - it makes events too verbose 2023-03-19 12:48:11 +01:00
4144e4f842
Fixed self._ip_to_dev expansion 2023-03-19 12:47:07 +01:00
878fe91155
Big rewrite/refactor of the entities merger 2023-03-19 12:40:48 +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
4bc61133c5
The Entity object should also have a to_json method. 2023-03-12 23:01:51 +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
31552963c4
EntitiesDb.upsert should return a deep copy of the upserted entities.
Not the upserted entities themselves, no matter if expunged or made transient.

Reminder to my future self: returning the flushed entities and then using them
outside of the session or in another thread opens a big can of worms when using
SQLAlchemy.
2023-03-10 12:06:36 +01:00
f45e47363d
Use lazy='joined' instead of lazy='selectin' on Entity.parent.
That's the best way to ensure that all the columns are fetched eagerly and
prevent errors later when trying to access lazily loaded attributes outside
of the session/thread.
2023-03-10 12:01:23 +01:00
8ccf3e804d
Added utility get_entities_engine() function. 2023-03-10 11:49:23 +01:00
60da930e4b
Added support for get_plugin(MyPlugin) besides get_plugin('my'). 2023-03-10 11:47:39 +01:00
3fcc9957d1
A dirty fix to prevent DetachedInstanceError when accessing the parent entity. 2023-03-10 11:45:44 +01:00
ceb7a2f098
EntitiesEngine synchronization improvements.
- Added `wait_start()` method that other threads can use to synchronize
  with the engine and wait before performing db operations.

- Callback logic wrapped in a try/except block to prevent custom
  integrations with buggy callbacks from crashing the engine.
2023-03-10 00:57:24 +01:00
73dc2463f1
Added auto_commit=False to entities.save() 2023-03-10 00:40:51 +01:00
7e92d5f244
Added recursive .copy() method to Entity. 2023-03-09 22:35:31 +01:00
9f9ee575f1
Added _import_error_ignored_modules.
ImportErrors on these entity modules will be ignored when dynamically
loading them, since they have optional external dependencies and we
shouldn't throw an error if we can't import them.
2023-03-09 01:40:35 +01:00
c4efec6832
Several fixes and improvements on the entities engine.
- Support for an optional callback on `publish_entities` to get notified
  when the published object are flushed to the db.

- Use `lazy='selectin'` for the entity parent -> children relationship -
  it is more efficient and it ensures that all the data the application
  needs is loaded upfront.

- `Entity.entity_key` rolled back to `<external_id, plugin>`. The
  fallback logic on `<id, plugin>` created more problems than those it
  as supposed to solve.

- Added `expire_on_commit=False` to the entities engine session to make
  sure that we don't get errors on detached/expired instances.
2023-03-09 01:16:04 +01:00
1781a19a79
s/Entity.to_json/Entity.to_dict/g
stuff
2023-03-06 23:46:33 +01:00
b9efa9fa30
entity_key should coalesce (entity.external_id or entity.id) 2023-03-06 16:54:02 +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
ead4513915
Added optional unit column to RawSensor entity. 2023-03-03 01:59:27 +01:00
7be55e446f
Convert UUID objects to strings when serializing to JSON. 2023-03-02 21:58:26 +01:00
15fadb93bb
Added stand-alone connect and disconnect actions to bluetooth. 2023-02-25 01:59:35 +01:00
70d1bb893c
A cleaner way of calculating the success response attribute. 2023-02-25 01:58:09 +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
e1b3d52706
Added StepsSensor entity. 2023-02-23 00:45:58 +01:00
dcab766cef
Only scan for the configured Bluetooth service UUIDs. 2023-02-22 03:36:16 +01:00
d8c429f4a8
Major improvements on the entities engine.
- Better logic to recursively link parent/children entities, so partial
  updates won't get lost.

- Removed `EntitiesCache` - it was too much to maintain while keeping
  consistent with the ORM, and it was a perennial fight against
  SQLAlchemy's own cache.

- Removed `EntityNotifier` - with no need to merge cached entities, the
  `notify` method has become much simpler and it's simply been merged
  in the `EntitiesRepository`.
2023-02-22 02:53:45 +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
dc7cbe743d
Refactored/improved RawSensor entity.
It will now automatically deal with most of the native types and convert
them to strings on the db.
2023-02-22 02:19:19 +01:00
b2ffc08c89
s/MultiValueSensor/CompositeSensor/g on smartthings 2023-02-22 02:18:12 +01:00
340fd08064
Removed some old type: ignore comments. 2023-02-22 01:29:51 +01:00
cf219d5a48
Added some more docstrings to entities. 2023-02-22 01:02:26 +01:00
7fa545d7f8
Merge branch 'master' into 29-generic-entities-support 2023-02-22 00:46:33 +01:00
c645ce6bb8
Bump version: 0.24.4 → 0.24.5 2023-02-22 00:32:57 +01:00
bbc9647cb0
s/MultiValueSensor/CompositeSensor/g 2023-02-21 23:14:10 +01:00
2fa45fc5a3
Documentation and LINT fixes for sensor entities. 2023-02-21 23:10:05 +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
a6c36fa1c1
Added brand, model and model_id columns to BluetoothDevice. 2023-02-19 23:02:04 +01:00
68e6b271c1
Updated dist files 2023-02-19 22:58:20 +01:00
cb9b01c89f
Added raw_sensor metadata 2023-02-19 22:57:50 +01:00
72a9a9dfcf
LINT/type fixes 2023-02-19 22:56:45 +01:00
8aedc3c233
Recursively normalize child entities in EntityManager._normalize_entities 2023-02-18 17:51:57 +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
45664be44b
Removed deprecated backend.bluetooth.scanner.
Scan capabilities are now implemented on the `bluetooth` plugin itself.
2023-02-13 23:13:51 +01:00
471bc1fd3d
Updated dist files 2023-02-13 23:13:32 +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
4365352331
[WIP] s/set_value/set/g for entities 2023-02-11 03:57:23 +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
35719b0da9
Let publish_entities return the list of transformed_entities 2023-02-08 02:09:34 +01:00
e04870209e
More LINT fixes 2023-02-08 01:50:54 +01:00
a98a5f0980
typo fix 2023-02-08 01:09:25 +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
4849e14414
LINT fixes for the utils module + additional documentation 2023-02-05 18:05:41 +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
64e9bf17cf
Updated dist files 2023-02-05 14:53:36 +01:00
2047b9b76c
[WIP] Refactoring switchbot plugin as a runnable plugin + entity manager 2023-02-04 22:22:51 +01:00
65827aa0cd
Updated dist files 2023-02-04 17:36:46 +01:00
b96838a856
Major LINT fixes/refactor for the Config class 2023-02-04 17:35:48 +01:00
db5846d296
Add the unit to the Dimmer display value if it's available 2023-02-04 17:28:54 +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
b6814b4f16
Removed legacy Switches integration [frontend] 2023-02-03 22:49:09 +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
63d6920716
Updated dist files 2023-02-02 18:07:44 +01:00
59eb0742a1
s/warnings/logger.debug/ if publish_entities is called with no engine registered 2023-01-29 21:52: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
334ccc35a2
Don't serialize I/O wrappers
This removes warnings on `config.get`, where the `logging` configuration
key may also contain the current logging stream and we end up with a
JSONDecodeError when trying to serialize it.
2023-01-25 00:52:37 +01:00
ba31dff06a
Major refactor + fixes for smartthings 2023-01-24 23:56:28 +01:00
147f36c86c
All Sensor instances should have is_read_only=True by default 2023-01-22 21:05:14 +01:00
fd76642082
Added Volume and Muted entities 2023-01-22 21:04:46 +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
dabbe031ab
Don't show the entity modal unless the user clicks on the name or icon 2023-01-21 23:46:38 +01:00
32e4e60579
A more robust handling of events in the zwave.mqtt backend 2023-01-21 23:44:51 +01:00
3940288396
Use the new bus notification helpers 2023-01-21 16:59:18 +01:00
241670c9d0
Handle parent/child update events through broadcast bus events 2023-01-21 16:58:28 +01:00
3923a09831
- Expose methods on the bus module to publish/subscribe to notifications and entity updates
- Removed some redundant `pass` statements in Z-Wave derived event classes
2023-01-21 16:56:27 +01:00
fb562bb415
Propagate the @update event to the parent entities 2023-01-21 14:55:06 +01:00
4d762b81dc
EntityUpdateEvent traces can now be logged on INFO level
The EntityUpdateEvents generated by light.hue are now less noisy.
2023-01-21 14:50:05 +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
dfb13127ee
Added MotionSensor entities 2023-01-21 14:47:18 +01:00
a892bad34c
Refactoring smartthings plugin to support more entity types 2023-01-21 14:09:26 +01:00
22b8b03cb2
Refactored EntityIcon component 2023-01-15 20:02:50 +01:00
9a5e2899e8
Support for external_url and image_url on entities 2023-01-15 20:01:47 +01:00
2cc5e3f726
UI tweaks 2023-01-15 15:46:25 +01:00
9e4fbc6a21
Defined the collapsed data property on EntityMixin level 2023-01-15 15:29:26 +01:00
78e250186b
Deallocate the color converter when the light component is unmounted 2023-01-15 15:25:04 +01:00
e9371ac5d0
Improved entity collapse logic
- Toggle collapsed state also if clicked on the gap between the entity
  name and the right edge, instead of opening the entity modal. The
  entity configuration modal should open only when clicking on the
  entity name or icon (and these should be highlighted on hover as links
  as well).

- The collapsed state update should be propagated to the wrapped
  component as well, if applicable.
2023-01-15 15:03:53 +01:00
dbf5ed3b85
s/expanded/collapsed/g (for naming consistency) 2023-01-15 14:26:44 +01:00
bb483fd1b1
Using a nice gradient for hover-bg 2023-01-15 12:34:18 +01:00
cda03887d4
Updated dist files 2023-01-15 12:34:02 +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
afd9a1d6bf
Don't load entities that only have non-queriable children 2023-01-14 22:33:53 +01:00
2778357a9e
Wrapped dynamic Vue components in shallowRef.
The performance of the page is heavily degraded by components loaded
dynamically via defineAsyncComponent that recursively carry behind the
whole Vue machinery.

By wrapping defineAsyncComponent calls in shallowRef we make sure that
we only wire the root level of the newly created dynamic component.
2023-01-14 22:31:48 +01:00
fd2d83c80b
Renamed Notification mixin's warn and error methods.
Renamed to `notifyWarning` and `notifyError` respectively.

Those names can often clash with other properties defined on components
that extend the mixin (like entities).
2023-01-14 22:27:43 +01:00
aa22507f50
DropdownItem.className should not be enforced to be a string.
It can also be a class -> boolean object.
2023-01-14 22:11:05 +01:00
a58caa17e2
Decreased time of EventQueue (2 -> 1 second) to make entity events more responsive 2023-01-13 23:28:58 +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
27b23b7fae
Normalize array/dict options for values on EnumSwitch 2023-01-09 01:01:35 +01:00
e9c84ff5d4
Support units on dimmer entities 2023-01-09 01:01:05 +01:00
32330ca7a8
Merge branch 'master' into 29-generic-entities-support 2023-01-08 23:26:08 +01:00
dependabot[bot]
a0e45c38a5
Bump minimatch from 3.0.4 to 3.1.2 in /platypush/backend/http/webapp
Bumps [minimatch](https://github.com/isaacs/minimatch) from 3.0.4 to 3.1.2.
- [Release notes](https://github.com/isaacs/minimatch/releases)
- [Commits](https://github.com/isaacs/minimatch/compare/v3.0.4...v3.1.2)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-08 22:24:41 +00:00
dependabot[bot]
379c822588
Bump json5 from 1.0.1 to 1.0.2 in /platypush/backend/http/webapp
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2.
- [Release notes](https://github.com/json5/json5/releases)
- [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md)
- [Commits](https://github.com/json5/json5/compare/v1.0.1...v1.0.2)

---
updated-dependencies:
- dependency-name: json5
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-08 22:22:52 +00:00
dependabot[bot]
47c3a24def
Bump loader-utils from 1.4.0 to 1.4.2 in /platypush/backend/http/webapp
Bumps [loader-utils](https://github.com/webpack/loader-utils) from 1.4.0 to 1.4.2.
- [Release notes](https://github.com/webpack/loader-utils/releases)
- [Changelog](https://github.com/webpack/loader-utils/blob/v1.4.2/CHANGELOG.md)
- [Commits](https://github.com/webpack/loader-utils/compare/v1.4.0...v1.4.2)

---
updated-dependencies:
- dependency-name: loader-utils
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-01-08 15:53:12 +00:00
66000a0774
Merge branch 'master' into 29-generic-entities-support 2023-01-08 00:23:57 +01:00
2893cb1cc4
Replaced deprecated missing marshmallow parameter with load_default 2023-01-08 00:15:24 +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
c215c693f5
Only pass children that aren't configuration values to the entities 2023-01-03 23:25:43 +01:00
7868d6fe37
Support for nested configuration objects on entity modals 2023-01-03 23:16:14 +01:00
13eb515f87
Select current display value by default on EnumSwitch 2023-01-03 23:14:57 +01:00
01727f53bc
Support for is_configuration flag on zwave entities 2023-01-03 23:13:34 +01:00
c32aecece3
Added is_configuration flag to entities 2023-01-03 23:12:27 +01:00
81fee3ea2a
Style tweaks 2023-01-03 23:11:39 +01:00
71ed545cc7
Fancier gradient background for the navigator header 2023-01-02 23:28:53 +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
4f75cbc8b4
Updated frontend dist files 2023-01-01 23:23:18 +01:00
80c2c77272
Support for entities with children on the frontend 2023-01-01 23:06:40 +01:00
dd3c4b10c7
Run register_service in a separate thread in backend.http.
The Zeroconf registration part may randomly get stuck, resulting in the
web server not being properly started.

It's therefore better to run the Zeroconf registration process
asynchronously, for it's not strictly required for the web server to
execute.
2023-01-01 13:19:11 +01:00
edddc90d73
Run register_service in a separate thread in backend.http.
The Zeroconf registration part may randomly get stuck, resulting in the
web server not being properly started.

It's therefore better to run the Zeroconf registration process
asynchronously, for it's not strictly required for the web server to
execute.
2023-01-01 13:16:46 +01:00
1c811a490f
Don't serialize children_ids in Entity.to_json()
Serializing both children_ids and parent_id can result in nasty
SQLAlchemy bugs, especially when handling objects that haven't been
flushed yet.
2023-01-01 12:47:15 +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
0513339be7
Merge branch 'master' into 29-generic-entities-support 2022-12-20 23:06:19 +01:00
84ce31cab0
Bump version: 0.24.3 → 0.24.4 2022-12-20 23:05:42 +01:00
d0d333e8f4
FIX: Clear the cronjob event after receiving a TIME_SYNC.
When a cronjob receives a TIME_SYNC event (because the system clock has
changed/drifted and the cronjobs are expected to recalculate their next
run slot) it should also clear the event.

Otherwise, the next `wait` will be skipped and the cronjob will be
executed even if it wasn't scheduled.
2022-12-20 23:01:03 +01:00
2feaba7bf4
Add children_ids attribute to entities when converted to JSON 2022-12-18 21:03:12 +01:00
3615a269fe
Use Float instead of Numeric on NumericSensor table.
The Numeric type may have casting/rounding issues with SQLite.
2022-12-18 15:25:22 +01:00
5763c5e0ba
Don't use the entities cache when upserting entities.
This may make things a bit less optimal, but it's probably the only
possible solution that preserves my sanity.

Managing upserts of cached instances that were previously made transient
and expunged from the session is far from easy, and the management of
recursive parent/children relationships only add one more layer of
complexity (and that management is already complex enough in its current
implementation).
2022-12-18 15:13:21 +01:00
b0464219d3
Large refactor of the entities engine. 2022-12-17 21:41:23 +01:00
9ddebb920f
Merge branch 'master' into 29-generic-entities-support 2022-12-17 00:51:51 +01:00
6666f5581c
Bump version: 0.24.2 → 0.24.3 2022-12-17 00:31:22 +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
b044fa4acf
s/disable_logging/logging_level/g on entity events. 2022-12-11 11:58:49 +01:00
2ee2a1d7b5
Replaced disable_logging with a more generic logging_level.
The `disable_logging` attribute was only available on events and
responses, and it could only either entirely disable or enable logging
for all the events of a certain type.

The new flag allows more customization by setting the default logging
level used for any message of a certain type (or `None` to disable
logging). This makes it possible to e.g. set some verbose events to
debug level, and the user can see them if they configure the application
in debug mode.

It also delegates the logging logic to the message itself, instead of
having different parts of the application handling their own logic.
2022-12-11 11:46:37 +01:00
d4b540dd67
Replaced disable_logging with a more generic logging_level.
The `disable_logging` attribute was only available on events and
responses, and it could only either entirely disable or enable logging
for all the events of a certain type.

The new flag allows more customization by setting the default logging
level used for any message of a certain type (or `None` to disable
logging). This makes it possible to e.g. set some verbose events to
debug level, and the user can see them if they configure the application
in debug mode.

It also delegates the logging logic to the message itself, instead of
having different parts of the application handling their own logic.
2022-12-11 11:39:38 +01:00
aa3479abeb
Added [-v|--verbose] and --version options to the command line. 2022-12-11 10:59:12 +01:00
a1d3724b8d
Added [-v|--verbose] and --version options to the command line. 2022-12-11 10:54:03 +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
6a2a3100f8
LINT fixes for zwave.mqtt backend 2022-12-10 16:16:23 +01:00
5a47308516
Merge branch 'master' into 29-generic-entities-support 2022-12-10 15:57:28 +01:00
4c8190ac14
Bump version: 0.24.1 → 0.24.2 2022-12-10 15:37:49 +01:00
6713bf6994
Fixed backend.zwave event logic dispatch for recent versions of ZWaveJS.
ZWaveJS has broken back-compatibility with zwavejs2mqtt when it comes to
events format.

Only a partial representation of the node and value objects is
forwarded, and that's often not sufficient to infer the full state of
the node with its values.

The `_dispatch_event` logic has therefore been modified to accommodate
both the implementation.

This means that we have to go conservative in order to preserve
back-compatibility and not over-complicate things, even if it (slightly)
comes at the expense of performance.
2022-12-10 15:35:09 +01:00
313105f014
Fixed backend.zwave event logic dispatch for recent versions of ZWaveJS.
ZWaveJS has broken back-compatibility with zwavejs2mqtt when it comes to
events format.

Only a partial representation of the node and value objects is
forwarded, and that's often not sufficient to infer the full state of
the node with its values.

The `_dispatch_event` logic has therefore been modified to accommodate
both the implementation.

This means that we have to go conservative in order to preserve
back-compatibility and not over-complicate things, even if it (slightly)
comes at the expense of performance.
2022-12-10 14:52:10 +01:00
219a0a99ca main.db should use the configured workdir when not specified.
Closes: #234
Reviewed-On: platypush/platypush#234
2022-12-09 23:37:10 +01:00
3b1147eaae Bump version: 0.24.0 → 0.24.1 2022-12-08 12:33:34 +01:00
5ba3fa1b5b FIX: Parenthesized context managers are only available in Python >= 3.10
Since Parenthesized context managers are only supported on very recent
versions of Python (thanks black for breaking back-compatibility), we
should still use the old multiline syntax - it's not worth breaking
compatibility with Python >= 3.6 and < 3.10 just to avoid typing a
backslash.
2022-12-08 12:28:36 +01:00
00fca6b187
Merge branch 'master' into 29-generic-entities-support 2022-12-04 20:58:06 +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
ecba72935f
Check for table metadata existance in Base.metadata instead of having a separate entity registry 2022-12-04 16:28:46 +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
abaeabea22
Implemented recursive merges of parent/child relationships in entities 2022-11-30 00:50:53 +01:00
cc156a53a1
Support for parent/children relationships on zwave.mqtt entities 2022-11-28 21:42:11 +01:00
0edd73690b
Modelling of parent/children relationships on entity level 2022-11-28 21:36:00 +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
78c59f437a
Added support for illuminance sensor entities 2022-11-27 22:38:58 +01:00
03d1c554ea
Updated webapp dist files 2022-11-27 14:23:30 +01:00
b1a7a7d915
Fixed little overlap between the entities' header and the navigator 2022-11-27 12:56:39 +01:00
b5653e070e
Style improvements for the main navigator 2022-11-27 12:56:17 +01:00
681f307d04
A more self-explanatory icon for entity grouping selections 2022-11-27 00:56:47 +01:00
bba582875a
The data attribute on EntityUpdateEvent shouldn't be taken into account for flashing updates 2022-11-27 00:56:23 +01:00
e8d6717fcb
Added input box for <Dimmer> entities 2022-11-27 00:56:01 +01:00
bd59a5eefd
Support for range labels on <Slider> 2022-11-27 00:55:19 +01:00
f8aaab20f5
Updated webapp dist files 2022-11-27 00:53:58 +01:00
faa8295469
White background for main nav 2022-11-26 01:52:42 +01:00
d29723ea41
Keep the main menu items vertically aligned to the center also on tablets 2022-11-26 01:28:20 +01:00
d0c8a8edf9
A bit of padding for LightHue on mobile 2022-11-26 01:19:52 +01:00
37254cad1a
Mobile UI improvements 2022-11-26 01:16:07 +01:00
f28f08dd1a
Keep the main menu open on page load by default on >= desktop 2022-11-26 01:15:03 +01:00
fecd96f64c
Solved issue with main menu shrinking a bit when the main panel has too much wide content 2022-11-26 00:32:11 +01:00
33cc055249
Switched expanded main menu to light colors 2022-11-26 00:31:36 +01:00
a57e67b96f
Better style for the settings' users and token panels 2022-11-25 23:16:16 +01:00