Commit Graph

97 Commits

Author SHA1 Message Date
Fabio Manganiello 92a3759721 Added websocket backend and plugin 2018-10-26 21:55:49 +02:00
Fabio Manganiello 284e0638f8 Always define msg so the function doesn't fail on exception
Reverted the previous retry logic for backend - it didn't really work

This reverts commit 4e0e4863a0.
This reverts commit 964c7b5cf0.
This reverts commit 6ce348365f.
2018-10-25 20:46:34 +02:00
Fabio Manganiello 6ce348365f Refactored backends to be more robust by wrapping the core logic into a try-except logic with sleep and retry 2018-10-25 19:46:13 +02:00
Fabio Manganiello 7adfb67c12 Fixed Kodi plugin 2018-10-20 19:27:15 +02:00
Fabio Manganiello 74d23262b7 Implemented TCP backend 2018-10-11 14:02:29 +00:00
Fabio Manganiello f79de2e708 Reverted bus post logic for HTTP backend 2018-09-25 00:31:51 +02:00
Fabio Manganiello d215410a6a More consistent flow for messages received by a backend 2018-09-24 23:13:44 +02:00
Fabio Manganiello badb739a8c Increased response queue read timeout to 60 seconds 2018-09-20 13:13:36 +00:00
Fabio Manganiello 6449504e26 Switched the bus to a Redis bus 2018-09-20 10:49:57 +00:00
Fabio Manganiello 661563d1f1 Added Redis bus 2018-09-20 09:41:27 +02:00
Fabio Manganiello 822e0a1e25 Better fix for broken async variables and attributes after Python 3.7 migration 2018-08-07 22:00:11 +00:00
Fabio Manganiello b023618950 Revert "In Python 3.7 async is a strict language keyword that can't be used for variables names - replaces occurrences with _async"
This reverts commit e625861edf.
2018-08-07 21:52:02 +00:00
Fabio Manganiello e625861edf In Python 3.7 async is a strict language keyword that can't be used for variables names - replaces occurrences with _async 2018-08-07 21:26:57 +00:00
Fabio Manganiello 0b4cfec8e7 More robust HTTP backend in case Redis wasn't configured 2018-07-20 11:13:49 +02:00
Fabio Manganiello c81534875a Get Redis object on each interaction in case the backend wasn't ready before 2018-07-08 22:12:30 +02:00
Fabio Manganiello e1ead3c25f s/_token/token/ 2018-07-08 22:00:28 +02:00
Fabio Manganiello 2647bd3881 Implemented token verification over HTTP calls.
The token can be provided either:

* GET parameter (``?token=abc``)
* JSON payload request (``{..your_request.., "_token":"abc"})
* HTTP header (``X-Token: abc``)
* Basic HTTP auth (any username works, password: token)
2018-07-08 21:36:58 +02:00
Fabio Manganiello 4ebdda80f9 More robust support for Redis configuration in web socket server 2018-07-08 12:24:33 +02:00
Fabio Manganiello b443df7947 Parametrized the HTTP backend Redis object by using the same configuration used on the Redis backend 2018-07-08 12:13:43 +02:00
Fabio Manganiello 81a81312e3 Basic support for token authentication on request level 2018-07-05 09:15:53 +02:00
Fabio Manganiello 3872276234 Better way to handle plugins->backends communication through Redis 2018-06-29 10:21:19 +02:00
Fabio Manganiello e6fdcaa068 Make sure that the Redis thread gets the stop event propagated when the application terminates 2018-06-26 00:57:26 +02:00
Fabio Manganiello 8e16f31603 fixed regex 2018-06-26 00:46:13 +02:00
Fabio Manganiello 28862d743d Adding backends documentation 2018-06-26 00:16:39 +02:00
Fabio Manganiello d89b03a697 Optional 'zoom' parameter added to the map page to override Google Maps auto-zoom (needed if the page is embedded in an iframe) 2018-06-13 18:10:58 +00:00
Fabio Manganiello e216eb4792 Added maps page 2018-06-12 15:33:04 +00:00
Fabio Manganiello 4da74b1096 Refactored logging submodule 2018-06-06 20:09:23 +02:00
Fabio Manganiello 2483c6d612 Simplified websockets keep-alive logic. Just wait on recv() and clean up the websocket in case of a ConnectionClosed exception 2018-05-06 11:38:24 +02:00
Fabio Manganiello ac958f98da Added images carousel web widget 2018-05-05 04:37:22 +02:00
Fabio Manganiello d83c2c903f - Added support for /dashboard page with customizable widgets under the web server
- Introduced Redis to pass messages between the Flask process and the
main application. It now syncs messages with the bus and connected websockets
- Added support to programmatically modify dashboard widgets through POST request like Dashing
- Added weather forecast plugin
2018-05-04 03:24:35 +02:00
Fabio Manganiello 68c52fe102 - Importing Flask.request as http_request to prevent name clashes with
SQLAlchemy's request module

- All SQLAlchemy engine and connection setup done within get_new_items
to prevent different threads from creating and using the db instance

- Added check_same_thread to sqlite connection line to prevent
different-thread exceptions when the Flask main thread does some cleanup
2018-04-28 19:11:14 +02:00
Fabio Manganiello 02e951bd57 - Added hidden plugins configuration for plugins that shouldn't be shown
on the web panel as tabs

- Added support for popup notifications on the web panel

- Added voice assistant interactive notifications to the web panel

- Added new playing music notifications to the web panel
2018-04-17 23:10:49 +02:00
Fabio Manganiello 1a01b336b7 Brought server side ping timeout to 60 seconds 2018-04-15 22:36:45 +02:00
Fabio Manganiello 10bf54f961 A more consistent a bug-free handling of websocket reconnection cycles 2018-04-10 15:56:00 +02:00
Fabio Manganiello 4efbcc50dd Server-side websocket timeout: 3 -> 5 seconds 2018-04-10 00:10:03 +02:00
Fabio Manganiello e8891f0c12 Filter implementation for music.mpd 2018-02-09 20:54:02 +01:00
Fabio Manganiello b675f631e9 - Websocket ping interval 1 -> 5 seconds
- JS client websocket reconnect logic
2018-02-07 22:14:38 +01:00
Fabio Manganiello 968b71e946 - Implemented support for shuffle, random and set volume on the UI
- Reduced the websocket ping poll frequency to 1 second
2018-01-31 01:32:07 +01:00
Fabio Manganiello fc608317fd Give some breath to the websocket ping loop 2018-01-29 21:21:40 +01:00
Fabio Manganiello 75fac37984 Fixed tests 2018-01-29 16:34:00 +01:00
Fabio Manganiello 6ad7f85e76 A more clever way to get the static dirs 2018-01-29 15:08:29 +01:00
Fabio Manganiello 6ff1552063 Fixed websocket 2018-01-29 14:46:31 +01:00
Fabio Manganiello 72af7adb46 #51 first web panel iteration 2018-01-29 13:47:21 +01:00
Fabio Manganiello 615573f932 Changed format for HTTP backend requests to something more consistent 2018-01-28 14:49:59 +01:00
Fabio Manganiello 1581685f62 use_reloader=False on Flask to prevent the platypush daemon to be spawned twice 2018-01-04 17:34:25 +01:00
Fabio Manganiello 39f986a88d Fixed HTTP backend 2018-01-04 17:20:35 +01:00
Fabio Manganiello 20b07fb02f Made an HTTP backend, #27 2018-01-04 02:45:23 +01:00