Commit Graph

2682 Commits

Author SHA1 Message Date
Fabio Manganiello bba582875a
The `data` attribute on `EntityUpdateEvent` shouldn't be taken into account for flashing updates 2022-11-27 00:56:23 +01:00
Fabio Manganiello e8d6717fcb
Added input box for <Dimmer> entities 2022-11-27 00:56:01 +01:00
Fabio Manganiello bd59a5eefd
Support for range labels on <Slider> 2022-11-27 00:55:19 +01:00
Fabio Manganiello f8aaab20f5
Updated webapp dist files 2022-11-27 00:53:58 +01:00
Fabio Manganiello faa8295469
White background for main nav 2022-11-26 01:52:42 +01:00
Fabio Manganiello d29723ea41
Keep the main menu items vertically aligned to the center also on tablets 2022-11-26 01:28:20 +01:00
Fabio Manganiello d0c8a8edf9
A bit of padding for LightHue on mobile 2022-11-26 01:19:52 +01:00
Fabio Manganiello 37254cad1a
Mobile UI improvements 2022-11-26 01:16:07 +01:00
Fabio Manganiello f28f08dd1a
Keep the main menu open on page load by default on >= desktop 2022-11-26 01:15:03 +01:00
Fabio Manganiello 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
Fabio Manganiello 33cc055249
Switched expanded main menu to light colors 2022-11-26 00:31:36 +01:00
Fabio Manganiello a57e67b96f
Better style for the settings' users and token panels 2022-11-25 23:16:16 +01:00
Fabio Manganiello 21c1c96f2e
Use Dropdown for the settings menu 2022-11-25 23:15:41 +01:00
Fabio Manganiello 292ed2abff
Better style for dropdown items.
- Larger icon div to prevent text overlapping with icons
- Support for `selected` class
2022-11-25 23:14:28 +01:00
Fabio Manganiello c0dd91838b
Merge branch 'master' into 29-generic-entities-support 2022-11-21 22:13:47 +01:00
Fabio Manganiello d95baac74e Add user credentials on the encrypted JWT token.
Adding the credentials ensures that tokens associated to non-existing
users, or users with an invalid password, won't be accepted, even if
they were correctly encrypted using the host's keypair.

This adds an additional layer of security in case the host's keypair
gets compromised.
2022-11-21 13:16:09 +01:00
Fabio Manganiello 98d7c95aa7 Removed two unrequired `return` statements 2022-11-21 13:04:48 +01:00
Fabio Manganiello ba1681fc22 Merge branch 'master' into 29-generic-entities-support 2022-11-21 12:36:01 +01:00
Fabio Manganiello a2c8e27bd8 Removed PyJWT dependency.
PyJWT is a very brittle and cumbersome dependency that expects several
cryptography libraries to be already installed on the system, and it can
lead to hard-to-debug errors when ported to different systems.

Moreover, it installs the whole `cryptography` package, which is several
MBs in size, takes time to compile, and it requires a Rust compiler to
be present on the target machine.

Platypush will now use the Python-native `rsa` module to handle JWT
tokens.
2022-11-21 12:30:38 +01:00
Fabio Manganiello 02f89258b8
FIX: Task.set_name only works on Python >= 3.8 2022-11-21 09:49:57 +01:00
Fabio Manganiello 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
Fabio Manganiello e579fb3417
Don't display sensors with null value 2022-11-21 00:05:19 +01:00
Fabio Manganiello b9e6614b04
Added support for `EnumSensor` entities 2022-11-21 00:04:07 +01:00
Fabio Manganiello d171000a0e
Initial support for sensor entities in `zwave.mqtt` 2022-11-14 22:08:15 +01:00
Fabio Manganiello a7bc4f443c
Imports order 2022-11-14 21:30:43 +01:00
Fabio Manganiello 45d0e4445b
Sorted entity type names 2022-11-14 00:46:58 +01:00
Fabio Manganiello 96ce4729f9
Updated webapp dist files 2022-11-14 00:46:40 +01:00
Fabio Manganiello b7757d17cc
Updated webapp dist files 2022-11-14 00:06:41 +01:00
Fabio Manganiello 7fac5392b8
Blink entities only if their values have actually changed 2022-11-13 23:52:21 +01:00
Fabio Manganiello 211372e472
Added support for dimmers on `zigbee.mqtt` 2022-11-13 18:48:36 +01:00
Fabio Manganiello 833d908a32
Blink entities body upon update 2022-11-13 01:39:40 +01:00
Fabio Manganiello 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
Fabio Manganiello f90d84a3d4
Don't wait for UI updates for entities that are not queriable 2022-11-13 00:54:37 +01:00
Fabio Manganiello fb594cb8b1
Updated webapp dist files 2022-11-12 16:31:35 +01:00
Fabio Manganiello 69e097707d
Don't lock read session from the main database 2022-11-12 16:10:57 +01:00
Fabio Manganiello 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
Fabio Manganiello bfeb0a08c4
Encapsulate `_get_session` in `EntityManager` 2022-11-12 15:14:10 +01:00
Fabio Manganiello 8450129858
LINT fixes 2022-11-12 11:39:12 +01:00
Fabio Manganiello 8a894d0989
`user_manager` should be a global object instead of being initialized on-demand 2022-11-12 11:38:40 +01:00
Fabio Manganiello 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
Fabio Manganiello 3fc94181b7
LINT fixes 2022-11-11 22:02:36 +01:00
Fabio Manganiello 26f869b6e4
LINT fixes 2022-11-11 21:49:38 +01:00
Fabio Manganiello 02a4c9f667
Added is_query_disabled attribute to entities 2022-11-11 20:40:36 +01:00
Fabio Manganiello 84bb77bd5b
Replaced ambiguous logger variable name 2022-11-11 20:37:39 +01:00
Fabio Manganiello 00a43dd1f8
Implemented `EnumSwitch` entity type
Done for `zigbee.mqtt`, other plugins will follow
2022-11-11 01:46:38 +01:00
Fabio Manganiello 801ed05684
Added support for binary sensors (in zigbee.mqtt for now) 2022-11-05 01:47:50 +01:00
Fabio Manganiello 6454f9d018
Propert snake case -> camel case conversion for backend entities -> frontend components 2022-11-04 22:53:24 +01:00
Fabio Manganiello 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
Fabio Manganiello 5ca3c06f96
Normalize device names in set_lights 2022-11-02 23:32:21 +01:00
Fabio Manganiello d5f8d55b4b
Fixed zigbee.mqtt light entity conversion 2022-11-02 23:07:12 +01:00