We call the status of the hostapd in each request of 'get_odoo_server_url()' and 'get_ssid()'
And this call display in the log the status '0' or 'inactive' in the log
With this commit we hide this useless information
closesodoo/odoo#72133
X-original-commit: e5e9f9f91cf9bf35f1e0b307008840a0de134e2f
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
We sometimes encountered IoT Boxes crashing because the remount failed.
As this isn't a big issue, we won't check the return value of the call
to `mount`.
closesodoo/odoo#59438
X-original-commit: 5f9874da0f5f5b27c546cd248d08299f0e65544b
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Signed-off-by: Antoine Prieëls <aprieels@users.noreply.github.com>
The path to folder of images of IoT has change.
So we adapt the path for the upgrade of IoT
closesodoo/odoo#57978
X-original-commit: 9512a23f48176fe0e7970039c824281c4af18162
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
- 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
We move the IoT Box version file from /home/pi to /var/odoo
so its not overriden after an auto-flash of the IoT Box.
closesodoo/odoo#54063
X-original-commit: ce0700ce401523267b5a8bd5665a368cfea24912
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
When the route '/hw_drivers/box/connect' is called to connect an IoT Box to a DB,
the checkout on the branch of the DB is not performed and incompatibility can occur.
With this fix we relaunch Odoo via a parallel thread in order to be able to respond to the request...
closesodoo/odoo#52513
X-original-commit: 9aca7c464cef492c495a0c72d870b7075187dc63
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
- The checkout to switch to the branch of the connected DB was not
processed correctly because the command used to clear the drivers
failed, raising an exception:
rm: cannot remove '/home/pi/odoo/addons/hw_drivers/drivers/__pycache__': Is a directory
- The location of the drivers has been changed in master. So, even if we
perform a checkout, the addons/hw_drivers/drivers directory doesn't
exist. The get_resource_path('hw_drivers', 'drivers') then returned
False instead of the correct path and the extraction of the zip file
failed.
closesodoo/odoo#52448
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Until now, to detect new types of devices on the IoT Box, we had to
modify driver.py. If partners wanted to connect a new type of device,
they had to modify directly the files on the Box, meaning that after
each new build they had to re-apply all their modifications.
We remove the loops that detected the connected devices and replace
them by `Interfaces`. All interfaces will be loaded from the connected
Odoo instance with the corresponding drivers.
TaskID: 2082282
When we change the version of branch we keep drivers.
But drivers are not compatible with all branch and Odoo
on the IoT Box can't start.
So we remove all drivers before checkout on another branch
closesodoo/odoo#50140
X-original-commit: 4e97aec6717697c742e5e0b09f00ab7dec09712f
Signed-off-by: pimodoo <pimodoo@users.noreply.github.com>
We replace the SSID of the IoTBox with a unique SSID
closesodoo/odoo#46255
X-original-commit: c847c1cb149e386331ff2e5b19a58862e1b66714
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
If IoT Box is in access point mode and a server is configured
the box try to reach the server.
But in access point mode all requests are redirected to the box
So now before return True in function 'get_odoo_server_url'
we verify if the service 'hostapd' is inactive
closesodoo/odoo#46141
X-original-commit: 365f0e384630bad16e0872d2307702fca5a4e295
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
To be able to flash the partition on which the IoT Box is executed,
we must create a third partition and install an OS there to be able
to boot on it and flash the partition of the IoT Box
- Creation of the third partition
- Raspbian download and checksum verification
- Installation of Raspbian on the third partition
- Download the IoT image on the Raspbian partition and check the checksum
- Reboot on the Raspbian partition
- Installation of the IoT image on the second partition
- Reboot on the IoT partition
- Cleaning and deleting the third partition
closesodoo/odoo#44430
Task: 2161955
X-original-commit: 407d9a88a3d23ed49ed5a2c5fa4d211cec43edfd
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
Preivously, the code of the IoT Box was retrieved from the branch that
was used during the build but the drivers were retrieved from the
connected Odoo DB. Both could be in different versions, which forced
used to make old drivers compatible with the new Box or new drivers
compatible with old versions of the Box.
All of this made it quite hard to modify the existing code, even for
new versions of the Box in master.
When connecting the IoT Box to an Odoo DB, we now retrieve the version
of Odoo that is used and checkout the Box to this branch. This means
that we can now modify the code of the Box in master without having to
worry about users using the latest build with older DBs.
Taskid: 2120749
X-original-commit: 6af5d669593a4f431d14fce08c6151932f97da82
Change the version of the IoT Box.
From 19_10 to 19_12
closesodoo/odoo#41109
X-original-commit: 2b8779dc657a5a2b877ad2a552dd0dfda0071357
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
We update the version of the build for IoT Box
closesodoo/odoo#38328
X-original-commit: be464a3759a4fe395334a1b26b90f7395e031d1a
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
The `get_wifi_essid` function was moved to the helpers file, but the
`self` argument was not removed from the function's signature.
closesodoo/odoo#36710
Signed-off-by: Quentin Lejeune (qle) <qle@odoo.com>
To add or modify printer the /root_bypass_ramdisks/etc/cups/ need be writeable.
And /root_bypass_ramdisks/etc/cups/ = /etc/cups/
But when we make 'sudo mount -o remount,ro /' we put the /etc/cups/ and so
/root_bypass_ramdisks/etc/cups/ folder on read-only.
After all 'read-only' command we make another command to put cups folder writeable
Automatically load the IoT Drivers when Odoo starts on the IoT Box or
when the connection to the Odoo instance is done.
Allow to deactivate the automatic load to avoid overriding
modifications made on the Box.
TaskID: 2009683
With this commit we add the possibility to save the db_uuid and enterprise_code on the IoT Box.
We check the current SSL certificate and if it is not authenticated or not up to date
we send a request to 'https://www.odoo.com/odoo-enterprise/iot/x509'
with the db_uuid and enterprise_code to get the certificate, key, and domain associated with the client.
The IoT Box will be accessible in HTTPS according to the following domain:
https://<ip-with-dashes>.<sub-hash>.odoo-iot.com
<ip-with-dashes> being the ip address with dashes
<sub-hash> being a subdomain assigned by Odoo to a customer
Task: 1931770