Document the tested Nextion Editor version (1.68.2.3035)

TESTED_EDITOR_VERSION constant, README compatibility section with the
check to run after an Editor update, CLAUDE.md rules for other builds,
canary test on the fixture's version marker.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
mangavalkandClaude Opus 5.5 committed 2026-11-15 15:20:27 +01:00
1 parent 69e22cfb06
commit 82ab4177d1
6 files changed
+35 -3

No files matched your search

+7
View File
@@ -38,6 +38,13 @@ After rebuilding the demo, `tests/test_project.py::Demo` must still pass: the ge
stay byte-identical to the Editor's re-save in `tests/fixtures/`. If a deliberate change breaks
that, re-save the demo with Nextion Editor (open, File > Save As) and replace the fixture.
## Editor version
All findings and the fixture come from **Nextion Editor 1.68.2.3035** (`nxhmi.TESTED_EDITOR_VERSION`).
When verifying against a different Editor build, say so in the commit and in docs/NOTES.md; if a
new build writes different bytes, document the difference in docs/FORMAT.md per version and bump
`TESTED_EDITOR_VERSION` only after the fixture is re-saved and all tests pass.
## Rules
- **Black-box only.** Formats are worked out by changing projects in Nextion Editor and comparing
+14 -1
View File
@@ -20,7 +20,7 @@ writes; no Nextion software was decompiled.
| Area | Coverage |
|---|---|
| `.HMI` read / write / build from scratch | complete for Basic (T) and Intelligent (P) series projects; output byte-identical to Nextion Editor 1.68 |
| `.HMI` read / write / build from scratch | complete for Basic (T) and Intelligent (P) series projects; output byte-identical to Nextion Editor 1.68.2 |
| Checksums | all three (page, project header, file table) |
| Components | all 31 types, with the Editor's own defaults |
| Readable JSON | enum names and `#rrggbb` colours, still byte-exact on the way back |
@@ -31,6 +31,19 @@ writes; no Nextion software was decompiled.
Details and the full list of gaps: [docs/COVERAGE.md](docs/COVERAGE.md).
## Compatibility
Everything here was reverse-engineered and verified against **Nextion Editor 1.68.2 (build
1.68.2.3035)** on Windows; `nxhmi.TESTED_EDITOR_VERSION` holds that version. Files written by nxhmi
open in that Editor, and the test fixture is a project re-saved by it.
- Older projects (tested with one saved by an older Editor in 2019) read and round-trip fine; when
1.68.2 re-saves them it upgrades a few header bytes (see docs/FORMAT.md).
- **After a Nextion Editor update**: open `demo/demo.HMI` in the new Editor, File > Save As, and
compare it with `tests/fixtures/demo_editor_saved.HMI` (e.g. `python -m nxhmi info` on both, or
replace the fixture and run the tests). If anything differs, the format changed -- please open
an issue with the Editor version.
## Install
Python 3.9+. Pillow is only needed for pictures, font generation and rendering.
+1 -1
View File
@@ -1,6 +1,6 @@
# Coverage report (updated 2026-11-15)
What nextion-hmi-tools covers today compared with Nextion Editor 1.68, and what is missing.
What openhmi-nx covers today compared with **Nextion Editor 1.68.2 (build 1.68.2.3035)**, and what is missing.
"Verified" means checked against the real Editor: either the Editor's own output is reproduced
byte for byte, or a file written by nxhmi was opened in the Editor and showed the expected result.
+1 -1
View File
@@ -1,6 +1,6 @@
# The Nextion Editor `.HMI` project format
Reverse-engineered black-box: by editing projects in Nextion Editor (v1.68), saving, and comparing
Verified against **Nextion Editor 1.68.2 (build 1.68.2.3035)**. Reverse-engineered black-box: by editing projects in Nextion Editor, saving, and comparing
files, and by asking the Editor whether hand-made files load ("oracle" tests). The Editor itself was
never decompiled or decrypted. Everything here was checked against real files; open points are
marked **OPEN**.
+3
View File
@@ -4,4 +4,7 @@ from .container import HMIFile, build
from .page import Page, Component, Attr, Group
__version__ = "0.1.0"
# Nextion Editor build every format rule and test fixture was verified against.
TESTED_EDITOR_VERSION = "1.68.2.3035"
__all__ = ["page_crc", "main_crc", "table_crc", "HMIFile", "build", "Page", "Component", "Attr", "Group"]
+9
View File
@@ -33,6 +33,15 @@ class ChecksumAlgorithms(unittest.TestCase):
self.assertEqual(checksum.page_crc(bytes(page)), bitwise_word_crc(bytes(page[4:]) + tail))
class EditorVersion(unittest.TestCase):
def test_fixture_written_by_tested_editor(self):
"""Canary: the fixture's main.HMI carries the marker Editor 1.68.2 writes (offset 9 = 0x44).
If a re-saved fixture from another Editor build changes it, update docs + TESTED_EDITOR_VERSION."""
import nxhmi
self.assertEqual(nxhmi.TESTED_EDITOR_VERSION, "1.68.2.3035")
self.assertEqual(HMIFile.load(FIXTURE).read("main.HMI")[9], 0x44)
class ChecksumsOfEditorOutput(unittest.TestCase):
"""Every checksum in a file written by Nextion Editor 1.68 must verify."""