การเชื่อมต่อระบบ IoT กับ Odoo

ข้อกำหนดเบื้องต้น

หากต้องการเชื่อมต่อระบบ IoT กับฐานข้อมูล Odoo ต้องปฏิบัติตามข้อกำหนดเบื้องต้นดังต่อไปนี้:

  • แอป Internet of Things (IoT) ต้อง:ref:ติดตั้ง <general/install>

  • ระบบ IoT ต้องเชื่อมต่อกับเครือข่าย

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

Note

แนะนำให้เชื่อมต่อระบบ IoT กับอินสแตนซ์ การผลิต เนื่องจากสภาพแวดล้อมประเภทอื่นอาจทำให้เกิดปัญหา (เช่น การ:ref:สร้างใบรับรอง HTTPS <iot/https_certificate_iot/iot-eligibility>)

ดูเพิ่มเติม

การเชื่อมต่อ

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

การเชื่อมต่อโดยใช้รหัสจับคู่

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

    หากไม่มีจอภาพภายนอกหรือเครื่องพิมพ์เชื่อมต่อกับ IoT box ให้เข้าถึง:ref:หน้าแรกของ IoT box <iot/iot-box/homepage> รหัสจะแสดงในส่วน:guilabel:รหัสจับคู่

  2. ใน Odoo ให้เปิดแอป IoT และคลิก:guilabel:เชื่อมต่อ

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

  4. Click Pair.

การเชื่อมต่อโดยใช้โทเค็นการเชื่อมต่อ

  1. ใน Odoo ให้เปิดแอป IoT และคลิก:guilabel:เชื่อมต่อ

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

  3. เข้าถึงหน้าแรกของ:ref:IoT box <iot/iot-box/homepage> หรือ:ref:Windows virtual IoT <iot/windows-iot/homepage>

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

  5. วางโทเค็นลงในช่อง:guilabel:โทเค็นเซิร์ฟเวอร์ และคลิก:guilabel:เชื่อมต่อ

แบบฟอร์มระบบ IoT

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 updated every time the IoT system is restarted. To disable automatic updates, uncheck the Automatic drivers update option.

การแก้ไขปัญหา

รหัสจับคู่ไม่ปรากฏหรือใช้งานไม่ได้

:ref:`รหัสจับคู่ <iot/connect/pairing-code>`อาจไม่แสดงหรือพิมพ์ภายใต้สถานการณ์ดังต่อไปนี้:

  • 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

ระบบ IoT อาจใช้เวลาสองสามนาทีในการรีสตาร์ทเมื่อเชื่อมต่อกับฐานข้อมูล หากยังไม่ปรากฏหลังจากผ่านไปสองสามนาที:

  • ตรวจสอบว่าระบบ IoT สามารถเข้าถึงฐานข้อมูลได้ และเซิร์ฟเวอร์ไม่ได้ใช้สภาพแวดล้อมแบบหลายฐานข้อมูล

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

ไม่สามารถเข้าถึงหน้าแรกของ Windows virtual IoT จากอุปกรณ์อื่นได้

ตรวจสอบ การกำหนดค่า 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.