Comments (29)
@Koenkk Thanks for merging #146; I forgot to add the magic text there to automatically close this issue.
from zigbee-ota.
I had a quick look at the linked file and lib/ota.js
and this file does not contain the OTA Update file header 0x0BEEF11E
(see the Zipbee cluster library spec, section 11.4.2.1). The script thus fails to parse the data format.
The file looks to be some sort of firmware, as it contains a few strings like In Hard Fault Handler
and 0123456789abcdef
. I have not much experience with zigbee at all and no idea if tuya is doing something out of the spec here, maybe their gateway adds a header this is only the actual payload?
from zigbee-ota.
Hello @fettlaus,
what's up with the new "version": "2.0.4"? Are there any improvements?
from zigbee-ota.
The important one is that periodically sending it local_temperature_calibration
is not needed anymore.
It sends data (within ~30m
) on its own now. I didn't see a changelog nor did I notice any other differences so far.
from zigbee-ota.
Upgraded TV02-Zigbee with new version 2.0.4 sends through z2m every ~30 min?
Or through TuyaHUB?
from zigbee-ota.
Through Zigbee2MQTT. I only used the tuya gateway to upgrade and intercept the traffic before I found this already existing issue while trying to contribute my findings.
from zigbee-ota.
I have already made adjustments and am now trying to create a pull request.
from zigbee-ota.
On current master f51ed04 including #106 and #107 when running:
tirzah[122]$ node scripts/updateall.js
I get this:
Click to expand
Updated existing entry ({"fileVersion":87,"fileSize":234174,"manufacturerCode":4098,"imageType":5634,"sha512":"1113486a67403d922fc4a462b7477e0a0986fa8862a89b74ab8c5eac7b4ecb31c30f1da9ae1bbc1d6d50ae1fed66d38c37a1834ab71fd384c0555002783aba13","url":"https://github.com/Koenkk/zigbee-OTA/raw/master/images/Tuya/1615190575-si32_zg_uart_connect_sleep_ZS5_ty_OTA_1.1.7.bin","path":"images/Tuya/1615190575-si32_zg_uart_connect_sleep_ZS5_ty_OTA_1.1.7.bin"})
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds
at new NodeError (node:internal/errors:363:5)
at boundsError (node:internal/buffer:84:11)
at Buffer.readUInt16LE (node:internal/buffer:243:5)
at Object.parseImage (/mnt/devel/external/HomeAssistant/zigbee-OTA/lib/ota.js:17:34)
at main (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/add.js:65:24)
at Object.<anonymous> (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/add.js:136:8)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12) {
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}
node:child_process:826
err = new Error(msg);
^
Error: Command failed: node ./scripts/add.js "images/Tuya/TV02-Zigbee_MCU_Module_2.0.4_164155152229641863dfc.bin" ""
node:internal/process/promises:246
triggerUncaughtException(err, true /* fromPromise */);
^
RangeError [ERR_BUFFER_OUT_OF_BOUNDS]: Attempt to access memory outside buffer bounds
at new NodeError (node:internal/errors:363:5)
at boundsError (node:internal/buffer:84:11)
at Buffer.readUInt16LE (node:internal/buffer:243:5)
at Object.parseImage (/mnt/devel/external/HomeAssistant/zigbee-OTA/lib/ota.js:17:34)
at main (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/add.js:65:24)
at Object.<anonymous> (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/add.js:136:8)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12) {
code: 'ERR_BUFFER_OUT_OF_BOUNDS'
}
at checkExecSyncError (node:child_process:826:11)
at Object.execSync (node:child_process:900:15)
at /mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/updateall.js:8:38
at Array.forEach (<anonymous>)
at main (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/updateall.js:7:15)
at Object.<anonymous> (/mnt/devel/external/HomeAssistant/zigbee-OTA/scripts/updateall.js:15:8)
at Module._compile (node:internal/modules/cjs/loader:1095:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1124:10)
at Module.load (node:internal/modules/cjs/loader:975:32)
at Function.Module._load (node:internal/modules/cjs/loader:816:12) {
status: 1,
signal: null,
output: [
null,
Buffer(0) [Uint8Array] [],
Buffer(933) [Uint8Array] [
110, 111, 100, 101, 58, 105, 110, 116, 101, 114, 110, 97,
108, 47, 112, 114, 111, 99, 101, 115, 115, 47, 112, 114,
111, 109, 105, 115, 101, 115, 58, 50, 52, 54, 10, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 114, 105,
103, 103, 101, 114, 85, 110, 99, 97, 117, 103, 104, 116,
69, 120, 99, 101, 112, 116, 105, 111, 110, 40, 101, 114,
114, 44, 32, 116, 114, 117, 101, 32, 47, 42, 32, 102,
114, 111, 109, 80, 114, 111, 109, 105, 115, 101, 32, 42,
47, 41, 59, 10,
... 833 more items
]
],
pid: 3846075,
stdout: Buffer(0) [Uint8Array] [],
stderr: Buffer(933) [Uint8Array] [
110, 111, 100, 101, 58, 105, 110, 116, 101, 114, 110, 97,
108, 47, 112, 114, 111, 99, 101, 115, 115, 47, 112, 114,
111, 109, 105, 115, 101, 115, 58, 50, 52, 54, 10, 32,
32, 32, 32, 32, 32, 32, 32, 32, 32, 116, 114, 105,
103, 103, 101, 114, 85, 110, 99, 97, 117, 103, 104, 116,
69, 120, 99, 101, 112, 116, 105, 111, 110, 40, 101, 114,
114, 44, 32, 116, 114, 117, 101, 32, 47, 42, 32, 102,
114, 111, 109, 80, 114, 111, 109, 105, 115, 101, 32, 42,
47, 41, 59, 10,
... 833 more items
]
}
Removing the entry from index.json
allowed me to run the script.
from zigbee-ota.
Hello @fettlaus,
Do you have the same "manufacturerName": "_TZE200_hue3yfsn"
?
from zigbee-ota.
@vladi1234 Yes, thats exactly my manufacturer. Thanks by the way for getting this merged. Sadly I can't check if the ota works, because i already updated my trv via the tuya app.
from zigbee-ota.
Hello @fettlaus,
Despite all this, I have the same error.
from zigbee-ota.
Hello for me it is the same, the update still does not work.
from zigbee-ota.
Like I said in my comment above, the update file is not parseable as it does not contain the ZigBee OTA header. Other TuYa firmware does contain it, so I am unsure if this update will even work.
Nothing changed in the parsing code, PR #106 just manually added the metadata.
from zigbee-ota.
Also getting the same error when trying to update the firmware of this device: TS0601 / _TZE200_hue3yfsn / TuYa / TV02-Zigbee
Am running the latest docker image (latest push was 5 days ago).
Is there anything I can do / you need, to help get this move along?
from zigbee-ota.
After researching a bit further it seems that this file is really just the binary for upgrading the mcu. This seems to be done by utilizing special TUYA-commands and not the usual zigbee ota. See also here (TUYA_MCU_OTA_NOTIFY etc.).
I guess unless someone implements this in z2m we're out of luck.
Also this is probably the reason why #106 isn't working. It's just not the right way to upgrade using this file.
from zigbee-ota.
@fettlaus More then likely is one BIN file for the MCU.
All TS0601 / tuya MCU devices is having the same firmware (more correct 2 Zigbee modules and 2 versions for sleeping and no sleeping devices) in the Zigbee module and can being updated with Zigbee OTA files is tuya have making it right.
The MCU firmware updating need implanting of the tuya MCU firmware updating code or flashing it with one J-Link flasher if its one plane bin-file that can being flashed standard way.
from zigbee-ota.
Trying to add firmware update for Connecte Thermostat that works with the tuya gateway and have same problem I think. Getting ERR_BUFFER_OUT_OF_BOUNDS when using
node scripts/add.js https://images.tuyaeu.com/smart/firmware/upgrade/bay1628040814785F7DM/1641969211de5c0fe5900.bin
Intercepted response:
{
"result":[
{
"controlType":1,
"currentVersion":"1.0.3",
"devType":0,
"lastUpgradeTime":0,
"timeout":60,
"type":3,
"typeDesc":"ZigBee Module",
"upgradeStatus":0
},
{
"canUpgrade":true,
"controlType":1,
"currentVersion":"1.0.6",
"desc":"1. Repair zigbee3. 0 upload multiple of temperature value\n2. Fixed January and February week errors",
"devType":0,
"diffOta":false,
"fileSize":"38724",
"firmwareDeployTime":1643530974,
"lastUpgradeTime":0,
"md5":"39b58db8ae44adcdffa10f508f8c60d0",
"timeout":100,
"type":9,
"typeDesc":"MCU Module",
"upgradeStatus":1,
"upgradeType":0,
"upgradingDesc":"Please keep the power of the device connected during the upgrade process, please be patient.",
"url":"https://images.tuyaeu.com/smart/firmware/upgrade/bay1628040814785F7DM/1641969211de5c0fe5900.bin",
"version":"1.0.7"
}
],
"status":"ok",
"success":true,
"t":1653861857250
}
I guess there is no way z2m can use this bin file to upgrade after reading above comments
from zigbee-ota.
You is trying updating the Zigbee module with the firmware for the tuya MCU that looks being one bad thing to do.
tuya MCU us using DP commands for updating the MCU that is not implanted in the open system for the moment.
from zigbee-ota.
Yes I understood that this is no normal OTA file and found this issue. I'll keep an eye if someone with the right knowledge implements support for Tuya MCU update in z2m. @MattWestb do you know if it's proposed as a new feature to z2m? I could not find any.
from zigbee-ota.
I have not seen any request in Z2M, deCON or ZHA but normally some creative person is getting one device that need it and is start cocking and its being made if all is going well :-))
By the way great that you have getting the URL to the firmware so it can being used in the future then all pieces is in place and tuya MCU is working !!
from zigbee-ota.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
from zigbee-ota.
Still an issue. Per the above comments, the OTA file doesn't seem valid at all. I'd consider removing it for now.
from zigbee-ota.
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 7 days
from zigbee-ota.
PR #146 removes this firmware.
from zigbee-ota.
still got this issue
from zigbee-ota.
I got the issue too
from zigbee-ota.
I got the issue too - (No image available for imageType '5634')
from zigbee-ota.
bump Having this issue too
from zigbee-ota.
probably still no way how to update TV02-Zigbee without TuYa hub, right?
from zigbee-ota.
Related Issues (20)
- Bosch thermostat 2 new Firmware available ? HOT 5
- Philips Hue light strips declining newest OTA HOT 10
- SONOFF SNZB-06P OTA not working HOT 1
- Aurora AU-A1ZBDSS - New Firmware OTA help HOT 7
- Send binary with ota cluster.
- Legrand Dimmer switch w/o neutral 067771 cannot force update over OTA HOT 2
- Tuya TS011F_plug_1 OTA update stopped working HOT 3
- `https://otau.meethue.com` started using a self-signed certificate HOT 33
- Update of 'xy' failed (Cannot destructure property 'data' of '(intermediate value)' as it is undefined.) HOT 3
- code: 'ERR_BUFFER_OUT_OF_BOUNDS' when running scripts/add.js HOT 1
- OTA for Smart meter Tongou TO-Q-SY1-JZT return version -1 HOT 1
- Aurora AU-A1ZBDSS - New Firmware OTA help HOT 1
- Namron Zigbee Touch Termostat 16A 4512752 - New Firmware OTA help HOT 1
- OTA update Impossible Inter roller shutter Legrand 067726A HOT 3
- Adding more Develco OTA images HOT 2
- New firmware for Gledopto GL-C-006P HOT 3
- Gledopto GL-C-009P HOT 53
- Legrand device 412015 impossible update HOT 11
- Gledopto GL-C-009P HOT 3
- GL-C-006P(normal) received GL-C-006P(mini) OTA from Z2M HOT 7
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from zigbee-ota.