Compare commits

...

1 Commits

Author SHA1 Message Date
Loan (LSE) 1e9e1d04c8 [IMP] iot: refactor IoT documentation and adapt to new IoT image 2024-10-31 12:41:59 +01:00
29 changed files with 614 additions and 681 deletions
+9
View File
@@ -2,13 +2,22 @@
:show-content:
:hide-page-toc:
:show-toc:
.. TODO: which are really useful and which are not ?
========================
Internet of Things (IoT)
========================
**Odoo IoT** is a bridge between the physical world and the digital world.
This application allows you to interact with certain devices from your Odoo instance.
.. seealso::
- `Odoo Tutorials: Internet of Things (IoT) Tutorials <https://www.odoo.com/slides/internet-of-things-iot-175>`_
.. toctree::
:titlesonly:
iot/iot_system
iot/config
iot/devices
@@ -13,5 +13,3 @@ Configuration
config/https_certificate_iot
config/updating_iot
config/troubleshooting
config/windows_iot
config/ssh_connect
@@ -1,181 +1,201 @@
==========================
Connect an IoT box to Odoo
==========================
=============================
Connect an IoT System to Odoo
=============================
An Internet of Things (IoT) box is a micro-computer device that allows for the connection of input
and output devices to an Odoo database. An :abbr:`IoT (Internet of Things)` box subscription is
required in order to use the :abbr:`IoT (Internet of Things)` box with a secured connection. A
computer is also required to set up the :abbr:`IoT (Internet of Things)` box.
The IoT system needs to know to which Odoo's instance it should interact.
This is done by **pairing** the IoT system with the Odoo instance.
.. seealso::
`IoT Box FAQ <https://www.odoo.com/app/iot-faq>`_
Prerequisites
=============
Begin the :abbr:`IoT (Internet of Things)` configuration process by :ref:`installing the IoT app
<general/install>` on the Odoo database through the :menuselection:`Apps` application.
* An Odoo database with the IoT app installed
* An IoT System
.. image:: connect/install-iot-app.png
:align: center
:alt: The Internet of Things (IoT) app on the Odoo database.
.. seealso::
:doc:`../iot_system`
Next, after the *IoT app* is installed, navigate to :menuselection:`IoT app --> IoT Boxes`, and then
click on the :guilabel:`Connect` button located in the upper-left corner of the :menuselection:`IoT
Boxes` dashboard.
* The IoT system connected to the enterprise network
.. image:: connect/connect-iot.png
:align: center
:alt: Connecting an IoT box to the Odoo database.
.. tabs::
There are two recommended ways to connect the :abbr:`IoT (Internet of Things)` box to the database
once the *IoT app* is installed. Follow the steps in either of the next two sections to connect the
:abbr:`IoT (Internet of Things)` box via :ref:`wired ethernet connection <iot_connect/ethernet>` or
via :ref:`WiFi <iot_connect/wifi>`.
.. group-tab:: IoT Box
.. seealso::
:doc:`../iot_system/iot_box/connect`
.. image:: connect/connect-iot-box.png
:align: center
:alt: Connection steps for a wired connection or WiFi connection.
.. group-tab:: Windows IoT
This can be via WiFi or Ethernet connection of the windows Computer
* A computer/mobile/tablet connected to the **same network** as the IoT system
Steps
=====
There is two ways to connect an IoT System to an Odoo database:
A. :ref:`connect-pairing-code`
B. :ref:`connect-token`
.. _connect-pairing-code:
Using the pairing code
----------------------
The pairing code is a unique random 6 characters code that is displayed on the IoT System screen when it starts.
.. important::
The disk image that the :abbr:`IoT (Internet of Things)` box SD card is formatted with is unique
to the version of the Odoo database that the :abbr:`IoT (Internet of Things)` box is running on.
Ensure that the :abbr:`IoT (Internet of Things)` box is :ref:`flashed <iot/config/flash>` with
the most up-to-date disk image.
.. _iot_connect/ethernet:
Ethernet connection
===================
The following is the process to connect the :abbr:`IoT (Internet of Things)` box via an ethernet
cable to the Odoo database (by way of the ethernet port; RJ-45).
First, connect all wired devices to the :abbr:`IoT (Internet of Things)` box (ethernet, :abbr:`USB
(Universal Serial Bus)` devices, etc.). At minimum, an HDMI screen should be connected. Then, plug
the :abbr:`IoT (Internet of Things)` box into a power source.
Immediately after the unit powers on and boots up, read the *pairing code* from the screen or from
the printout of a receipt printer connected to the :abbr:`IoT (Internet of Things)` box.
.. warning::
By default, the :abbr:`IoT (Internet of Things)` box will display the *pairing code* for a
maximum of 5 minutes after the unit boots up. After 5 minutes, the *pairing code* will disappear
for security purposes and the :abbr:`IoT (Internet of Things)` box will need to be rebooted
manually by unplugging the unit from the power source for ten seconds and re-plugging it back in.
.. note::
If no screen is attached to the :abbr:`IoT (Internet of Things)` box, then the *pairing code* can
be accessed from the :abbr:`IoT (Internet of Things)` box homepage by clicking on the
:guilabel:`POS Display` button. For instructions on how to access the :abbr:`IoT (Internet of
Things)` box homepage visit :ref:`iot_connect/token`.
1. Make sure the IoT System is powered on and connected to the network
On the computer, navigate to :menuselection:`IoT app --> IoT Boxes`, and then click on the
:guilabel:`Connect` button located in the upper-left corner of the the :menuselection:`IoT Boxes`
dashboard. Input the *pairing code* in the :guilabel:`Pairing Code` field and click on the
:guilabel:`Pair` button. The database will now link to the :abbr:`IoT (Internet of Things)` box and
it will appear on the :menuselection:`IoT Boxes` page.
.. tabs::
.. _iot_connect/wifi:
.. group-tab:: IoT Box
WiFi connection
===============
If you have the possibility to connect a screen or a printer to the IoT box (even temporarily), the steps are easier.
The following is the process to connect the :abbr:`IoT (Internet of Things)` box via a WiFi
connection to the Odoo database.
.. warning::
The screen/printer must be plugged in the IoT box before it boots up.
You need to reboot the IoT box if you plug the screen/printer after the boot by unplugging the power source for 10 seconds then replug it.
First, ensure there is no ethernet cable plugged into the :abbr:`IoT (Internet of Things)` box.
Then, connect all wired devices to the :abbr:`IoT (Internet of Things)` box (:abbr:`USB (Universal
Serial Bus)` devices, etc.).
.. tabs::
After connecting the devices, plug the :abbr:`IoT (Internet of Things)` box into to a power source.
On the computer, navigate to :menuselection:`IoT app --> IoT Boxes`, and then click on the
:guilabel:`Connect` button located in the upper-left corner of the the :menuselection:`IoT Boxes`
dashboard. Then copy the :guilabel:`Token` from the :guilabel:`WiFi connection` section as this will
later be used to link the Odoo database to the :abbr:`IoT (Internet of Things)` box.
.. tab:: Screen connected
Back on the computer, navigate to the available WiFi networks and connect to the :abbr:`IoT
(Internet of Things)` box WiFi network. The WiFi network dispersed by the :abbr:`IoT (Internet of
Things)` box will start with `IoTBox-xxxxxxxxxx`.
If you have a screen connected to the IoT box, the pairing code should be displayed on the screen a few minutes after the IoT box boots up.
.. image:: connect/connect-iot-wifi.png
:align: center
:alt: WiFi networks available on the computer.
2. Read the pairing code displayed on the IoT box screen
Upon connecting to the :abbr:`IoT (Internet of Things)` box WiFi, a browser will automatically
redirect to the :menuselection:`Configure Iot Box` wizard. Name the :abbr:`IoT (Internet of Things)`
box, then paste the previously copied *token* into the :guilabel:`Server Token` field, and then
click on :guilabel:`Next`.
.. tab:: Printer connected
If you have a printer connected to the IoT box, the pairing code should be printed automatically on boot
.. image:: connect/server-token.png
:align: center
:alt: Enter the server token into the IoT box.
2. Read the pairing code from the printed receipt
.. note::
If the :abbr:`IoT (Internet of Things)` box WiFi connection wizard doesn't start, then see the
documentation on :ref:`connecting with a token <iot_connect/token>`.
.. tab:: No screen or printer connected
Now, choose the WiFi network that the :abbr:`IoT (Internet of Things)` box will connect with (enter
the password if there is one) and click on :guilabel:`Connect`. Wait a few seconds and the browser
will redirect to the :abbr:`IoT (Internet of Things)` box homepage. The computer may need to be
manually re-connected back to the original WiFi connection, if this does not happen automatically.
This will be more complicated and technical as you will need to find the IP address of the IoT box.
.. image:: connect/configure-wifi-network-iot.png
:align: center
:alt: Configuring the WiFi for the IoT box.
2. Browse to your IoT box IP address in the computer browser, this should display the IoT box homepage with the pairing code value
.. note::
The IP address can be accessed by the router admin interface that the IoT box is connected to.
You can also install third-party software to scan the network and find the IoT box IP address.
After completing each step, the :abbr:`IoT (Internet of Things)` box should appear when navigating
to :menuselection:`IoT app --> IoT Boxes` on the Odoo database.
.. image:: connect/iot-box-connected.png
:align: center
:alt: The IoT box has been successfully configured on the Odoo database.
.. group-tab:: Windows IoT
2. On the Windows IoT computer, make sure the IoT homepage is opened in your browser, this should display the IoT box homepage with the pairing code value
.. important::
The :abbr:`IoT (Internet of Things)` box may need to be manually rebooted upon successfully
connecting via WiFi for the box to appear in the *IoT app* on the Odoo database. To do so, simply
unplug the device and plug it back into the power source after ten seconds.
.. note::
The IoT homepage is accessible by browsing to `http://localhost:8069` in your browser.
If not, it means that either there is an error in the IoT app installation or the IoT app is not installed.
Try to re-install it and contact Odoo's support if the issue persists.
.. _iot_connect/token:
Manually connecting the IoT box using the token
===============================================
3. Navigate to the IoT app in Odoo and click on the `Connect` button. This will show a connection pop-up
4. Enter the pairing code in the `Pairing Code` field and click on the `Pair` button
A manual connection of the :abbr:`IoT (Internet of Things)` box to the :abbr:`IoT (Internet of
.. TODO: add pop up image once the design is ready
.. _connect-token:
Using the connection token
--------------------------
A manual connection of the :abbr:`IoT (Internet of Things)` system to the :abbr:`IoT (Internet of
Things)` app can be made using the *token*, from a computer. The *token* can be found by navigating
to :menuselection:`IoT app --> IoT Boxes` and clicking on :guilabel:`Connect`.
to :menuselection:`IoT app --> IoT Systems` and clicking on :guilabel:`Connect`.
Under the :guilabel:`WiFi Connection` section of the :guilabel:`Connect an IoT Box` page that
appears, click :guilabel:`Copy` to the right of the :guilabel:`Token`. This token will be entered
into the :abbr:`IoT (Internet of Things)` box homepage.
into the :abbr:`IoT (Internet of Things)` system homepage.
Access the :abbr:`IoT (Internet of Things)` box homepage by entering the :abbr:`IP (Internet
Protocol)` address of the :abbr:`IoT (Internet of Things)` box into a browser window from a computer
on the same network as the :abbr:`IoT (Internet of Things)` box (preferably by ethernet connection).
Access the :abbr:`IoT (Internet of Things)` system homepage by entering the :abbr:`IP (Internet
Protocol)` address of the :abbr:`IoT (Internet of Things)` system into a browser window from a computer
on the same network as the :abbr:`IoT (Internet of Things)` system (preferably by ethernet connection).
.. note::
The :abbr:`IP (Internet Protocol)` address can be accessed by the router admin console that the
:abbr:`IoT (Internet of Things)` box is connected to, or by connecting a receipt printer to the
:abbr:`IoT (Internet of Things)` box. A receipt will print out with the :abbr:`IoT (Internet of
Things)` box's :abbr:`IP (Internet Protocol)` address on it.
:abbr:`IoT (Internet of Things)` system is connected to, or by connecting a receipt printer to the
:abbr:`IoT (Internet of Things)` system. A receipt will print out with the :abbr:`IoT (Internet of
Things)` system's :abbr:`IP (Internet Protocol)` address on it.
On the :abbr:`IoT (Internet of Things)` box homepage, enter the *token* under the :guilabel:`Server`
On the :abbr:`IoT (Internet of Things)` system homepage, enter the *token* under the :guilabel:`Server`
section by clicking on :guilabel:`Configure`. Then, paste the *token* into the :guilabel:`Server
Token` field and click :guilabel:`Connect`. The :abbr:`IoT (Internet of Things)` box will then link
Token` field and click :guilabel:`Connect`. The :abbr:`IoT (Internet of Things)` system will then link
to the Odoo database.
.. _iot/connect_schema:
Successful Connection
=====================
IoT box schema
==============
If the connection is successful, the IoT system will be displayed in the IoT app under :menuselection:`IoT app --> IoT Systems`.
Raspberry Pi 4
--------------
FAQ
===
.. figure:: connect/iot-box-schema.png
The pairing token does not appear or does not work
--------------------------------------------------
The Odoo IoT box (Raspberry Pi 4) schema with labels.
The pairing code should be printed on receipt printers connected to the :abbr:`IoT (Internet of
Things)` box and should also be displayed on connected monitors.
Raspberry Pi 3
--------------
The pairing code does not show under the following circumstances:
.. figure:: connect/iox-box-schema-3.png
- The :abbr:`IoT (Internet of Things)` system is already connected to an Odoo database.
- The :abbr:`IoT (Internet of Things)` system is not connected to the Internet.
- The code is only valid for 5 minutes after the :abbr:`IoT (Internet of Things)` system has started.
It is automatically removed from connected displays when this time has expired.
- The version of the :abbr:`IoT (Internet of Things)` system image is too old.
The Odoo IoT box (Raspberry Pi 3) schema with labels.
.. seealso::
:doc:`iot/config/flash`
You can always default to the manual connection using the connection token in case of troubles
IoT system is connected but it is not showing in the database
-------------------------------------------------------------
When an :abbr:`IoT (Internet of Things)` system connects to a database, it may restart. If so, it can
take up to five minutes before appearing in the database. If the :abbr:`IoT (Internet of Things)`
system is still not showing after five minutes, make sure that the :abbr:`IoT (Internet of Things)` system
can reach the database and that the server does not use a multi-database environment.
To access the database from the :abbr:`IoT (Internet of Things)` system, open a browser and type in the
database address.
The IoT system is connected to the Odoo database, but cannot be reached
-----------------------------------------------------------------------
Make sure that the :abbr:`IoT (Internet of Things)` system and the computer running the browser are
located on the same network, as the :abbr:`IoT (Internet of Things)` system cannot be reached from
outside the local network.
I see a yellow box warning me regarding HTTPS, what does it means?
------------------------------------------------------------------
.. seealso::
:doc:`HTTPS certificate (IoT) <https_certificate_iot>`
The link given in Odoo IoT app redirect me to a page with an error in the browser
---------------------------------------------------------------------------------
.. seealso::
`<iot/dns-issue-solution>`
Does it work with a on-premise/self-hosted Odoo instance ?
----------------------------------------------------------
Yes on some conditions.
You will have to be careful that your `web.base.url` is correctly set up in the Odoo System Parameter.
You can not use values such as "localhost" or "127.0.0.1" as the IoT system will not be able to connect to your Odoo instance with these values.
If your database is hosted on a local network, you will need to use the local IP address of the server hosting the Odoo instance.
.. important::
The IoT do assume that it is a "one database" environement. If you are using a multi-database environement, the IoT system will not work.
If you use multiple databases, you will have to make sure that the URL set target one and only one database.
@@ -235,6 +235,7 @@ These :abbr:`DNS (Domain Name System)` issues may appear as the following in dif
DNS issue on Edge browser on Windows 10.
.. _iot/dns-issue-solution:
Domain Name System (DNS) issue solution
---------------------------------------
@@ -2,66 +2,6 @@
Troubleshooting
===============
IoT box connection
==================
Unable to locate the pairing code to connect the IoT box
--------------------------------------------------------
The pairing code should be printed on receipt printers connected to the :abbr:`IoT (Internet of
Things)` box and should also be displayed on connected monitors.
The pairing code does not show under the following circumstances:
- The :abbr:`IoT (Internet of Things)` box is already connected to an Odoo database.
- The :abbr:`IoT (Internet of Things)` box is not connected to the Internet.
- The code is only valid for 5 minutes after the :abbr:`IoT (Internet of Things)` box has started.
It is automatically removed from connected displays when this time has expired.
- The version of the :abbr:`IoT (Internet of Things)` box image is too old. If the :abbr:`IoT
(Internet of Things)` box image is from an earlier version, then the SD card of the :abbr:`IoT
(Internet of Things)` box needs to be re-flashed to update the image (see :ref:`Flashing the SD
Card <iot/config/flash>`).
If none of the cases listed above correct the issue, then make sure the :abbr:`IoT (Internet of
Things)` box has correctly started, by checking that a fixed green LED is showing next to the power
port.
IoT box is connected but it is not showing in the database
----------------------------------------------------------
When an :abbr:`IoT (Internet of Things)` box connects to a database, it may restart. If so, it can
take up to five minutes before appearing in the database. If the :abbr:`IoT (Internet of Things)`
box is still not showing after five minutes, make sure that the :abbr:`IoT (Internet of Things)` box
can reach the database and that the server does not use a multi-database environment.
To access the database from the :abbr:`IoT (Internet of Things)` box, open a browser and type in the
database address.
The IoT box is connected to the Odoo database, but cannot be reached
--------------------------------------------------------------------
Make sure that the :abbr:`IoT (Internet of Things)` box and the computer running the browser are
located on the same network, as the :abbr:`IoT (Internet of Things)` box cannot be reached from
outside the local network.
The HTTPS certificate does not generate
---------------------------------------
In order to generate a :abbr:`HTTPS (Hypertext Transfer Protocol Secure)` certificate, an IoT box
subscription is required for the :abbr:`IoT (Internet of Things)` box. Connecting the :abbr:`IoT
(Internet of Things)` box prior to configuring an :abbr:`IoT (Internet of Things)` subscription for
the database and :abbr:`IoT (Internet of Things)` box with the Account Manager will result in an
unsecured connection.
In addition, a firewall can also prevent the :abbr:`HTTPS (Hypertext Transfer Protocol Secure)`
certificate from generating correctly. In this case, deactivate the firewall until the certificate
is successfully generated. It should also be noted that certain devices, such as a router that has
a built-in firewall, can prevent the :abbr:`HTTPS (Hypertext Transfer Protocol Secure)` certificate
from generating.
.. seealso::
:doc:`HTTPS certificate (IoT) <https_certificate_iot>`
Printer
=======
@@ -2,8 +2,8 @@
Updating (IoT)
==============
Due to the complexity of the :abbr:`IoT (Internet of Things)` box, and virtual Windows :abbr:`IoT
(Internet of Things)` box, the term 'updating' can mean several different things.
Due to the complexity of the :abbr:`IoT (Internet of Things)` systems,
the term 'updating' can mean several different things.
The actual drivers can be updated, the core code on the :abbr:`IoT (Internet of Things)` box can be
updated, or a new image can be flashed (using a physical :abbr:`IoT (Internet of Things)` box).
@@ -13,187 +13,64 @@ smooth operation of :abbr:`IoT (Internet of Things)` box processes and devices.
.. _iot/config/flash:
Flashing the SD card on IoT box
===============================
Image Update
============
.. important::
This update does **not** apply to the Windows :abbr:`IoT (Internet of Things)` box (Odoo 16 and
higher).
.. tabs::
To update the Windows :abbr:`IoT (Internet of Things)`, first, uninstall the previous version of
the Odoo Windows program, and then reinstall it using the most up-to-date installation package.
.. group-tab:: IoT Box
To begin the installation, navigate to the Odoo 16 (or higher) installation package for
Enterprise or Community - Windows edition, at `Odoo's download page
<https://odoo.com/download>`_.
.. seealso::
:doc:`../iot_system/iot_box/flash`
In some circumstances, the :abbr:`IoT (Internet of Things)` box's micro SD Card may need to be
re-flashed with *Etcher* software to benefit from Odoo's latest :abbr:`IoT (Internet of Things)`
image update. This means the Odoo :abbr:`IoT (Internet of Things)` box software may need to be
updated in instances of a new :abbr:`IoT (Internet of Things)` box, or when a handler's update, or
an update from the :abbr:`IoT (Internet of Things)` box home page, does not resolve issues.
.. group-tab:: Windows IoT
To update the Windows :abbr:`IoT (Internet of Things)` image, first, uninstall the previous version of
the Odoo Windows program, and then reinstall it using the most up-to-date installation package.
.. note::
- It is often necessary to re-flash the :abbr:`IoT (Internet of Things)` box's image after
upgrading the Odoo database to a new version.
- A computer with a micro SD card reader/adapter is **required** to re-flash the micro SD card.
.. seealso::
- :doc:`../iot_system/windows_iot/remove`
- :doc:`../iot_system/windows_iot/install`
First, begin by downloading `Etcher <https://www.balena.io/etcher#download-etcher>`_. It is a free,
open-source utility, used for burning image files onto drives. After the download completes, install
and launch the program on the computer.
Core Code Update
================
Then, download the latest :abbr:`IoT (Internet of Things)` image from `nightly
<http://nightly.odoo.com/master/iotbox>`_, which will be labeled as `iotbox-latest.zip`. This
particular image is compatible with *all* supported versions of Odoo.
.. tabs::
After this step is complete, insert the :abbr:`IoT (Internet of Things)` box's micro SD card into
the computer or reader. Open *Etcher*, and select :guilabel:`Flash from file`, then find and select
the `iotbox-latest.zip` image and extract it. Next, select the drive the image should be burned to.
.. group-tab:: IoT Box
Lastly, click :guilabel:`Flash`, and wait for the process to finish.
In the background, the :abbr:`IoT (Internet of Things)` box uses a version of Odoo code to run and
connect to the Odoo database. This code may need to be updated in order for the :abbr:`IoT (Internet
of Things)` box to operate effectively. This operation should be completed on a routine basis, to
ensure the :abbr:`IoT (Internet of Things)` system, and its processes, stay up-to-date.
.. image:: updating_iot/etcher-app.png
:align: center
:alt: Balena's Etcher software dashboard.
Go to the :abbr:`IoT (Internet of Things)` box home page by navigating to :menuselection:`IoT app
--> IoT Boxes`, and clicking on the :guilabel:`IP address` of the :abbr:`IoT (Internet of Things)`
box. Then, click on :guilabel:`Update` (next to the version number).
.. tip::
Balena's *Etcher* software also allows for the administrator to flash the :abbr:`SD (Secure
Digital)` card from a :abbr:`URL (Uniform Resource Locator)`. To flash from a :abbr:`URL (Uniform
Resource Locator)`, simply click :guilabel:`Flash from URL`, instead of :guilabel:`Flash from
file`.
If a new version of the :abbr:`IoT (Internet of Things)` box image is available, an
:guilabel:`Upgrade to _xx.xx_` button appears at the bottom of the page. Click this button to
upgrade the unit, at which point the :abbr:`IoT (Internet of Things)` box flashes itself to the
newer version. All of the previous configurations are then saved.
Then, enter the following: `http://nightly.odoo.com/master/iotbox/iotbox-latest.zip`.
.. important::
This process can take more than 30 minutes. Do **not** turn off, or unplug, the :abbr:`IoT
(Internet of Things)` box, as it would leave it in an inconsistent state. This means the
:abbr:`IoT (Internet of Things)` box needs to be :ref:`re-flashed <iot/config/flash>` with a new
image.
.. image:: updating_iot/url-flash.png
:align: center
:alt: A view of Balena's Etcher software, with the flash from URL option highlighted.
.. image:: updating_iot/flash-upgrade.png
:align: center
:alt: IoT box software upgrade in the IoT Box Home Page.
.. note::
An alternative software for flashing the micro SD card is `Raspberry Pi Imager
<https://www.raspberrypi.com/software/>`_.
.. group-tab:: Windows IoT
Windows IoT update
==================
To update the Windows :abbr:`IoT (Internet of Things)` core code, first, uninstall the previous version of
the Odoo Windows program, and then reinstall it using the most up-to-date installation package.
Windows virtual :abbr:`IoT (Internet of Things)` box may occasionally need an update to work
properly.
The following processes cover the :ref:`uninstallation <iot/config/uninstall-windows-iot>` and
:ref:`re-installation <iot/config/re-install-windows-iot>` of the Windows virtual :abbr:`IoT
(Internet of Things)` box.
.. _iot/config/uninstall-windows-iot:
Uninstalling Windows IoT
------------------------
Prior to upgrading the Windows virtual :abbr:`IoT (Internet of Things)` box, the previous version
should be uninstalled first.
.. important::
Before uninstalling a previous version of the Windows virtual :abbr:`IoT (Internet of Things)`
box, ensure that there is a newer version of Windows virtual :abbr:`IoT (Internet of Things)` box
available, compared to the version currently installed. To do so, navigate to the `Odoo Nightly
builds <https://nightly.odoo.com/>`_ page.
On the :guilabel:`Odoo Nightly builds` page, navigate to :menuselection:`Builds (stable version)
--> windows/` to view the date next to the :file:`odoo_(version).latest.exe` file; where
*(version)* is equal to the version of Odoo (e.g. 16.0, 17.0). The latest version of the Windows
virtual :abbr:`IoT (Internet of Things)` box can be downloaded by selecting this file, or it is
always available at the `Odoo Download <https://odoo.com/download/>`_ page.
Uninstalling the Windows virtual :abbr:`IoT (Internet of Things)` box is done through the Windows
program manager.
On any version of Windows, search for `program` to open the :menuselection:`Programs --> Programs
and Features` section of the :guilabel:`Control Panel`. Then, select :guilabel:`Uninstall or change
a program`. Next, search for `Odoo`, and click the :guilabel:`... (three dot)` menu on the
:guilabel:`Odoo.exe` program to uninstall.
Confirm the uninstallation, and follow the steps to uninstall through the Odoo uninstall wizard.
.. _iot/config/re-install-windows-iot:
Download and re-install
-----------------------
The latest version of the Windows virtual :abbr:`IoT (Internet of Things)` box can be downloaded
from the `Odoo Nightly builds <https://nightly.odoo.com/>`_ page or it is always available at the
`Odoo Download <https://odoo.com/download/>`_ page.
To download from the :guilabel:`Odoo Nightly builds` page, navigate to :menuselection:`Builds
(stable version) --> windows/` to and select the :file:`odoo_(version).latest.exe` file; where
*(version)* is equal to the version of Odoo (e.g. 16.0, 17.0).
To download from the :guilabel:`Odoo Download` page, find the section for the version of Odoo (e.g.
16.0, 17.0), and select the :guilabel:`Download` button for :guilabel:`Windows`.
Next, install and setup the downloaded Odoo :file:`.exe` file. After the instructions screen, click
:guilabel:`Next` to start the installation, and agree to the :abbr:`TOS (Terms of Service)`.
During the next step of the re-installation, select :guilabel:`Odoo IoT` from the :guilabel:`Select
the type of install` drop-down menu.
.. example::
For reference, the following should be installed:
- :guilabel:`Odoo server`
- :guilabel:`Odoo IoT`
- :guilabel:`Nginx WebServer`
- :guilabel:`Ghostscript interpreter`
Ensure there is enough space on the computer for the installation, then click :guilabel:`Next`.
Set the destination and complete the installation
-------------------------------------------------
To complete the re-installation, select the :guilabel:`Destination Folder`, and click
:guilabel:`Install`.
.. warning::
Choosing `C:\\odoo` as the install location allows for the *Nginx* server to start. Odoo's
Windows virtual :abbr:`IoT (Internet of Things)` box software should **not** be installed inside
any of the Windows user's directories. Doing so does **not** allow for *Nginx* to initialize.
The installation may take a few minutes. When complete, click :guilabel:`Next` to continue.
Then, ensure that the :guilabel:`Start Odoo` box is checked, and click :guilabel:`Finish`. After
installation, the Odoo server runs, and automatically opens `http://localhost:8069` on a web
browser. The webpage should display the :abbr:`IoT (Internet of Things)` box homepage.
.. tip::
A :ref:`restart <iot/restart_windows_iot>` of the Windows IoT program may be necessary if the web
browser does not display anything.
.. _iot/config/homepage-upgrade:
Update from the IoT box home page
=================================
In the background, the :abbr:`IoT (Internet of Things)` box uses a version of Odoo code to run and
connect to the Odoo database. This code may need to be updated in order for the :abbr:`IoT (Internet
of Things)` box to operate effectively. This operation should be completed on a routine basis, to
ensure the :abbr:`IoT (Internet of Things)` system, and its processes, stay up-to-date.
Go to the :abbr:`IoT (Internet of Things)` box home page by navigating to :menuselection:`IoT app
--> IoT Boxes`, and clicking on the :guilabel:`IP address` of the :abbr:`IoT (Internet of Things)`
box. Then, click on :guilabel:`Update` (next to the version number).
If a new version of the :abbr:`IoT (Internet of Things)` box image is available, an
:guilabel:`Upgrade to _xx.xx_` button appears at the bottom of the page. Click this button to
upgrade the unit, at which point the :abbr:`IoT (Internet of Things)` box flashes itself to the
newer version. All of the previous configurations are then saved.
.. important::
This process can take more than 30 minutes. Do **not** turn off, or unplug, the :abbr:`IoT
(Internet of Things)` box, as it would leave it in an inconsistent state. This means the
:abbr:`IoT (Internet of Things)` box needs to be :ref:`re-flashed <iot/config/flash>` with a new
image.
.. image:: updating_iot/flash-upgrade.png
:align: center
:alt: IoT box software upgrade in the IoT Box Home Page.
.. seealso::
- :doc:`../iot_system/windows_iot/remove`
- :doc:`../iot_system/windows_iot/install`
Handler (driver) update
=======================
@@ -1,314 +0,0 @@
========================
Connect Windows IoT Odoo
========================
A Virtual IoT box is a computer program that needs to be downloaded and installed on a Windows
computer. This requires a Windows operating system with an Odoo 16 or later database.
The Windows virtual :abbr:`IoT (Internet of Things)` box works the same way as a physical :abbr:`IoT
(Internet of Things)` box, with the ability to run most of the same devices. All :abbr:`POS (Point
of Sale)` devices work with it, such as a scale or printer. Payment terminals will also work, but it
should be noted that :abbr:`MRP (Material Requirement Planning)` devices are not compatible. *These
include cameras or measurement tools.*
Pre-requisites
==============
The following items will be needed to complete the Windows :abbr:`IoT (Internet of Things)`
installation.
- Odoo 16 database or any version above.
- :abbr:`IoT (Internet of Things)` compatible devices (except those mentioned above). Refer to:
`Odoo's compatible IoT devices <https://www.odoo.com/app/iot-hardware>`_.
- Device drivers for Windows.
.. note::
Odoo recommends using an updated, recent version of Windows (Windows 10/11) as some older
operating systems can cause the Windows virtual :abbr:`IoT (Internet of Things)` to not work.
- Windows computer (laptop, desktop, or server).
- Odoo :abbr:`IoT (Internet of Things)` subscription. Refer to: :ref:`iot/iot-eligibility`.
Connect the Windows virtual IoT box to an Odoo database
=======================================================
The Windows virtual IoT box is simple to setup in just a few easy steps. Follow this process when
installing the Windows virtual IoT software for the first time.
Download and initial installation
---------------------------------
To begin the installation, navigate to the Odoo 16 or higher installation package for Community -
Windows edition at `Odoo's download page <https://odoo.com/download>`_. Next, install and setup the
Odoo :file:`.exe` file. After the instructions screen, click :guilabel:`Next` to start the
installation and agree to the :abbr:`TOS (Terms of Service)`.
During the next step of the installation, select :guilabel:`Odoo IoT` from the :guilabel:`Select the
type of install` drop-down menu.
.. example::
For reference, the following should be installed:
- **Odoo server**
- **Odoo IoT**
- **Nginx WebServer**
- **Ghostscript interpreter**
Ensure there is enough space on the computer for the installation and click :guilabel:`Next`.
Setting the destination and completing the installation
-------------------------------------------------------
To complete the installation, select the :guilabel:`Destination Folder` and click
:guilabel:`Install`.
.. tip::
Choosing ``C:\odoo`` as the install location will allow for the Nginx server to start. If the
folder doesn't exist, then create it. Otherwise the installation files will be spread throughout
the hard drive.
.. warning::
Odoo's Windows virtual IoT software should not be installed inside any of the Window's User's
directories. Doing so will not allow for Nginx to initialize.
The installation may take a few minutes. When complete, click :guilabel:`Next` to continue.
Ensure that the :guilabel:`Start Odoo` box is checked and click :guilabel:`Finish`. After
installation, the Odoo server will run and automatically open `http://localhost:8069` on a web
browser. The webpage should display the :abbr:`IoT (Internet of Things)` box homepage.
.. seealso::
A restart of the Windows IoT program may be necessary should the web browser not display
anything. :ref:`iot/restart_windows_iot`
Connecting devices
------------------
Next, connect the :abbr:`IoT (Internet of Things)` devices to the Windows computer. Windows should
automatically detect the device because the driver is pre-installed on the computer. If not, search
for and install the Windows driver for the device.
.. important::
Most devices connect to the Windows Machine for Windows IoT automatically through Windows
Plug-N-Play (PnP). However, if Windows does not automatically recognize the device after
connecting, then the administrator may need to install the corresponding drivers manually.
Devices automatically recognized:
- Regular ink/toner based printers
- Receipt printers (Epson/Star)
- Barcode scanners
- Measurement devices (although some configuration of the measurement device settings is
required) See this documentation: :doc:`../devices/measurement_tool`
Devices not automatically recognized (requires manual driver download):
- Label printers (Zebra)
- Scales
Reference the manufacturer's website for the equipment in question. Then, download the drivers
and install them on the Windows machine. Reconnect the device in question and Windows will find
the device.
Following connecting devices to the computer, refresh the :abbr:`IoT (Internet of Things)` box
homepage and verify the device is seen. If not, reload the handlers through the :abbr:`IoT (Internet
of Things)` box homepage.
Finally, connect Windows :abbr:`IoT (Internet of Things)` to a database using existing instructions
(manually using the Token).
.. seealso::
:doc:`/applications/general/iot/config/connect`
Now the installation is complete, the devices connected to :abbr:`IoT (Internet of Things)` can be
used to complete processes/actions.
Troubleshooting
===============
.. _iot/restart_windows_iot:
Restart Windows IoT box
-----------------------
In some instances a manual restart of the physical :abbr:`IoT (Internet of Things)` box can resolve
the issue of an :abbr:`IoT (Internet of Things)` box not showing up on the database. For the Windows
virtual :abbr:`IoT (Internet of Things)` box a manual restart of the Odoo server can resolve
database connection issues.
To restart the virtual Windows IoT server:
#. Type `Services` into the Windows :guilabel:`Search Bar`.
#. Select the :menuselection:`Services` App and scroll down to the :guilabel:`Odoo` service.
#. Right click on :guilabel:`Odoo` and select :guilabel:`Start` or :guilabel:`Restart`. This action
will manually restart the Odoo IoT server.
Firewalls
---------
Firewalls keep devices safe and secure. Sometimes they can block connections that should be made
though. The Windows virtual :abbr:`IoT (Internet of Things)` box software may not be reachable to
the :abbr:`LAN (Local Area Network)` due to a firewall preventing the connection. Consult your local
IT support team to make exceptions (network discovery) in the :abbr:`OS (Operating System)` or
firewall program. Windows has their own firewall as do other virus protection programs.
.. example::
A client might encounter a time when they are able to reach the homepage of the :abbr:`IoT
(Internet of Things)` box, yet they cannot access it from another computer/mobile device/tablet
on the same network.
Making an exception on Windows Defender
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
It is possible to allow other devices to access the Windows virtual :abbr:`IoT (Internet of Things)`
box while keeping the firewall on. This is done by creating a rule on *Windows Defender* and
allowing communication through port `8069`. The following process describes the steps to take in
order to make this exception.
Create a rule in Windows Defender
*********************************
First, open the *Windows Firewall* by navigating to the :menuselection:`Start Menu` and typing in
`Firewall`. Then, open the :menuselection:`Windows Defender Firewall` program. In the left-hand
menu, navigate to :guilabel:`Advanced Settings`.
Once :guilabel:`Advanced Settings` have been selected, click :guilabel:`Inbound Rules` in the
left-hand menu. Then, in the right-hand menu column (under :guilabel:`Inbound Rules`), click on
:guilabel:`New Rule` to create a new rule.
Configure new rule
******************
On the :menuselection:`Rule Type` screen, select :guilabel:`Port`. Then click :guilabel:`Next`. From
the :menuselection:`Protocol and Ports` page leave the rule application to :guilabel:`TCP`. Then,
select :guilabel:`Specific Local Ports` for the :guilabel:`ports` option. In the text box, type in
`8069, 443`. Finally, click :guilabel:`Next` to continue to the next step.
On the :menuselection:`Actions` page, select :guilabel:`Allow the connection` and click
:guilabel:`Next`. The following page on the :menuselection:`Rule Configuration` wizard is the
:guilabel:`Profile` page. On this page, select whichever connection type applies to the network the
Windows machine is operating on. Ideally, select :guilabel:`Private` only connections. The *Private*
connection type is the most secure connection while allowing the selected port to communicate. Click
:guilabel:`Next` to continue.
Finally, assign a new, unique name to the rule. For example, this name can be `Odoo`. Optionally,
add a brief description in the :guilabel:`Description` field. Click :guilabel:`Finish` to complete
the :guilabel:`Rule Configuration` wizard. Now, the new rule is active and devices can connect to
the Windows virtual :abbr:`IoT (Internet of Things)` box.
.. _iot/windows/wordline:
Worldline exception
~~~~~~~~~~~~~~~~~~~
*Worldline* is a payment terminal that can be connected to Odoo's *PoS* (point of sale) system. It
allows for a comprehensive and fluid payment experience for customers. Worldline is available in
Belgium, the Netherlands, and Luxembourg.
When using the Windows IoT server to connect the Worldline payment terminal, it is necessary to
create an exception in the Windows firewall so that a connection can be made between the Odoo
database/:abbr:`IoT (Internet of Things)` box and Worldline.
.. seealso::
:doc:`../../../sales/point_of_sale/payment_methods/terminals/worldline`
To create the exception, first, open the *Windows Defender Firewall* app on the Windows machine.
This can be accomplished by typing `windows defender` in the :guilabel:`Search` bar.
Next, click :guilabel:`Advanced settings` in the left menu.
.. image:: windows_iot/advanced-settings.png
:align: center
:alt: Advanced settings option highlighted in the left pane of the Windows Defender Firewall app.
In the left menu, choose :guilabel:`Inbound Rules`.
.. image:: windows_iot/inbound-rules.png
:align: center
:alt: Windows Defender left window pane with inbound rules menu item highlighted.
After selecting :guilabel:`Inbound Rules`, select :guilabel:`New Rule` in the far right menu.
.. image:: windows_iot/new-rule.png
:align: center
:alt: New rule dropdown shown with new rule option highlighted.
Then, for the :guilabel:`Rule Type`, select the radio button for :guilabel:`Port`. Click
:guilabel:`Next` to continue to the rest of the configuration.
.. image:: windows_iot/radio-port.png
:align: center
:alt: Rule Type window open, with the radio button next to port highlighted.
On the :guilabel:`Protocols and Ports` page, choose the radio button for :guilabel:`TCP`, under
:guilabel:`Does this rule apply to TCP or UDP?`.
Next, under :guilabel:`Does this rule apply to all local ports or specific ports?`, select the radio
button for :guilabel:`Specific local ports`. Then, enter `9050`, and click :guilabel:`Next` to
continue.
.. image:: windows_iot/protocol-port.png
:align: center
:alt: Protocol/port configuration window with TCP, specific port (9050) and Next highlighted.
The next screen is the :guilabel:`Action` page. Under :guilabel:`What action should be taken when a
connection matches the specified conditions?`, choose the radio button for :guilabel:`Allow the
connection`. Then, click :guilabel:`Next` to continue.
A :guilabel:`Profile` page appears. Under :guilabel:`When does this rule apply?`, leave the three
boxes checked for: :guilabel:`Domain`, :guilabel:`Private`, and :guilabel:`Public`. Click
:guilabel:`Next` to continue to the naming convention page.
On the :guilabel:`Name` page, enter `Odoo Worldline`, under the :guilabel:`Name` field. Enter a
:guilabel:`Description (optional)`. Finally, once ready, click :guilabel:`Finish`.
The final :guilabel:`Inbound rule` should appear as follows:
.. list-table::
:header-rows: 1
:stub-columns: 1
* -
- Odoo Worldline
* - Profile
- All
* - Enabled
- Yes
* - Action
- Allow
* - Override
- No
* - Program
- Any
* - Local Address
- Any
* - Remote Address
- Any
* - Protocol
- TCP
* - Local Port
- 9050
* - Remote Port
- Any
* - Authorized Users
- Any
* - Authorized Computers
- Any
* - Authorized Local Principals
- Any
* - Local User Owner
- Any
* - PolicyAppld
- None
* - Application Package
- Any
Uninstalling Windows IoT
------------------------
Uninstalling the Windows virtual :abbr:`IoT (Internet of Things)` box is done through the Windows
program manager. Using any Windows version, search for `program`. Then, select :guilabel:`Add or
Remove Programs` located in the control panel. Search for `Odoo` and click the :guilabel:`three dot
menu` to uninstall.
Confirm the un-installation and follow the steps to uninstall through the Odoo uninstall guide.
@@ -0,0 +1,83 @@
:nosearch:
:show-content:
:show-toc:
==========
IoT System
==========
Prerequisite
============
Network
-------
The IoT system needs to be connected to the **same network** as the devices connected to Odoo and the IoT devices.
We do also suppose that the network have an internet access and does not block any communication to and from the IoT system.
.. note::
The internet protocol itself does not matter. The IoT system and the Odoo users can be connected to the network via WiFi or Ethernet.
Odoo Subscription
-----------------
An "IoT box subscription" line is required on your Odoo subscription in order to use the :abbr:`IoT (Internet of Things)` system with a secured connection
.. seealso::
:doc:`config/https_certificate_iot`
System Details
--------------
.. |fa-windows-awesome| raw:: html
<i class="fa fa-windows" aria-hidden="true"></i>
.. |fa-box-awesome| raw:: html
<i class="fa fa-archive" aria-hidden="true"></i>
Before you start using Odoo IoT app, you need to choose an IoT system between:
.. toctree::
:titlesonly:
iot_system/iot_box
iot_system/windows_iot
.. list-table:: IoT System comparison
:widths: 50 50
:header-rows: 1
* - |fa-box-awesome| IoT Box (physical IoT box, raspberry pi IoT box)
- |fa-windows-awesome| Windows IoT (Virtual IoT)
* - Credit cart-size micro-computer with IoT program pre-installed
- Windows program installable on a Windows computer
* - Row 2, column 1
- Row 2, column 3
FAQ
===
What IoT system is the best for me?
-----------------------------------
It depends on your needs.
Windows IoT can be installed on any Windows computer. If you happen to already use it to browse on Odoo, it might be the best choice for you.
If you need a plug-and-play device, the IoT Box is the best choice.
Can I use several IoT systems at the same time?
------------------------------------------------
Yes, you can use several IoT systems at the same time.
Can I use a Mac / Linux computer as an IoT system?
--------------------------------------------------
No, it is only compatible with Windows IoT or raspberry pi (IoT Box).
You can however use third-party software to virtualize Windows IoT on your Mac / Linux computer by using a Windows virtual machine.
However you will receive no support from Odoo on this configuration.
@@ -0,0 +1,31 @@
=======
IoT Box
=======
The IoT Box is a credit card-sized micro-computer with an IoT program pre-installed.
The IoT Box is a plug-and-play device that can be connected to the network via Wi-Fi or Ethernet.
It is used to connect devices to the Odoo database.
.. seealso::
`Order an IoT box <https://www.odoo.com/app/iot>`_
.. toctree::
:titlesonly:
iot_box/connect
iot_box/flash
iot_box/schema
iot_box/ssh_connect
Reflash
=======
.. TODO: add content
Create your IoT Box
===================
.. TODO: add content
@@ -0,0 +1,54 @@
====================================
Connect your IoT Box to Your Network
====================================
Ethernet
========
All IoT boxes are equipped with an Ethernet port.
To connect your IoT box to your network using an Ethernet cable,
simply plug one end of the cable into the Ethernet port on the IoT box and the other end into a free port on your router
(or to an ethernet switch connected to your router).
If the distance between your IoT box and your router is too far for an Ethernet cable, you can instead connect your IoT box to your network using Wi-Fi:
WiFi
====
Prerequisite
------------
* No ethernet cable is connected to the IoT box
* A computer/mobile/tablet with Wifi capabilities
Steps
-----
1. Power on the IoT Box by connecting its the power source cable
2. Wait for the IoT Box to boot up (around 2 minutes)
.. note::
Once booted, the IoT Box will start emitting a WiFi signal prefixed with `IoT-Box-XXXX` where `XXXX` is a random unique identifier
.. image:: connect/connect-iot-wifi.png
:align: center
:alt: WiFi networks available on the computer.
3. With the computer, connect to the IoT Box WiFi.
This should start your web browser and redirect you to the IoT Box homepage
.. note::
Depending on your operating system, the web browser page will not trigger.
If it is the case, you can manually access it by navigating to `http://10.11.12.1` in your web browser
4. On the IoT Box homepage, next to the `Internet Status` section, click on the `Configure` button
5. After the scan of the available WiFi networks, select the network you want to connect to and enter the WiFi password then click on the `Next` button
6. The IoT Box will reboot and connect to the selected WiFi network
.. note::
Once connected to the WiFi network, the IoT Box will stop emit to emit its WiFi signal.
The computer should automatically reconnect to the original WiFi network, if not, you can manually reconnect to it

Before

Width:  |  Height:  |  Size: 53 KiB

After

Width:  |  Height:  |  Size: 53 KiB

@@ -0,0 +1,50 @@
====================
Flashing the IoT Box
====================
In some circumstances, the :abbr:`IoT (Internet of Things)` box's micro SD Card may need to be
re-flashed with *Etcher* software to benefit from Odoo's latest :abbr:`IoT (Internet of Things)`
image update. This means the Odoo :abbr:`IoT (Internet of Things)` box software may need to be
updated in instances of a new :abbr:`IoT (Internet of Things)` box, or when a handler's update, or
an update from the :abbr:`IoT (Internet of Things)` box home page, does not resolve issues.
.. note::
- It is often necessary to re-flash the :abbr:`IoT (Internet of Things)` box's image after
upgrading the Odoo database to a new version.
- A computer with a micro SD card reader/adapter is **required** to re-flash the micro SD card.
First, begin by downloading `Etcher <https://www.balena.io/etcher#download-etcher>`_. It is a free,
open-source utility, used for burning image files onto drives. After the download completes, install
and launch the program on the computer.
Then, download the latest :abbr:`IoT (Internet of Things)` image from `nightly
<http://nightly.odoo.com/master/iotbox>`_, which will be labeled as `iotbox-latest.zip`. This
particular image is compatible with *all* supported versions of Odoo.
After this step is complete, insert the :abbr:`IoT (Internet of Things)` box's micro SD card into
the computer or reader. Open *Etcher*, and select :guilabel:`Flash from file`, then find and select
the `iotbox-latest.zip` image and extract it. Next, select the drive the image should be burned to.
Lastly, click :guilabel:`Flash`, and wait for the process to finish.
.. image:: flash/etcher-app.png
:align: center
:alt: Balena's Etcher software dashboard.
.. tip::
Balena's *Etcher* software also allows for the administrator to flash the :abbr:`SD (Secure
Digital)` card from a :abbr:`URL (Uniform Resource Locator)`. To flash from a :abbr:`URL (Uniform
Resource Locator)`, simply click :guilabel:`Flash from URL`, instead of :guilabel:`Flash from
file`.
Then, enter the following: `http://nightly.odoo.com/master/iotbox/iotbox-latest.zip`.
.. image:: flash/url-flash.png
:align: center
:alt: A view of Balena's Etcher software, with the flash from URL option highlighted.
.. note::
An alternative software for flashing the micro SD card is `Raspberry Pi Imager
<https://www.raspberrypi.com/software/>`_.

Before

Width:  |  Height:  |  Size: 24 KiB

After

Width:  |  Height:  |  Size: 24 KiB

Before

Width:  |  Height:  |  Size: 3.0 KiB

After

Width:  |  Height:  |  Size: 3.0 KiB

@@ -0,0 +1,18 @@
.. _iot/connect_schema:
IoT box schema
==============
Raspberry Pi 4
--------------
.. figure:: schema/iot-box-schema.png
The Odoo IoT box (Raspberry Pi 4) schema with labels.
Raspberry Pi 3
--------------
.. figure:: schema/iox-box-schema-3.png
The Odoo IoT box (Raspberry Pi 3) schema with labels.

Before

Width:  |  Height:  |  Size: 12 KiB

After

Width:  |  Height:  |  Size: 12 KiB

Before

Width:  |  Height:  |  Size: 11 KiB

After

Width:  |  Height:  |  Size: 11 KiB

@@ -1,6 +1,6 @@
==========================
Connect an IoT box via SSH
==========================
=============================
Connect to an IoT box via SSH
=============================
.. |iot| replace:: :abbr:`IoT (Internet of Things)`
.. |SSH| replace:: :abbr:`SSH (secure shell protocol)`
@@ -18,9 +18,6 @@ To provide an |SSH| connection to an Internet of Things (IoT) box, a password ne
First, navigate to the :menuselection:`IoT app --> IoT Boxes`. Click on the IP address of the
appropriate |iot| box.
.. note::
If the desired |iot| box does not appear, see :doc:`troubleshooting` for additional steps.
At the bottom of the |iot| box pop-up window, click :guilabel:`Remote Debug`. This opens the
:guilabel:`Remote Debugging` pop-up window.
@@ -39,8 +36,3 @@ Enter the :guilabel:`Authentication Token` provided by the user attempting to co
box.
Click :guilabel:`Enable Remote Debugging`.
.. seealso::
- :doc:`connect`
- :doc:`troubleshooting`
- :doc:`updating_iot`
@@ -0,0 +1,20 @@
===========
Windows IoT
===========
Windows IoT is a Windows program installable on a Windows machine which allow to use your Windows computer as an IoT system.
.. toctree::
:titlesonly:
windows_iot/install
windows_iot/firewall
windows_iot/restart
windows_iot/remove
Support Scope
=============
As the computer is not an isolated system (as opposed to the IoT box), other installed software can interfere with the IoT system.
We will assume that no third-party software is installed on the Windows IoT device and the default Windows settings/firewall are used.
@@ -0,0 +1,79 @@
==========================================
Configure Windows Firewall for Windows IoT
==========================================
Firewalls keep devices safe and secure. Sometimes they can block connections that should be made
though. The Windows :abbr:`IoT (Internet of Things)` box software may not be reachable to
the :abbr:`LAN (Local Area Network)` due to a firewall preventing the connection. Consult your local
IT support team to make exceptions (network discovery) in the :abbr:`OS (Operating System)` or
firewall program. Windows has their own firewall as do other virus protection programs.
.. example::
A client might encounter a time when they are able to reach the homepage of the :abbr:`IoT
(Internet of Things)` box, yet they cannot access it from another computer/mobile device/tablet
on the same network.
.. important::
We do assume that no third-party firewall software is installed on the Windows IoT device.
If it is the case the client should consult the software documentation for the firewall
Making an exception on Windows Defender
=======================================
It is possible to allow other devices to access the Windows virtual :abbr:`IoT (Internet of Things)`
box while keeping the firewall on. This is done by creating a rule on *Windows Defender* and
allowing communication through certain ports. The following process describes the steps to take in
order to make this exception.
1. open the *Windows Firewall* by navigating to the :menuselection:`Start Menu` and typing in
`Firewall`. Then, open the :menuselection:`Windows Defender Firewall` program. In the left-hand
menu, navigate to :guilabel:`Advanced Settings`
.. image:: firewall/advanced-settings.png
:align: center
:alt: Advanced settings option highlighted in the left pane of the Windows Defender Firewall app.
2. In the left menu, choose :guilabel:`Inbound Rules`.
.. image:: firewall/inbound-rules.png
:align: center
:alt: Windows Defender left window pane with inbound rules menu item highlighted.
3. After selecting :guilabel:`Inbound Rules`, select :guilabel:`New Rule` in the far right menu.
.. image:: firewall/new-rule.png
:align: center
:alt: New rule dropdown shown with new rule option highlighted.
4. For the :guilabel:`Rule Type`, select the radio button for :guilabel:`Port`. Click
:guilabel:`Next` to continue to the rest of the configuration.
.. image:: firewall/radio-port.png
:align: center
:alt: Rule Type window open, with the radio button next to port highlighted.
5. On the :guilabel:`Protocols and Ports` page, choose the radio button for :guilabel:`TCP`, under
:guilabel:`Does this rule apply to TCP or UDP?`.
6. Next, under :guilabel:`Does this rule apply to all local ports or specific ports?`, select the radio
button for :guilabel:`Specific local ports`. Then, enter `8069, 80, 443`, and click :guilabel:`Next` to
continue.
.. important::
Other ports might need to be added depending on the IoT devices you plan to use:
* Worldline: `9050`
..
TODO: check for SIX
7. The next screen is the :guilabel:`Action` page. Under :guilabel:`What action should be taken when a
connection matches the specified conditions?`, choose the radio button for :guilabel:`Allow the
connection`. Then, click :guilabel:`Next` to continue.
8. A :guilabel:`Profile` page appears. Under :guilabel:`When does this rule apply?`, leave the three
boxes checked for: :guilabel:`Domain`, :guilabel:`Private`, and :guilabel:`Public`. Click
:guilabel:`Next` to continue to the naming convention page.
9. On the :guilabel:`Name` page, enter `Odoo`, under the :guilabel:`Name` field. Enter a
:guilabel:`Description (optional)`. Finally, once ready, click :guilabel:`Finish`.

Before

Width:  |  Height:  |  Size: 5.6 KiB

After

Width:  |  Height:  |  Size: 5.6 KiB

Before

Width:  |  Height:  |  Size: 17 KiB

After

Width:  |  Height:  |  Size: 17 KiB

@@ -0,0 +1,44 @@
===================
Install Windows IoT
===================
The latest version of the Windows :abbr:`IoT (Internet of Things)` can be downloaded
from `Odoo Download <https://odoo.com/download/>`_ page.
To download from the :guilabel:`Odoo Download` page, find the section for the version of Odoo (e.g.
16.0, 17.0), and select the :guilabel:`Download` button for :guilabel:`Windows`.
Next, install and setup the downloaded Odoo :file:`.exe` file. After the instructions screen, click
:guilabel:`Next` to start the installation, and agree to the :abbr:`TOS (Terms of Service)`.
During the next step of the installation, select :guilabel:`Odoo IoT` from the :guilabel:`Select
the type of install` drop-down menu.
.. example::
For reference, the following should be installed:
- :guilabel:`Odoo server`
- :guilabel:`Odoo IoT`
- :guilabel:`Nginx WebServer`
- :guilabel:`Ghostscript interpreter`
Ensure there is enough space on the computer for the installation, then click :guilabel:`Next`.
To complete the installation, select the :guilabel:`Destination Folder`, and click
:guilabel:`Install`.
.. warning::
Choosing `C:\\odoo` as the install location allows for the *Nginx* server to start. Odoo's
Windows virtual :abbr:`IoT (Internet of Things)` box software should **not** be installed inside
any of the Windows user's directories. Doing so does **not** allow for *Nginx* to initialize.
The installation may take a few minutes. When complete, click :guilabel:`Next` to continue.
Then, ensure that the :guilabel:`Start Odoo` box is checked, and click :guilabel:`Finish`. After
installation, the Odoo server runs, and automatically opens `http://localhost:8069` on a web
browser. The webpage should display the windows :abbr:`IoT (Internet of Things)` homepage.
.. tip::
A :ref:`restart <iot/restart_windows_iot>` of the Windows IoT program may be necessary if the web
browser does not display anything.
@@ -0,0 +1,13 @@
==================
Remove Windows IoT
==================
Uninstalling the Windows :abbr:`IoT (Internet of Things)` is done through the Windows program manager.
On any version of Windows, search for `program` to open the :menuselection:`Programs --> Programs
and Features` section of the :guilabel:`Control Panel`. Then, select :guilabel:`Uninstall or change
a program`. Next, search for `Odoo`, and click the :guilabel:`... (three dot)` menu on the
:guilabel:`Odoo.exe` program to uninstall.
Confirm the uninstallation, and follow the steps to uninstall through the Odoo uninstall wizard.
@@ -0,0 +1,18 @@
.. _iot/restart_windows_iot:
===================
Restart Windows IoT
===================
In some instances a manual restart of the physical :abbr:`IoT (Internet of Things)` box can resolve
the issue of an :abbr:`IoT (Internet of Things)` box not showing up on the database. For the Windows
virtual :abbr:`IoT (Internet of Things)` box a manual restart of the Odoo server can resolve
database connection issues.
To restart the virtual Windows IoT server:
#. Type `Services` into the Windows :guilabel:`Search Bar`.
#. Select the :menuselection:`Services` App and scroll down to the :guilabel:`Odoo` service.
#. Right click on :guilabel:`Odoo` and select :guilabel:`Start` or :guilabel:`Restart`. This action
will manually restart the Odoo IoT server.