Only the 'action' requests have the 'data' parameter set, so any other
request triggering a 'device_changed' failed.
closesodoo/odoo#66826
X-original-commit: 0850814dda9802973e48ef89d6a81d61fc36a646
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
Add all the request data in events triggered by IoT actions.
closesodoo/odoo#61798
Taskid: 2320958
X-original-commit: a8c56602ba8301b6e901be7ffeaa219d77401f79
Related: odoo/enterprise#14763
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Events coming from the IoT Box were lost in two cases:
1. Create a listener for device 1
2. Send an action to device 1
--> If the action arrives before the listener the event is never sent
to the DB
1. Setup up two listeners for devices 1 & 2
2. After a few seconds, send two consecutive actions to devices 1 & 2
--> Everytime a longpolling request arrives, a new threading.Event
object is created. The first action sets the event, then, before the
new longpolling request arrives, the second action sets the same event,
which is overwritten once the new longpolling request arrives.
We now maintain a list of events, and when a longpolling request
arrives on the IoT Box, we make sure that all events that occured in
the last 5 seconds were received by the DB. If no events were pending,
we wait 50 seconds to check if a new one pops up.
Taskid: 2320958
X-original-commit: e3260712ce96a8d81bf807574c334d92c37c6ae4
- Split driver.py to multiple files
- Remove hw_proxy module as most of its routes were not used and
move remaingin routes to a controller in hw_drivers
- Add missing coding and license lines at the beginning of files
- Reorder imports and remove unused ones
- Rename device_id to device_identifier for clarity
- Rename screen to display for consistency
- Other minors improvements
Taskid: 1973956
X-original-commit: 841c016913a87133bf7257c62ae5f6bf7d99e06d