Commit Graph
95 Commits
Author SHA1 Message Date
ArdaandClaude Opus 5.5 7ca029e3ea Tint Page Editor canvas while the document has unsaved changes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 10:06:22 +03:00
ArdaandClaude Opus 5.5 26f9abb0dd Fix Page Editor hang on canvas click (TreeviewSelect feedback loop)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 10:01:13 +03:00
ArdaandClaude Opus 5.5 b0e769075f Flatten SOX slot registry through full base-type chain
Types with intermediate parents (e.g. ontrolOx::PushButtonImage ->
Widget -> Service -> Component) only got Component + own slots, so
config/runtime streams were decoded against the wrong slot list and
x/y/imageFileName came out wrong.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-09-24 09:01:59 +03:00
Arda fd951f5b82 WIP: auto-sync from AA-DELLDESKTOP 2026-09-23 15:20 2026-09-23 15:20:28 +03:00
ArdaandClaude Opus 4.6 d60b349cac Clear screen area in Rion frame image to transparent
Makes the 320x240 screen cutout at offset (76,62) transparent,
matching the Orion frame style so the page background color
shows through correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-23 10:22:09 +03:00
ArdaandClaude Opus 4.6 b0eb859f32 Add zoom support to OxPage editor with 50% default
Toolbar zoom buttons (in/out/reset/fit) and Ctrl+MouseWheel now
control the page editor canvas when it is active. Frame image is
scaled via PIL for smooth rendering at any zoom level.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 23:19:13 +03:00
ArdaandClaude Opus 4.6 74c169a401 Move widget tree pane to the right side of Page Editor
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 21:35:57 +03:00
ArdaandClaude Opus 4.6 cbf1010c16 Rename frame_rion_portrait.png to frame_orion_portrait.png
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 21:12:01 +03:00
ArdaandClaude Opus 4.6 9e2c063880 Add device frame images for Orion, Rion and Rion portrait
Three PNG frames in assets/ with transparent screen cutouts:
- frame_orion.png (1144x849, screen at 191,169 = 800x480)
- frame_rion.png (433x396, screen centered at 76,62 = 320x240)
- frame_rion_portrait.png (856x1134, screen at 190,170 = 480x800)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 21:10:37 +03:00
ArdaandClaude Opus 4.6 16edd144e9 Add OxPage WYSIWYG editor panel for ontrolOx HMI pages
New ox_page_view.py with OxPageViewPanel: canvas rendering at device
resolution (800x480 Orion, 320x240 Rion), RGB565 color conversion,
widget tree, selection handles, drag-move, device frame image support.
Wired into main.py with context menu, history, panel lifecycle.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 21:06:56 +03:00
ArdaandClaude Opus 4.6 d5ef8eea6f Improve User Manager: Workbench-style permissions dialog, live mode support, double-click to open
- Permissions dialog now uses two-level UI: compact Edit User with >> buttons
  opening a separate grid dialog (Groups x Operator/Admin columns) with
  Clear All / Set All and auto-cascade (write implies read, admin implies operator)
- Provisioning has its own >> popup dialog
- Removed live mode restrictions for add/edit/delete user operations
- Broadened type detection and added safe int conversion for live mode values
- Double-click on tree node or canvas box opens special view (User Manager for
  UserService, Properties for other components)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 20:57:49 +03:00
ArdaandClaude Opus 4.6 43549046e5 Add User Manager panel for sys::UserService components
New user_service_view.py with table of sys::User children, add/edit/delete
dialogs, SHA-1 credential hashing, 32-bit permission bitmask (4 groups x 7
flags), 8-bit provisioning byte, and undo support. Wired into main.py with
context menu entry, panel management, history navigation, and live-mode DOM
resolution for correct display on connected devices.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 20:10:03 +03:00
ArdaandClaude Opus 4.6 190ab79bdc Add TODO.md for task tracking
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-22 12:54:42 +03:00
ArdaandClaude Opus 4.6 a60907e996 Update graphify config to Python 3.14 and set watch root to raw/
Bump version to 0.0.0.115.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-21 13:45:44 +03:00
Arda b74e4fa373 WIP: auto-sync from AA-LENOVOHOME 2026-09-20 22:16 2026-09-20 22:16:01 +03:00
ArdaandClaude Opus 4.6 42c93bdea7 Add architecture traces document covering 14 codebase flows
Deep architectural traces spanning kit management, schema registry,
file save/open pipelines, live device connection, DASP transport,
SOX protocol commands, and invoke/action slot flow.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-20 14:45:32 +03:00
ArdaandClaude Opus 4.6 abdafef7cb Use manifest defaults when adding components and refresh properties from device
- Populate prop elements with manifest default values when adding
  components in both offline and live mode
- Send config values from manifest in SOX add command for live devices
- Refresh button in properties panel now fetches fresh values from
  the connected device before re-reading the DOM
- Properties panel fetches device values on open in live mode

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-20 00:14:52 +03:00
ArdaandClaude Opus 4.6 2530bbd92c Implement live device add/delete component and app actions
Fix add component from palette in live mode: resolve <app> element
as comp_id 0, fix type_id lookup to use type_name_map, set type_name
on newly added SoxComponent, sync device values into DOM after add,
write meta position back to device, and subscribe new component to COV.

Fix delete component in live mode: clean up subscriptions for deleted
component and all its descendants.

Add tree root context menu with device app actions (save, hibernate,
quit, restart, reboot) in live mode. Device save clears dirty state.

Clean up connection lost handling to do a full disconnect.
Fix slot registry to copy base slots and renumber IDs correctly.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 16:30:42 +03:00
ArdaandClaude Opus 4.6 9a483a0b0e Add descriptive hints to DASP connection errors
Authentication failures now show "check username and password", busy
devices say "device is busy", etc.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 14:19:24 +03:00
ArdaandClaude Opus 4.6 021361f836 Allow empty password in Connect and Discover dialogs
Some devices have no password configured, so only username is required.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 14:17:15 +03:00
ArdaandClaude Opus 4.6 05d0ac8c03 Validate username and password in Connect dialog too
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 13:51:34 +03:00
ArdaandClaude Opus 4.6 dd236dd28a Validate username and password in discovery credentials dialog
Show an error if either field is empty before attempting to connect.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 13:49:26 +03:00
ArdaandClaude Opus 4.6 55f76d60df Add Device > Discover menu with standalone discovery dialog
Discover dialog shows a device list with Port, Wait Time fields and a
Discover button. Selecting a device and clicking Connect (or double-
clicking) opens a credentials prompt for username/password, then
connects. The Connect dialog is reverted to its original simple form.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 13:42:18 +03:00
ArdaandClaude Opus 4.6 ef5437ed36 Add DASP device discovery to the connect dialog
Send DISCOVER broadcast (type 0) to 255.255.255.255 and the Sedona
multicast address 239.255.18.76 to find devices on the network.
Responses are listed in a Treeview showing IP and platform ID.
Selecting a device fills the Host field; double-click connects.
Wait time is configurable (default 10s, range 1-60s).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 13:28:17 +03:00
ArdaandClaude Opus 4.6 f3692e4587 Fix DASP hostname resolution so localhost and hostnames work
The dispatch check compared the raw hostname string against the UDP
source IP, silently dropping responses when they differed (e.g.
"localhost" vs "127.0.0.1"). Resolve hostname to IP at session init.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-19 12:19:41 +03:00
Arda 96f3be841d WIP: auto-sync from AA-LENOVOHOME 2026-09-13 21:50 2026-09-13 21:50:42 +03:00
ArdaandClaude Opus 4.6 60c022828d Fix live-mode link navigation not selecting the target link
In live mode the DOM is rebuilt from the device when switching sheets,
creating new element objects. The pending link from the old tree could
not be found by identity in canvas_link_map. Re-resolve it by from/to
attributes after the rebuild so the selection matches.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 22:15:48 +03:00
ArdaandClaude Opus 4.6 7dea3d744f Improve DASP trace: use S/R labels, add timestamp and full hex datagram
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 22:08:12 +03:00
ArdaandClaude Opus 4.6 483edc117e Update editor.properties with device defaults and trace setting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 21:52:52 +03:00
ArdaandClaude Opus 4.6 c59cd22153 Fix live-device slot ID resolution, add print and tighten wire routing
_slot_name_by_id() now resolves SOX link slot IDs against the
inheritance-flattened final_components_registry instead of the
per-type slot_registry whose local IDs were wrong for types with
intermediate parents (e.g. RegFloat→Register→Component). This
produced incorrect link endpoints, inflated linked-slot visibility,
and different box sizes between file and live modes.

Also: tighten routing constants for denser wiring, add wiresheet
PNG print/export (Ctrl+P), sort link routing jobs by gap distance,
remove debug route logging, and fix live tree-expand re-selection.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 21:51:22 +03:00
ArdaandClaude Opus 4.6 6cd030c7ea Fix live wiresheet config/runtime slot alignment and cap float display to 2 decimals
Slots with no flags (sensor, controlSignal, out_*) were not skipped
during config property reads, consuming bytes that the device never
sent and misaligning every subsequent config value (setpoint,
proportionalBand, etc.) into tiny denormalized floats like 2.36875e-41.

Changed the filter in _apply_props from "skip if runtime" to "skip if
not config" so only explicitly config-flagged slots are read from config
messages. Also switched iter("slot") to findall("slot") in the slot
registry builder to avoid picking up nested descendants.

Float display now defaults to 2 decimal places everywhere (wiresheet
and properties panel), honouring the precision facet when one exists.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 15:46:44 +03:00
ArdaandClaude Opus 4.6 48671585dd Ensure live float values always display with a decimal point
Adds _fmt_float() helper that formats 32-bit floats with :.6g precision
but appends .0 when the result has no decimal point, matching Niagara
and .sax file display conventions (e.g. 175.0 not 175, 0.0 not 0).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 14:10:35 +03:00
ArdaandClaude Opus 4.6 ef80bf9a37 Format live float values to 6 significant digits matching 32-bit precision
Sox reads 32-bit floats that Python promotes to 64-bit doubles, producing
display artifacts like 22.011558532714844. Using :.6g format gives clean
values matching .sax file precision (22.0116, -19.9574, 175, 14).
Applied to both initial DOM build and COV update paths.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 14:03:04 +03:00
ArdaandClaude Opus 4.6 e33a6bc5d8 Guard file open and device connect against conflicting state
Opening a file while connected to a device prompts to disconnect first.
Connecting to a device while a file is open prompts to save unsaved
changes, then closes the file before showing the connect dialog.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:58:55 +03:00
ArdaandClaude Opus 4.6 89aab50948 Fix live wiresheet links and DOM structure to match .sax format
- Build root children directly under <app> instead of wrapping them in
  a <comp name="app"> element. This matches the .sax DOM structure
  where <app> is the container, so component paths like /AHU/TmpCont/X
  match between link references and get_component_path.

- Fix _comp_path to produce /AHU/TmpCont/X format (skip root id 0,
  leading /) matching the .sax link path convention.

- Format float property values to 4 decimal places instead of full
  Python float precision (22.0116 vs 22.011558532714844).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:55:12 +03:00
ArdaandClaude Opus 4.6 4e38847f91 Fix live wiresheet: resolve type names and load schema gracefully
- Add type_name_map on SoxClient so components loaded after connect
  resolve proper names (e.g. control::And2) instead of kit::typeN.
  This lets the slot registry and final_components_registry match,
  so component boxes show their slots and property values.

- Load live schema gracefully: skip missing kit manifests instead of
  aborting, compile the kits we have, and warn about missing ones in
  the status bar.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:43:44 +03:00
ArdaandClaude Opus 4.6 4c90c1c241 Apply offline wiresheet rules to live mode: meta positions and links
Three fixes so live wiresheets render identically to offline .sax files:

1. Inherit sys::Component base slots (meta) into every type's slot
   registry so component x/y positions are read from the device.

2. Place <link> elements under a <links> container element instead of
   directly under <app>, matching the .sax structure that draw_links
   and build_linked_slot_index expect.

3. Deduplicate links (each link appears on both endpoints in Sox) so
   wires are not drawn twice.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:14:02 +03:00
ArdaandClaude Opus 4.6 599370f60c Put Device menu first in menu bar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:05:23 +03:00
ArdaandClaude Opus 4.6 a0e5ec1a31 Move Device menu after File in the menu bar
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 13:04:15 +03:00
ArdaandClaude Opus 4.6 b4a504e57d Fix connect dialog: button order and cancel-during-connection cleanup
Swap Connect/Cancel button order so Connect is the default (leftmost).
Guard background thread against cancelled state so a cancelled connect
does not leave the app in live mode. Cancel during connection now
disconnects the session cleanly in a cleanup thread.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 09:41:21 +03:00
ArdaandClaude Opus 4.6 0674f32637 Pre-load root children on connect and add placeholders for uncached nodes
On connect, also loads root's immediate children so the first tree level
shows real names. For deeper levels, inserts placeholder <comp> elements
for uncached children so the Treeview shows + expand arrows for folders
that have children on the device.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 09:20:49 +03:00
ArdaandClaude Opus 4.6 d32285abe8 Fix tree expand in live mode: use focused item and run IO in background
_on_tree_open used tree.selection() which may differ from the opened
node; switched to tree.focus(). Network calls in _live_tree_expand now
run in a daemon thread so the UI stays responsive during lazy loading.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 09:11:14 +03:00
ArdaandClaude Opus 4.6 67c403339c Fix live tree selection lost after wiresheet DOM rebuild
After open_wiresheet rebuilds the DOM and tree, re-find the target
element by its comp id (not the old tree item ID which no longer
exists) and re-select it with the restoring flag to prevent recursion.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-12 00:24:10 +03:00
ArdaandClaude Opus 4.6 1fd6e72b8c Fix DASP close deadlock and kit checksum sign display
Use RLock instead of Lock for _close_lock so close() can call
_shutdown() without deadlocking — previously the session never
marked itself closed, causing infinite keepalive sends.

Mask kit checksums to unsigned 32-bit for hex display so negative
i4 values render as proper 8-digit hex (e.g. d3984c51 not -2c67b3af).

Tested against live device at 192.168.1.251 — full handshake,
schema read, and component tree load confirmed working.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 23:57:19 +03:00
ArdaandClaude Opus 4.6 643bcdc952 Add Trace DASP preference to print protocol transactions to terminal
New checkbox in Preferences (default off). When enabled, every DASP
send (>>>) and receive (<<<) prints message type, seq/ack numbers,
payload size, and remote address to stdout.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 23:48:10 +03:00
ArdaandClaude Opus 4.6 4431f11d83 Fix crash on tree select when item no longer exists after DOM rebuild
Guard tree.get_children() with tree.exists() so a stale item ID from
a COV or lazy-load rebuild does not raise TclError.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 23:43:22 +03:00
ArdaandClaude Opus 4.6 dafebcebda Live Editor: add DASP/Sox device connection with full CRUD and COV
Port the DASP transport and Sox protocol stack from sedonaOntrol Java
to Python, enabling live device editing alongside the existing offline
SAX editor. Lazy-loads components on navigation, caches them, and
subscribes to COV events for the active wiresheet.

New files: dasp.py, sox.py, device_session.py, connect_dialog.py,
live_hooks.py. Modified: app_state.py (live-mode state), main.py
(Device menu, COV polling, lazy tree expand), properties.py (Sox
write-through), sax_file.py (structural mutations route through
live_hooks), schema.py (find_manifest helper).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 23:31:36 +03:00
ArdaandClaude Opus 4.6 48dfd82832 Kit Manager: detect unsupported kits via platform database
Scan sedona/platforms/db/ to find which native kits are compiled for
the SAX's platform.  Kits with native code for other platforms, kits
providing a PlatformService for a different device, and their
transitive dependents are placed in a "Not supported" section with a
red-cross checkbox that cannot be toggled.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 14:21:00 +03:00
ArdaandClaude Opus 4.6 f1cc15f70f Export XLS: add timestamp to default filename
The save dialog now suggests e.g. normal_kits_20260911_143200.xlsx
so successive exports never collide.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 13:17:39 +03:00
ArdaandClaude Opus 4.6 d3d141cca8 Kit Manager: add Export as XLS button
Saves the kit table to an Excel file with section headers, check
marks, and all four data columns. Default filename is based on the
open SAX file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-09-11 13:06:30 +03:00