tasmota / decode-config

Backup/restore and decode configuration tool for Tasmota
GNU Lesser General Public License v3.0
211 stars 32 forks source link

Error in Decode-Config on ESP 32 #44

Closed Papablaubaer closed 2 years ago

Papablaubaer commented 2 years ago

Describe the bug

I try to send a json File to an ShellyPlusI4 witch i first load from it. Ist dosn´t work

To Reproduce

Steps to reproduce the behavior: _1. Program parameter:

  1. python decode-config.py -s 192.168.1.37 -t json --json-show-pw -o settings.json
  2. python decode-config.py -s 192.168.1.37 --restore-file settings.json

2. Result: Load data by http from device '192.168.1.37' WARNING 9: Data incompatibility: Device '192.168.1.37' hardware is 'ESP32 (excl S3/S2/C3)', restore file '.\settings.json' is for hardware 'ESP82' Premature exit - #9 Restore data error

Expected behavior

A clear and concise description of what you expected to happen.

Version Information

Please complete the following information
use decode-config.py -V to retrieve the info


decode-config.py v11.0.0.1 [adb1f66] by Norbert Richter nr@prsolution.eu

Script:   decode-config.py
Python:   3.10.3
Platform: Windows-10-10.0.22000-SP0 - AMD64
OS:       Windows 10 10.0.22000
Time:     2022-03-22 18:39:54

System' information of your Tasmota data

Append -g System to your decode-config parameter, e. g. decode-config.py -s myconfig.dmp -g System



{"bootcount": 9, "bootcount_reset_time": 1647636654, "cfg_crc": "0x1ad9", "cfg_crc32": "0x9a20fa5f", "cfg_holder": 4617, "cfg_size": 4096, "cfg_timestamp": 1647967362, "header": {"data": {"crc": "0x9e22", "crc32": "0x9a20fa5f", "hardware": "ESP32 (excl S3/S2/C3)", "size": 4096, "version": {"id": "0xb000000", "name": "11.0.0"}}, "env": {"platform": "Windows-10-10.0.22000-SP0", "python": "3.10.3", "script": "decode-config.py v11.0.0.1 [adb1f66]", "system": "Windows AMD64 10 10.0.22000"}, "template": {"crc": "0x1ad9", "crc32": "0x9a20fa5f", "size": 4096, "version": {"id": "0xa010006", "name": "10.1.0.6"}}, "timestamp": "2022-03-22 16:42:42"}, "version": "0xb000000"}
curzon01 commented 2 years ago

pls try current version v11.0.0.4 from developer branch

Papablaubaer commented 2 years ago

with v11.0.0.4 the same result

curzon01 commented 2 years ago

I'll have a look, in meantime use -w for restore

curzon01 commented 2 years ago

did you test the v11.0.0.4 with the whole process (backup & restore) or just the restore?

Papablaubaer commented 2 years ago

I did the complete process with the new version with the same result

Papablaubaer commented 2 years ago

The JSON is also correct. header": { "data": { "crc": "0x77b7", "crc32": "0xe1eabbd2", "hardware": "ESP32 (excl S3/S2/C3)", "size": 4096, "version": { "id": "0xa000000", "name": "10.0.0" } }, It also makes no difference whether Tasmota 10 or 11 is on the device. With Decode-Config 10.0 it looks like this "header": { "data": { "crc": "0x77b7", "crc32": "0xe1eabbd2", "platform": "ESP32", "size": 4096, "template": { "crc": "0xc0d2", "crc32": "0xe1eabbd2", "size": 4096, "version": "0x9050009" }, "version": "0xa000000" },

curzon01 commented 2 years ago

the key for detection the Tasmota platform within backuped json is config_version not the header content. It must be 0 for ESP8x and 1 for your ShellyPlusI4 (ESP32) I wanted to know the value for this key wgen using decode-config v11.0.0.1 and v11.0.0.4, the Tasmota Version is unimportant.

Papablaubaer commented 2 years ago

in 11.0.0.4 and in 11.0.0.1 the same "config_version": 1,

curzon01 commented 2 years ago

use latest developer v11.0.0.4 [23836f9]

Papablaubaer commented 2 years ago

Thank you, that works