更新(物联网)

由于 IoT(物联网) 盒子和虚拟 Windows IoT (物联网) 盒子的复杂性,』更新』 一词可以有几种不同的含义。

可以更新实际驱动程序,更新:abbr:`IoT(物联网)`盒子上的核心代码,或者闪存新的映像(使用物理:abbr:`IoT(物联网)`盒子)。

本文档探讨了更新 IoT(物联网) 盒子的各种方法,以确保 IoT (物联网) 盒子流程和设备的顺利运行。

在物联网盒子上刷写 SD 卡

重要

此更新**不**适用于 Windows :abbr:`IoT(物联网)`盒子(Odoo 16 及更高版本)。

要更新 Windows IoT(物联网),首先要卸载以前版本的 Odoo Windows 程序,然后使用最新的安装包重新安装。

要开始安装,请在 `Odoo 下载页面 <https://odoo.com/download>`_中浏览企业版或社区 - Windows 版的 Odoo 16(或更高版本)安装包。

在某些情况下,可能需要用*Etcher*软件重新刷新:abbr:IoT(物联网)`盒子的micro SD卡,以便从 Odoo 最新的:abbr:`IoT 物联网`图像更新中获益。这意味着在使用新的 :abbr:`IoT(物联网) 盒子的情况下,或者当处理程序的更新或来自 IoT(物联网) 盒子主页的更新无法解决问题时,可能需要更新 Odoo IoT(物联网) 盒子软件。

備註

  • 将 Odoo 数据库升级到新版本后,通常需要重新刷新 :abbr:`IoT(物联网)`盒子的映像。

  • 要重新刷新微型 SD 卡,**需要**一台配有微型 SD 卡读卡器/适配器的电脑。

首先,下载 Etcher。这是一个免费的开源工具,用于将图像文件刻录到驱动器上。下载完成后,在计算机上安装并启动该程序。

然后,从 nightly <http://nightly.odoo.com/master/iotbox>`_中下载最新的 :abbr:`IoT(物联网)`镜像,其标签为 `iotbox-latest.zip。此特定镜像与支持的*所有* Odoo 版本兼容。

完成此步骤后,将 IoT (物联网) 盒子的 micro SD 卡插入计算机或读卡器。打开 Etcher,选择 Flashfromfile,然后找到并选择 iotbox-latest.zip 映像并解压缩。接下来,选择要将映像刻录到的驱动器。

最后,点击 Flash,等待进程结束。

Balena 的 Etcher 软件仪表板。

小訣竅

Balena’s Etcher software also allows for the administrator to flash the SD card from a URL. To flash from a URL, simply click Flash from URL, instead of Flash from file.

然后,输入以下内容: http://nightly.odoo.com/master/iotbox/iotbox-latest.zip

A view of Balena's Etcher software, with the flash from URL option highlighted.

備註

An alternative software for flashing the micro SD card is Raspberry Pi Imager.

Windows IoT update

Windows virtual IoT box may occasionally need an update to work properly.

The following processes cover the uninstallation and re-installation of the Windows virtual IoT box.

卸载 Windows 物联网盒子

Prior to upgrading the Windows virtual IoT box, the previous version should be uninstalled first.

重要

在卸载以前版本的 Windows 虚拟 IoT(物联网) 盒子之前,请确保与当前安装的版本相比,有更新版本的 Windows 虚拟 IoT(物联网) 盒子可用。要执行此操作,请导航至 `Odoo Nightly builds <https://nightly.odoo.com/>`_页面。

Odoo Nightly builds 页面,导航至 构建(稳定版) ‣ windows/ 查看 odoo_(version).latest.exe 文件旁边的日期;其中 (版本) 等于 Odoo 版本(例如 16.0、17.0)。最新版本的 Windows 虚拟 :abbr:`IoT(物联网)`框可通过选择此文件下载,也可随时在 `Odoo 下载 <https://odoo.com/download/>`_页面下载。

卸载 Windows 虚拟 物联网 盒子可通过 Windows 程序管理器完成。

在任何版本 Windows 中,搜索 程序 以打开:guilabel:控制面板`中的 :menuselection:`程序 --> 程序和功能 部分。然后,选择 卸载或更改程序。然后,搜索 Odoo,点击 :guilabel:`…(三点)`菜单上的:guilabel:`Odoo.exe`程序进行卸载。

Confirm the uninstallation, and follow the steps to uninstall through the Odoo uninstall wizard.

下载并重新安装

最新版本的 Windows 虚拟:abbr:`IoT(物联网)`盒子可从 `Odoo Nightly builds <https://nightly.odoo.com/>`_页面下载,也可随时从 `Odoo 下载 <https://odoo.com/download/>`_页面下载。

要从 Odoo Nightly builds 页面下载,请导航至 Builds(稳定版) ‣ windows/ 并选择 odoo_(version).latest.exe 文件;其中 (版本) 等于 Odoo 的版本(例如 16.0、17.0)。

要从 Odoo 下载 页面下载,请找到 Odoo 版本(如 16.0、17.0)部分,并选择 Windows下载 按钮。

接下来,安装并设置下载的 Odoo .exe 文件。在出现说明屏幕后,点击 下一步 开始安装,并同意 TOS(服务条款)

在下一步重新安装过程中,从 选择安装类型 下拉菜单中选择 Odoo IoT

Example

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

  • Odoo 服务器

  • Odoo IoT

  • Nginx 网络服务器

  • Ghostscript interpreter

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

设置目的地并完成安装

要完成重新安装,请选择 目标文件夹,然后点击:guilabel:安装

警告

选择`C:\odoo`作为安装位置可以启动*Nginx*服务器。Odoo的 Windows 虚拟:abbr:`IoT(物联网)`盒子软件**不应**安装在 Windows 用户的任何目录中。这样做将无法让*Nginx*初始化。

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

然后,确保选中 开启 Odoo 复选框,并点击 完成。安装完成后,Odoo 服务器将运行,并自动在网页浏览器上打开 http://localhost:8069。网页应显示 IoT (物联网) 盒子主页。

小訣竅

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

从物联网盒子主页升级

在后台,:abbr:`IoT(物联网)`盒子使用一个版本的 Odoo 代码来运行和连接 Odoo 数据库。为了使:abbr:`IoT(物联网)`盒子有效运行,可能需要更新该代码。该操作应定期完成,以确保 :abbr:`IoT(物联网)`系统及其流程保持最新。

通过导航至 物联网应用程序 ‣ 物联网盒子 进入 IoT(物联网) 盒子主页,并点击 IoT (物联网) 盒子的 IP 地址。然后,点击 :guilabel:`更新`(在版本号旁边)。

如果有新版本的 IoT(物联网) 盒子映像可用,页面底部会出现 更新至 _xx.xx_ 按钮。点击该按钮升级设备,此时 IoT (物联网) 盒子会自动闪烁到较新的版本。所有先前的配置将被保存。

重要

这个过程可能需要 30 多分钟。**请勿**关闭或拔下 IoT (物联网) 盒子的电源插头,因为这会使其处于不一致的状态。这意味着 IoT(物联网) 盒子需要 重新刷新 新镜像。

在 IoT Box 主页升级 IoT Box 软件。

Handler (driver) update

There may be some instances where drivers or interfaces need to be updated for individual devices (e.g. scales, measurement tools, etc.). The IoT handler’s (drivers and interfaces) code can be modified by syncing them with the configured server handler’s code.

This can be helpful in instances where IoT devices (e.g. scales, measurement tools, etc.) are not working properly with the IoT box.

For both the Windows IoT (Odoo 16 and higher) and physical IoT box, this process can be performed manually from the IoT box home page. Go to the IoT box home page by navigating to IoT app ‣ IoT Boxes, and clicking on the IP address of the IoT box.

Next, click Handlers list, and then select Load Handlers at the bottom of the page.

Handlers list on an IoT box with the load handlers button highlighted.

重要

Handler’s code is fetched from the configured server, and it needs to be up-to-date to have the latest fixes and patches.

備註

A handler update is also performed automatically each time the IoT box is restarted. The only exception to this process is if the Automatic drivers update is unchecked in the form view of the IoT box on the Odoo server. This setting can be reached by going to IoT App ‣ Select the IoT box ‣ Automatic drivers update.