IoT system connection to Odoo

Prerequisites

To connect the IoT system to an Odoo database, the following prerequisites must be met:

  • The Internet of Things (IoT) app must be installed.

  • The IoT system must be connected to the network.

  • The computer connecting to Odoo must be on the same network as the IoT system.

Note

It is recommended to connect the IoT system to a production instance, as other types of environments may cause issues (e.g., with HTTPS certificate generation).

Connection

The IoT system can be connected to the Odoo database using a pairing code or a connection token.

Connection using a pairing code

Note

  • The pairing code is displayed for up to 5 minutes after the IoT system starts. If the code is no longer visible, reboot the IoT box or restart the Windows virtual IoT service to display the pairing code again. Alternatively, connect the IoT system to the database using a connection token.

  • The pairing code is not displayed if the IoT system is already connected to a database (e.g., a test database).

  1. Retrieve the IoT’s system pairing code:

    Connect the IoT box to an external monitor or printer. If the IoT box was already plugged prior to this, reboot it by unplugging it for a few seconds and replugging it.

    • External monitor: The pairing code should be displayed on the screen a few minutes after rebooting the IoT box.

    • Printer: The pairing code should be printed automatically.

    Tip

    If no external monitor or printer is connected to the IoT box, access the IoT box’s homepage; the code is displayed in the Pairing Code section.

  2. In Odoo, open the IoT app and click Connect.

  3. In the Connect an IoT Box popup that opens, enter the Pairing code.

  4. Click Pair.

Connection using a connection token

  1. In Odoo, open the IoT app and click Connect.

  2. In the Connect an IoT Box popup that opens, copy the Token.

  3. Access the IoT box’s or Windows virtual IoT’s homepage.

  4. In the Odoo database connected section, click Configure.

  5. Paste the token into the Server Token field and click Connect.

IoT system form

Once the IoT system is connected to the Odoo database, it is displayed as a card in the IoT app. Click the IP address on the card to access the IoT box’s or Windows virtual IoT’s homepage. Click the card to access the list of devices connected to the IoT system.

Tip

Enable the developer mode to access the IoT system’s Technical Information, such as its Identifier, Domain address, and Image version.

Note

By default, drivers are automatically udpated every time the IoT system is restarted. To disable automatic updates, uncheck the Automatic drivers update option.

Troubleshooting

The pairing code does not appear or does not work

The pairing code might not be displayed or printed under the following circumstances:

  • The IoT system is not connected to the Internet.

  • The IoT system is already connected to an Odoo database.

  • The pairing code display time has expired. Reboot the IoT box or restart the Windows virtual IoT service to display the pairing code again.

  • The IoT system’s image version is too old and needs to be updated.

The IoT system is connected but does not appear in the database

The IoT system might take a few minutes to restart when it connects to a database. If it still does not appear after a few minutes:

  • Verify that the IoT system can reach the database and the server does not use a multi-database environment.

  • Reboot the IoT box or restart the Windows virtual IoT service.

The IoT box is connected to the Odoo database but cannot be reached

Verify that the IoT system and the computer running the Odoo database are connected to the same network.

The Windows virtual IoT’s homepage cannot be accessed from another device

Check the iot/windows-iot/firewall.

The IoT system is disconnected from the database after an Odoo upgrade

Update the IoT system’s image by flashing the IoT box’s card or uninstalling the Windows virtual IoT program and reinstalling the latest package for Windows matching your database’s version.