连接 Windows 物联网 Odoo

虚拟物联网盒是一个需要下载并安装到 Windows 计算机上的计算机程序。这需要 Windows 操作系统和 Odoo 16 或更高版本的数据库。

Windows 虚拟 :abbr:`IoT(物联网)`盒子的工作方式与实体 :abbr:`IoT(物联网)`盒子相同,能够运行大多数相同的设备。所有:abbr:`POS(销售点)`设备都能与之配合使用,例如秤或打印机。支付终端也可以使用,但需要注意的是,:abbr:`MRP(物料需求计划)`设备不兼容。这些设备包括照相机或测量工具。

预先要求

完成 Windows :abbr:`IoT(物联网)`安装需要以下物品。

Connect the Windows virtual IoT box to an Odoo database

Windows 虚拟物联网盒子的设置非常简单,只需几步即可完成。首次安装 Windows 虚拟物联网软件时,请遵循以下流程。

下载和首次安装

要开始安装,请在 Odoo 的下载页面 <https://odoo.com/download>`_浏览 Odoo 16 或更高版本的企业或社区 - Windows 版安装包。接下来,安装并设置 Odoo :file:.exe` 文件。在出现说明屏幕后,点击 下一步 开始安装,并同意 TOS(服务条款)

During the next step of the installation, select Odoo IoT from the Select the type of install drop-down menu.

Example

便于参考,应安装以下设备:

  • Odoo 服务器

  • Odoo IoT

  • Nginx WebServer

  • Ghostscript interpreter

确保计算机上有足够的安装空间,然后单击 下一步

设置目的地并完成安装

要完成安装,请选择 目的地文件夹 并单击 安装

小訣竅

选择 C:\odoo 作为安装位置将允许 Nginx 服务器启动。如果文件夹不存在,则创建它。否则,安装文件将遍布整个硬盘。

警告

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.

安装可能需要几分钟时间。完成后,单击 下一步 继续。

Ensure that the Start Odoo box is checked and click Finish. After installation, the Odoo server will run and automatically open http://localhost:8069 on a web browser. The webpage should display the IoT box homepage.

也參考

如果网络浏览器无法显示任何内容,可能需要重新启动 Windows IoT 程序。

连接设备

接下来,将 :abbr:`IoT物联网`设备连接到 Windows 计算机。Windows 应该会自动检测到设备,因为驱动程序已预先安装在电脑上。如果没有,请搜索并安装设备的 Windows 驱动程序。

重要

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)

  • 条形码扫描仪

  • Measurement devices (although some configuration of the measurement device settings is required) See this documentation: Connect a measurement tool

Devices not automatically recognized (requires manual driver download):

  • Label printers (Zebra)

  • 磅秤

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.

将设备连接到计算机后,刷新 :abbr:`IoT(物联网)`盒子主页并验证是否能看到设备。如果没有,请通过 :abbr:`IoT (物联网)`盒子主页重新加载处理程序。

最后,使用现有说明(手动使用令牌)将 Windows :IoT(物联网) 连接到数据库。

现在安装已经完成,连接到 IoT (物联网) 的设备可以用来完成流程/操作。

故障排除

重启 Windows 物联网盒子

在某些情况下,手动重启物理 IoT(物联网) 盒子可以解决数据库中未显示 IoT(物联网) 盒子的问题。对于 Windows 虚拟 IoT(物联网) 盒子,手动重启 Odoo 服务器可解决数据库连接问题。

重新启动虚拟 Windows IoT 服务器:

  1. 在 Windows 搜索栏`中键入`服务

  2. 选择 服务 应用程序并向下滚动到 Odoo 服务。

  3. 右键单击 Odoo 并选择 开始重启。此操作将手动重启 Odoo 物联网服务器。

防火墙

防火墙可确保设备安全。但有时它们会阻止本应进行的连接。由于防火墙阻止了连接,Windows 虚拟 IoT (物联网)`盒子软件可能无法连接到 :abbr:`LAN(局域网)。请咨询当地的 IT 支持团队,在 OS (操作系统) 或防火墙程序中设置例外(网络发现)。Windows 和其他病毒防护程序都自带防火墙。

Example

客户可能会遇到这样的情况:他们能够访问 IoT(物联网) 盒子的主页,但却无法从同一网络上的另一台计算机/移动设备/平板电脑访问该主页。

在 Windows Defender 上设置例外

It is possible to allow other devices to access the Windows virtual IoT 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.

在 Windows Defender 中创建规则

首先,通过导航至 开始菜单`并输入`防火墙`打开*Windows 防火墙*。然后,打开 :menuselection:`Windows Defender 防火墙 程序。在左侧菜单中,导航至 高级设置

Once Advanced Settings have been selected, click Inbound Rules in the left-hand menu. Then, in the right-hand menu column (under Inbound Rules), click on New Rule to create a new rule.

配置新规则

On the Rule Type screen, select Port. Then click Next. From the Protocol and Ports page leave the rule application to TCP. Then, select Specific Local Ports for the ports option. In the text box, type in 8069, 443. Finally, click Next to continue to the next step.

操作 页面,选择 允许连接 并单击 下一步规则配置`向导的下一页是 :guilabel:`配置文件 页面。在此页面中,选择适用于 Windows 机器所运行网络的连接类型。理想情况下,只选择 私有 连接。私有 连接类型是最安全的连接,同时允许所选端口进行通信。单击 下一步 继续。

最后,为规则指定一个新的唯一名称。例如,名称可以是 Odoo。可选择在 描述 字段中添加简要说明。单击 完成,结束:guilabel:规则配置 向导。现在,新规则已激活,设备可以连接到 Windows 虚拟:abbr:IoT(物联网) 盒子。

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/IoT box and Worldline.

也參考

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 Search bar.

Next, click Advanced settings in the left menu.

Advanced settings option highlighted in the left pane of the Windows Defender Firewall app.

In the left menu, choose Inbound Rules.

Windows Defender left window pane with inbound rules menu item highlighted.

After selecting Inbound Rules, select New Rule in the far right menu.

New rule dropdown shown with new rule option highlighted.

Then, for the Rule Type, select the radio button for Port. Click Next to continue to the rest of the configuration.

Rule Type window open, with the radio button next to port highlighted.

On the Protocols and Ports page, choose the radio button for TCP, under Does this rule apply to TCP or UDP?.

Next, under Does this rule apply to all local ports or specific ports?, select the radio button for Specific local ports. Then, enter 9050, and click Next to continue.

Protocol/port configuration window with TCP, specific port (9050) and Next highlighted.

The next screen is the Action page. Under What action should be taken when a connection matches the specified conditions?, choose the radio button for Allow the connection. Then, click Next to continue.

A Profile page appears. Under When does this rule apply?, leave the three boxes checked for: Domain, Private, and Public. Click Next to continue to the naming convention page.

On the Name page, enter Odoo Worldline, under the Name field. Enter a Description (optional). Finally, once ready, click Finish.

The final Inbound rule should appear as follows:

Odoo Worldline

詳情

所有

啟用

動作

允許

Override

計劃

任何

Local Address

任何

Remote Address

任何

Protocol

TCP

Local Port

9050

Remote Port

任何

授權使用者

任何

Authorized Computers

任何

Authorized Local Principals

任何

Local User Owner

任何

PolicyAppld

Application Package

任何

卸载 Windows 物联网盒子

卸载 Windows 虚拟:abbr:IoT(物联网) 盒子可通过 Windows 程序管理器完成。使用任何 Windows 版本,搜索 程序。然后,选择控制面板中的 添加或删除程序。搜索 Odoo `并点击:guilabel: `三点菜单 进行卸载。

确认卸载,并按照 Odoo 卸载指南中的步骤进行卸载。