Kết nối hệ thống IoT với Odoo

Khoá học tiên quyết

Để kết nối hệ thống IoT với cơ sở dữ liệu Odoo, các điều kiện tiên quyết sau phải được đáp ứng:

  • Ứng dụng Internet of Things (IoT) phải được cài đặt.

  • Hệ thống IoT phải được kết nối với mạng.

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

Ghi chú

Khuyến nghị kết nối hệ thống IoT với phiên bản sản xuất, vì các loại môi trường khác có thể gây ra sự cố (ví dụ: với tạo chứng chỉ HTTPS).

Kết nối

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

Kết nối bằng mã ghép nối

Ghi chú

  • 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.

    Mẹo

    Nếu không có màn hình ngoài hoặc máy in được kết nối với IoT box, hãy truy cập trang chủ của IoT box; mã được hiển thị trong phần Mã Ghép Nối.

  2. Trong Odoo, mở ứng dụng IoT và nhấp vào Kết Nối.

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

  4. Click Pair.

Kết nối bằng mã token kết nối

  1. Trong Odoo, mở ứng dụng IoT và nhấp vào Kết Nối.

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

  3. Truy cập trang chủ của IoT box hoặc Windows virtual IoT.

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

  5. Dán mã token vào trường Mã Token Máy Chủ và nhấp vào Kết Nối.

Biểu mẫu hệ thống IoT

Khi hệ thống IoT được kết nối với cơ sở dữ liệu Odoo, nó sẽ hiển thị dưới dạng thẻ trong ứng dụng IoT. Nhấp vào địa chỉ IP trên thẻ để truy cập trang chủ của hộp IoT hoặc Windows ảo cho IoT. Nhấp vào thẻ để truy cập danh sách các thiết bị được kết nối với hệ thống IoT.

Mẹo

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

Ghi chú

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

Khắc phục sự cố

Mã ghép nối không xuất hiện hoặc không hoạt động

Mã ghép nối có thể không được hiển thị hoặc in trong các trường hợp sau:

  • 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

Hệ thống IoT có thể mất vài phút để khởi động lại khi kết nối với cơ sở dữ liệu. Nếu vẫn không xuất hiện sau vài phút:

  • Xác minh rằng hệ thống IoT có thể truy cập cơ sở dữ liệu và máy chủ không sử dụng môi trường đa cơ sở dữ liệu.

  • 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.

Không thể truy cập trang chủ của Windows virtual IoT từ thiết bị khác

Kiểm tra Cấu hình Windows 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.