zigbee2mqtt icon indicating copy to clipboard operation
zigbee2mqtt copied to clipboard

Firmware '-1'

Open mainmind83 opened this issue 2 years ago • 36 comments

What happened?

Update to v1.35.1 and show firmware "-1" GLEDOPTO Zigbee LED Controller W (pro)

{ "brightness": 241, "linkquality": 149, "power_on_behavior": "on", "state": "OFF", "update": { "installed_version": 369176577, "latest_version": -1, "state": "idle" } }

What did you expect to happen?

Show new firmware?

How to reproduce it (minimal and precise)

1.35.0 to 1.35.1

Zigbee2MQTT version

1.35.1

Adapter firmware version

20230507

Adapter

SONOFF USB ZBDongle-P

Debug log

No response

image

mainmind83 avatar Jan 07 '24 19:01 mainmind83

I get the same thing for the IKEA Parasoll sensors

LarsStegman avatar Jan 07 '24 20:01 LarsStegman

I am getting the same thing with 3 Sengled E21-N1EA image image

blakefrain avatar Jan 07 '24 21:01 blakefrain

It seems like it could be a more general error, not associated with a specific device... all of which there is no firmware available?

mainmind83 avatar Jan 07 '24 21:01 mainmind83

I would say you are correct. The OTA does not work for the Sengled E21-N1EA but I see no errors coming up, just those listed and as an update in Home Assistant settings.

blakefrain avatar Jan 07 '24 22:01 blakefrain

I'm getting this as well for Sengled E1F-N5E bulbs.

If I go into Z2M and the OTA tab and click on "Check for new updates" for one of those bulbs I get the following error pop up:

OTA: Images currently unavailable for device 'E1F-N5E', hardwareVersion '1', manufacturerName sengled, {"fieldControl":0,"manufacturerCode":4448,"imageType":32977,"fileVersion":22}'

ScottG489 avatar Jan 08 '24 00:01 ScottG489

Same here, for two Sonoff SNZB-02P devices.

nicolinuxfr avatar Jan 08 '24 06:01 nicolinuxfr

Go the same issue with some Sonoff devices.

eeeeb avatar Jan 08 '24 07:01 eeeeb

I got the same for 2 Namron devices: https://www.zigbee2mqtt.io/devices/4512700.html#namron-4512700

Screenshot 2024-01-08 085308

corvy avatar Jan 08 '24 07:01 corvy

Same for Ikea parasoll sensors

https://www.zigbee2mqtt.io/devices/E2013.html#ikea-e2013

Screenshot_2024-01-08-11-27-19-07_40deb401b9ffe8e1df2f1cc5ba480b12

sdotter avatar Jan 08 '24 10:01 sdotter

same with hive trv's

kuduacz avatar Jan 08 '24 16:01 kuduacz

To add: same here with Gledopto GL-C-009P…

Frankster-NL avatar Jan 08 '24 17:01 Frankster-NL

I found the same issue at https://github.com/Koenkk/zigbee2mqtt/issues/20678 for the EcoDim Eco-Dim.07/Eco-Dim.10

Veldkornet avatar Jan 09 '24 08:01 Veldkornet

I think https://github.com/Koenkk/zigbee-herdsman-converters/pull/6843 introduced this bug.

LarsStegman avatar Jan 09 '24 08:01 LarsStegman

I think Koenkk/zigbee-herdsman-converters#6843 introduced this bug.

It should be marked as OTA update not available for this device...

mainmind83 avatar Jan 09 '24 09:01 mainmind83

https://github.com/Koenkk/zigbee-herdsman-converters/pull/6864

Already fixed, problem with HA (doesn't recognized negative number as "don't try to update"...), but Z2M should work around it as soon as this is merged.

HA PR https://github.com/home-assistant/core/pull/107483

PS: Z2M still won't let you update even if HA says "go ahead", so it's only a feedback issue.

Nerivec avatar Jan 09 '24 15:01 Nerivec

Well, I would say -1 is still a version number. I think null or None should indicate "don't try to update"

LarsStegman avatar Jan 09 '24 16:01 LarsStegman

version -1 in software is equivalent to the moment the idea comes out of the head of the developer or project manager šŸ˜„ 🤰

mainmind83 avatar Jan 09 '24 16:01 mainmind83

@LarsStegman HA core wouldn't behave properly ("OFF") on all of these too. link HA actually fails because it doesn't recognize "-1" as a version number (or any negative number)... and since it defaults to ON whenever it fails to compare... it reports "update available". The compare fault ultimately lies in the AwesomeVersion package used by HA. -1 should at least always be less than 0 (which hopefully any valid version number aspires to be greater to) :smile:

With the PR, Z2M will report current version as latest version in case no image is available and fix the issue. It just limits what the frontend could have done with the -1 special case; could have been used "as-is" in the future to handle "no image available" differently than "no update available" (what I had in mind @mainmind83 😁), but I guess if needed we can revisit the implementation at that time!

Nerivec avatar Jan 09 '24 16:01 Nerivec

Fixed in https://github.com/Koenkk/zigbee-herdsman-converters/commit/5f2629252c2778655f6798695da00ae386dd9fc7, thanks @Nerivec

Changes will be available in the dev branch in a few hours from now.

Koenkk avatar Jan 09 '24 19:01 Koenkk

Why is it that there should be an update available but it's still showing as -1? I have an E1744 IKEA device that is on an old version. It's still showing as -1

Info 2024-01-12 11:52:02MQTT publish: topic 'zigbee2mqtt/bridge/response/device/ota_update/check', payload '{"data":{"id":"0xec1bbdfffe396590"},"error":"Failed to check if update available for '0xec1bbdfffe396590' (Cannot destructure property 'data' of '(intermediate value)' as it is undefined.)","status":"error","transaction":"hh8mg-5"}'
Error 2024-01-12 11:52:02Failed to check if update available for '0xec1bbdfffe396590' (Cannot destructure property 'data' of '(intermediate value)' as it is undefined.)
Debug 2024-01-12 11:52:02TypeError: Cannot destructure property 'data' of '(intermediate value)' as it is undefined. at getImageMeta (/app/node_modules/zigbee-herdsman-converters/src/lib/ota/tradfri.ts:15:18) at processTicksAndRejections (node:internal/process/task_queues:95:5) at isNewImageAvailable (/app/node_modules/zigbee-herdsman-converters/src/lib/ota/common.ts:398:18) at Object.isUpdateAvailable (/app/node_modules/zigbee-herdsman-converters/src/lib/ota/common.ts:387:29) at OTAUpdate.onMQTTMessage (/app/lib/extension/otaUpdate.ts:205:45) at EventEmitter.wrappedCallback (/app/lib/eventBus.ts:167:17)

88fingerslukee avatar Jan 12 '24 19:01 88fingerslukee