更新(物联网)

由于 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.

从物联网盒子主页升级

在后台,: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.