Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OTA: Ubisys S2 #3789

Closed
theFork opened this issue Jun 21, 2020 · 1 comment · Fixed by Koenkk/zigbee-herdsman-converters#1359
Closed

OTA: Ubisys S2 #3789

theFork opened this issue Jun 21, 2020 · 1 comment · Fixed by Koenkk/zigbee-herdsman-converters#1359

Comments

@theFork
Copy link

theFork commented Jun 21, 2020

Over-the-air-Updates of Ubisys S2 dual switches appear not to work correctly.

Setup

  • Z2M 1.14.0
    • Running as add-on in homeassistant
    • MQTT discovery deactivated, no devices manually added
  • Coordinator ZZH (TI CC2652R)
    • Firmware CC26X2R1_20200417
  • Zigbee-Network
    • Only coordinator and two Ubisys S2 joined
  • Network infrastructure
    • The server (a NUC) is directly connected to the router
    • Since Z2M runs as a HA-Addon it runs in docker

Newer than latest firmware

After joining, the first S2 appears to have a newer firmware then the latest one available:

info  2020-06-19 21:21:18: Device '0x001fee00000030b7' joined
info  2020-06-19 21:21:18: Starting interview of '0x001fee00000030b7'
info  2020-06-19 21:21:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x001fee00000030b7"}}'
info  2020-06-19 21:21:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x001fee00000030b7"}}'
info  2020-06-19 21:21:18: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_announced","message":"announce","meta":{"friendly_name":"0x001fee00000030b7"}}'
info  2020-06-19 21:21:19: Successfully setup reporting for '0x001fee00000030b7' - 1 - genOnOff
info  2020-06-19 21:21:20: Successfully interviewed '0x001fee00000030b7', device has successfully been paired
info  2020-06-19 21:21:20: Device '0x001fee00000030b7' is supported, identified as: Ubisys Power switch S2 (S2)
info  2020-06-19 21:21:20: Configuring '0x001fee00000030b7'
info  2020-06-19 21:21:20: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x001fee00000030b7","model":"S2","vendor":"Ubisys","description":"Power switch S2","supported":true}}'
info  2020-06-19 21:21:20: Successfully configured '0x001fee00000030b7'
info  2020-06-19 21:21:20: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":0,"linkquality":78,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:21:21: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":0,"linkquality":78,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:21:50: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":0,"linkquality":75,"state_l1":"ON","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:21:51: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":124,"linkquality":75,"state_l1":"ON","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:21:52: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":124,"linkquality":78,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:21:52: MQTT publish: topic 'zigbee2mqtt/0x001fee00000030b7', payload '{"power":0,"linkquality":78,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
warn  2020-06-19 21:21:59: Firmware on '0x001fee00000030b7' is newer than latest firmware online.

No image available

For the second S2, an assertion error occurs. The log indicates, that there is no image available:

info  2020-06-19 21:26:22: Device '0x001fee0000001815' joined
info  2020-06-19 21:26:22: Starting interview of '0x001fee0000001815'
info  2020-06-19 21:26:22: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_connected","message":{"friendly_name":"0x001fee0000001815"}}'
info  2020-06-19 21:26:22: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_started","meta":{"friendly_name":"0x001fee0000001815"}}'
info  2020-06-19 21:26:23: Successfully setup reporting for '0x001fee0000001815' - 1 - genOnOff
info  2020-06-19 21:26:23: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"device_announced","message":"announce","meta":{"friendly_name":"0x001fee0000001815"}}'
info  2020-06-19 21:26:24: Successfully interviewed '0x001fee0000001815', device has successfully been paired
info  2020-06-19 21:26:24: Device '0x001fee0000001815' is supported, identified as: Ubisys Power switch S2 (S2)
info  2020-06-19 21:26:24: Configuring '0x001fee0000001815'
info  2020-06-19 21:26:24: MQTT publish: topic 'zigbee2mqtt/bridge/log', payload '{"type":"pairing","message":"interview_successful","meta":{"friendly_name":"0x001fee0000001815","model":"S2","vendor":"Ubisys","description":"Power switch S2","supported":true}}'
info  2020-06-19 21:26:25: Successfully configured '0x001fee0000001815'
info  2020-06-19 21:26:25: MQTT publish: topic 'zigbee2mqtt/0x001fee0000001815', payload '{"power":0,"linkquality":15,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
info  2020-06-19 21:26:26: MQTT publish: topic 'zigbee2mqtt/0x001fee0000001815', payload '{"power":0,"linkquality":12,"state_l1":"OFF","state_l2":"OFF","update_available":false}'
error 2020-06-19 21:27:01: Failed to call 'OTAUpdate' 'onZigbeeEvent' (AssertionError [ERR_ASSERTION]: No image available for imageType '0x7b03' with hardware version 5
    at getImageMeta (/zigbee2mqtt-1.14.0/node_modules/zigbee-herdsman-converters/ota/ubisys.js:22:5)
    at runMicrotasks (<anonymous>)
    at processTicksAndRejections (internal/process/task_queues.js:94:5)
    at async isNewImageAvailable (/zigbee2mqtt-1.14.0/node_modules/zigbee-herdsman-converters/ota/ubisys.js:49:18)
    at async Object.isUpdateAvailable (/zigbee2mqtt-1.14.0/node_modules/zigbee-herdsman-converters/ota/common.js:168:23)
    at async OTAUpdate.onZigbeeEvent (/zigbee2mqtt-1.14.0/lib/extension/otaUpdate.js:37:31)
    at async Controller.callExtensionMethod (/zigbee2mqtt-1.14.0/lib/controller.js:352:21))
info  2020-06-19 21:28:59: Starting network scan (includeRoutes 'false')
info  2020-06-19 21:28:59: Network scan finished
@felixstorm
Copy link
Sponsor Contributor

Seems to be two issues combined:

  • I forgot to reset the global regex before searching on the firmware page. Therefore the "No image available" error had been thrown on every other check (since search then had started on the page only after the entry for the S2).
  • @andreasbrett seemingly overlooked ubisys when changing OTA logic (Koenkk/zigbee-herdsman-converters@d512721). Therefore even in the cases when the update check did work every other time in between the errors, the "Newer than latest firmware" message does come up.

I have already started with a fix, but since I would like to restructure OTA code a bit to avoid mistakes like the second one above in the future, it will take a bit more time - I should hopefully have it ready in a few days.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants