连接 Windows IoT Odoo

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

Windows 虚拟 IoT 盒子的工作方式与物理 IoT 盒子相同,能够运行大多数相同的设备。所有 POS 设备都可以与其配合使用,例如秤或打印机。支付终端也可以使用,但需要注意的是 MRP 设备不兼容。 这些设备包括相机或测量工具。

前提条件

完成 Windows IoT 安装需要以下物品。

  • Odoo 16 数据库或任何版本以上。

  • IoT compatible devices (except those mentioned above). Refer to: Odoo’s compatible IoT devices.

  • Windows设备驱动程序。

    注解

    Odoo 建议使用更新的、最新版本的 Windows (Windows 10/11),因为一些旧操作系统可能导致 Windows 虚拟 IoT 无法工作。

  • Windows计算机(笔记本电脑,台式机或服务器)。

  • Odoo IoT 订阅。请参阅: 物联网(IoT)资格

Connect the Windows virtual IoT box to an Odoo database

Windows虚拟物联网盒子的设置非常简单,只需按照以下几个简单步骤进行操作。在首次安装Windows虚拟物联网软件时,请按照以下流程进行操作。

下载和初始安装

要开始安装,请导航到 Odoo 16 或更高版本的企业版或社区版 - Windows 版本的安装包,请访问 Odoo 的下载页面。接下来,安装并设置 Odoo 的 .exe 文件。在指令屏幕后,点击 Next 开始安装并同意 TOS

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

Example

作为参考,应安装以下内容:

  • Odoo 服务器

  • Odoo物联网

  • Nginx WebServer

  • Ghostscript解释器

确保计算机上有足够的空间进行安装,并点击 下一步

设置目标并完成安装

要完成安装,请选择 目标文件夹 并点击 安装

小技巧

选择 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.

另请参阅

如果Web浏览器未显示任何内容,则可能需要重新启动Windows IoT程序。 重新启动 Windows IoT 盒子

Connecting devices

接下来,将 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: 连接测量工具

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.

连接设备到计算机后,刷新 IoT 盒子主页并验证设备是否可见。如果不可见,通过 IoT 盒子主页重新加载处理程序。

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

现在安装完成,连接到 IoT 的设备可以用于完成流程/操作。

故障排除

重新启动 Windows IoT 盒子

In some instances a manual restart of the physical IoT box can resolve the issue of an IoT box not showing up on the database. For the Windows virtual IoT box a manual restart of the Odoo server can resolve database connection issues.

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

  1. 在 Windows 搜索栏 中键入 Services

  2. 选择 Services 应用程序,然后向下滚动到 Odoo 服务。

  3. 右键单击 Odoo 并选择 StartRestart。此操作将手动重启 Odoo IoT 服务器。

防火墙

防火墙可以保护设备的安全。有时候它们会阻止本应该建立的连接。由于防火墙阻止了连接,Windows虚拟 IoT 盒子软件可能无法访问 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中创建规则

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

一旦选择了 高级设置,点击左侧菜单中的 入站规则。然后,在右侧菜单栏中(在 入站规则 下),点击 新建规则 来创建一个新规则。

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

Actions 页面上,选择 Allow the connection 并点击 Next 。在 Rule Configuration 向导的下一页是 Profile 页面。在该页面上,选择适用于 Windows 机器所在网络的连接类型。理想情况下,只选择 Private 连接。 Private 连接类型是最安全的连接,同时允许所选端口进行通信。点击 Next 继续。

最后,为规则分配一个新的、唯一的名称。例如,这个名称可以是 Odoo。可选地,在 Description 字段中添加一个简短的描述。点击 Finish 完成 Rule Configuration 向导。现在,新的规则已经生效,设备可以连接到 Windows 虚拟 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.

另请参阅

万事达

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

个人资料

全部

Enabled

Action

允许

Override

程序

任意

Local Address

任意

Remote Address

任意

Protocol

TCP

Local Port

9050

Remote Port

任意

授权用户

任意

Authorized Computers

任意

Authorized Local Principals

任意

Local User Owner

任意

PolicyAppld

Application Package

任意

卸载 Windows IoT

卸载 Windows 虚拟 IoT 盒子是通过 Windows 程序管理器完成的。使用任何 Windows 版本,搜索 program。然后,在控制面板中选择 添加或删除程序。搜索 Odoo 并点击 三个点的菜单 进行卸载。

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