Skip to content

fix(docs): power shellcmd return codes corrected#598

Closed
johann-pfefferl wants to merge 17 commits into
siemens:mainfrom
johann-pfefferl:jp-fix-shellcmd-power-doc
Closed

fix(docs): power shellcmd return codes corrected#598
johann-pfefferl wants to merge 17 commits into
siemens:mainfrom
johann-pfefferl:jp-fix-shellcmd-power-doc

Conversation

@johann-pfefferl

Copy link
Copy Markdown
Member

Fix the configuration description for the power » shellcmd action

chombourger and others added 16 commits April 9, 2026 14:48
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
The mtda gRPC service may be restarted (e.g. when a configuration
file is changed) and would render running consoles such as mtda-cli
unusable. Attempt to re-connect and re-use the existing event
mechanism for consoles to (optionally) inform the user.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
SMBIOS can expose a unique machine identifier for the Operating
System to identify the machine it is running on. Make the qemu
power controller generate/use a machine ID and pass it over to
qemu via the -uuid option.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
The browser sends normalized float coordinates (0.0-1.0) but the
MouseMoveRequest proto fields were declared as int32, causing a
TypeError when passing floats via gRPC. Change x and y fields to
float so normalized coordinates flow through to the HID backend
which handles scaling to absolute values internally.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
This makes the service a bit more resilient when devices on the mtda
device were physically reconnected.
If the service now fails it is automatically restarted which avoids
the need to restart the service manually.

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
The default password for anel powerplugs is "anel" not "amel"

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
Add a snapshot() method to VideoController that captures a
single frame and returns (bytes, content_type).

Implement snapshot() in the ustreamer, mjpg-streamer, and QEMU
video drivers.  The ustreamer and mjpg-streamer drivers fetch a
JPEG from their respective HTTP snapshot endpoints.  The QEMU
driver uses the monitor screendump command and converts the PPM
output to JPEG via Pillow.

Expose the feature through the agent API (video_snapshot()) and
a server-streaming gRPC RPC (VideoSnapshot) that chunks the
image data in 64 KiB pieces to accommodate 4K frames.  Add the
corresponding client helpers and high-level Client.video_snapshot()
wrapper.  Also add mtda-cli "video snapshot" with optional
-o/--output; when omitted the image is written to stdout.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Add a -c/--condense option to the "console dump" and
"console flush" subcommands.  When set, the output is
passed through _condense_output() which strips VT100/ANSI
escape sequences and collapses consecutive whitespace to a
single space before printing, making captured console logs
easier to parse programmatically.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
The mDNS service lookup has a ~3 second timeout that was applied
unconditionally, even when the remote was already specified as a
numeric IP address or a DNS-resolvable hostname (e.g. localhost).
Skip the Zeroconf resolution when the remote is already a valid IP
address or can be resolved via standard DNS.

Signed-off-by: Cedric Hombourger <cedric.hombourger@siemens.com>
The mtda debian package expects the mtda user's home directory at
/var/lib/mtda, not /home/mtda. The mtda-service package already
creates the mtda user with /var/lib/mtda as the home directory.

This also fixes a rebuild failure during image-postprocess stage when
building the mtda-image from the sstate cache, where usermod errors
out with:

  usermod: directory /home/mtda exists

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
libgpiod-v1 does not have a "real" python package but rather a single C
binding library.
Starting with libgpiod-v2 imports like gpiod.* starts to work.

Bookworm installs python3-libgpiod v1.6 whereas trixie installs the v2.2.

The produced error on bookworm looks as follows:

  error: power could not be found/loaded!

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
Fixes: 1cce630 ("feat(power): support for python3-libgpiod v2")
Commit 468627ff of isar-cip-core introduced the wfx backend enablement
by just setting the `WFX_URL` variable, thus the custom recipe in mtda
is not required anymore.

Signed-off-by: Benedikt Niedermayr <benedikt.niedermayr@siemens.com>
A similar fix has been applied to the qemu storage in b02521f.

Fixes: bba9ae6 ("feat(usbf): auto-create file if not available")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
On ro-images we deploy an empty var partition. By that, the mtda homedir
in /var/lib/mtda currently does not exist on ro images. To fix this, we
just create the (empty) dir with a tmpfiles.d entry, similar to how it
is done in isar-cip-core. If the directory is present, nothing is done.

Previously this was not needed, as the copy and creation of /home is
automatically handled by isar-cip-core.

Fixes: 28f7d2f ("mtda: use /var/lib/mtda as home directory for ...")
Signed-off-by: Felix Moessbauer <felix.moessbauer@siemens.com>
@github-actions github-actions Bot requested a review from chombourger June 22, 2026 13:35
@chombourger

Copy link
Copy Markdown
Collaborator

can we change the target branch to next. we merge there first

Signed-off-by: Dr. Johann Pfefferl <johann.pfefferl@siemens.com>
@johann-pfefferl johann-pfefferl force-pushed the jp-fix-shellcmd-power-doc branch from 8bf3208 to 29cc635 Compare June 22, 2026 13:45
@johann-pfefferl johann-pfefferl deleted the jp-fix-shellcmd-power-doc branch June 22, 2026 15:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants