Skip to content

Add actor model to query device resources and resource items as VFS - #8274

Merged
manup merged 4 commits into
dresden-elektronik:masterfrom
manup:am_dev
Jul 16, 2025
Merged

Add actor model to query device resources and resource items as VFS#8274
manup merged 4 commits into
dresden-elektronik:masterfrom
manup:am_dev

Conversation

@manup

@manup manup commented Jul 16, 2025

Copy link
Copy Markdown
Member

The PR adds an actor model (AM) entry point which lets the GUI and other actors query resources in the plugin by sending small asynchronous messages. For now this supports read-only queries against resources and sub-resources of the Device class.

There is a virtual file system (VFS) protocol layered on top of AM messages to read virtual directories and files.
In the upcoming deCONZ version the VFS is visualized in a debug widget which can be accessed via menu:

Help → Data view

image

Note: The widget doesn't know anything about devices or resource items, it only shows directories and entries.

The PR generically presents a path like /devices/00:15:8d:00:01:a2:4a:ff/subdevices/00:15:8d:00:01:a2:4a:ff-01-0406/state/presence as tree. Items like state/presence represent a directory (state) with an entry (presence).

Implementation details:
The actor model in deCONZ is a new way to let various components or plugins send messages to each other without tight coupling via C/C++ APIs. For example the REST plugin can talk with the OTA plugin, GUI or GCFFlasher. Currently this is internal but will be extended to be reachable via encrypted WebSockets.

There is no get_all, the whole VFS works just like a file system API each directory and entry is queried as a single request. Directories may require multiple requests if the content doesn't fit in a single response as the actor model used rather small message sizes of max. 4k - 64k.

The VFS updates its state automatically, similar to ZCL attribute reporting values that are changed emit a notification to all subscribers.


This is the first step to get the REST plugin data represented in the GUI. Next goal is to also visualize some of the data within Node GUI, e.g. a light showing its on/off state or sensors their values. Ideally this can be customized by the user by just drag and drop values from the Data view onto the node in the GUI.

@manup manup added this to the v2.31.0-beta milestone Jul 16, 2025
@manup
manup merged commit 961ac29 into dresden-elektronik:master Jul 16, 2025
@manup
manup deleted the am_dev branch July 31, 2025 10:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant