你好
我有两个相同的开发板、我在上面使用 Zigbee2Mqtt 和 Home Assistant 通过本地或外部存储库固件测试 OTA 功能。 我遇到的问题是、其中一个电路板运行良好(尽管速度非常慢、需要5个小时才能更新170KB 的图像)、而另一个电路板无论图像来源如何、都不会执行更新。
对电路板进行检查和编程的过程 在它们之间是相同的、并遵循以下步骤:
- 从 Z2M 中删除电路板并清除存储在持久存储中的记录以确保新的维修
- 擦除存储器
- 使用 BIM.hex 和_oad.bin 文件对电路板进行编程
- 具有协调器的 Re 对板(每次都成功配对)
- 检查更新
- 更新电路板
两个电路板的一切正常运行、直到步骤6为止、其中一个电路板永远不会更新、并且我会收到一条错误消息。
检查更新和启动过程:
Zigbee2MQTT:info 2023-10-03 17:01:50: MQTT publish: topic 'zigbee2mqtt/0x00124b00214f4a0b', payload '{"update":{"installed_version":2,"latest_version":3,"state":"available"},"update_available":true,"voltage":3800}' Zigbee2MQTT:debug 2023-10-03 17:01:54: Received MQTT message on 'zigbee2mqtt/bridge/request/device/ota_update/update' with data '{"id":"0x00124b00214f4a0b","transaction":"6v0j5-24"}' Zigbee2MQTT:info 2023-10-03 17:01:54: Updating '0x00124b00214f4a0b' to latest firmware Zigbee2MQTT:info 2023-10-03 17:01:54: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Updating '0x00124b00214f4a0b' to latest firmware","meta":{"device":"0x00124b00214f4a0b","status":"update_in_progress"},"type":"ota_update"}' Zigbee2MQTT:debug 2023-10-03 17:01:58: getNewImage for '0x00124b00214f4a0b', image header {"otaUpgradeFileIdentifier":{"type":"Buffer","data":[30,241,238,11]},"otaHeaderVersion":256,"otaHeaderLength":56,"otaHeaderFieldControl":0,"manufacturerCode":48830,"imageType":9810,"fileVersion":3,"zigbeeStackVersion":2,"otaHeaderString":"\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000\u0000","totalImageSize":176794} Zigbee2MQTT:debug 2023-10-03 17:01:58: Got new image for '0x00124b00214f4a0b' Zigbee2MQTT:debug 2023-10-03 17:01:58: Starting upgrade
最后收到错误消息:
Zigbee2MQTT:info 2023-10-03 17:02:34: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"message":"Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device')","meta":{"device":"0x00124b00214f4a0b","status":"update_failed"},"type":"ota_update"}' Zigbee2MQTT:info 2023-10-03 17:02:34: MQTT publish: topic 'zigbee2mqtt/bridge/response/device/ota_update/update', payload '{"data":{"id":"0x00124b00214f4a0b"},"error":"Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device')","status":"error","transaction":"6v0j5-24"}' Zigbee2MQTT:error 2023-10-03 17:02:34: Update of '0x00124b00214f4a0b' failed (Update failed with reason: 'aborted by device') Zigbee2MQTT:debug 2023-10-03 17:02:34: Error: Update failed with reason: 'aborted by device' at /app/node_modules/zigbee-herdsman-converters/src/lib/ota/common.ts:422:24
我觉得奇怪的是、标头字符串都是零、但映像大小正确、更新工作正常、并能正常工作、这一点对于另一个板是很奇怪的。
我怀疑这可能与我的板有关、而不是与 Z2M 或 Sonoff 协调器有关、因为另一个相同的板将始终工作、而这一个从未工作过。 我已经测试了多个固件版本(因为我们必须不断添加功能)、这一个根本不起作用、而另一个则据我所知没有任何问题。
简单地说、协调器和板之间的所有其他通信都按预期工作、并且按预期发送和接收消息。 我不能监听交通信息、因为我没有监听器。