Page 1 of 1

Issue with integration of Domoticz and Matter server: Unable to switch On/Off

Posted: Thursday 23 July 2026 10:06
by Jamboman
I am experiencing a problem controlling a Matter On/Off device from Domoticz using the Python Matter Server.

The Matter device is discovered correctly and state synchronization works in one direction, but switching the device from Domoticz fails.


Environment
Domoticz: 2026.2 (build 18141)
Hardware type: Matter (python-matterjs-server)

Matter Server Docker image:

ghcr.io/matter-js/python-matter-server:stable

Matter Server version:

2025.7.0
Platform:
Synology DS918+
DSM 7.x
Container Manager
Docker network mode: host

Docker compose:

services:
matter-server:
image: ghcr.io/matter-js/python-matter-server:stable
container_name: matter-server
restart: unless-stopped
network_mode: host
security_opt:
- apparmor:unconfined
volumes:
- ./data:/data


Matter device

KlikAanKlikUit MAGC-2300 (Matter smart plug/switch)

Commissioned using Apple Home.

Added to the Python Matter Server via Multi-Admin.


Behaviour

- Works correctly
Apple Home can switch the device.
Matter Server receives the correct state.
Domoticz discovers the device.
Domoticz correctly updates the device status when it is switched from Apple Home.

- Does not work
Switching the device from Domoticz immediately fails.


Domoticz logs:

Status: User: admin initiated a switch command (.../On)

Error: Matter: Server error:
type object 'Commands' has no attribute 'on'

Matter: Light/Switch (...)

Matter Server logs:

AttributeError:
type object 'Commands' has no attribute 'on'. Did you mean: 'On'?

Traceback (most recent call last):

File "/usr/local/lib/python3.12/site-packages/matter_server/server/client_handler.py", line 213, in _run_handler
raise err

File "/usr/local/lib/python3.12/site-packages/matter_server/server/client_handler.py", line 196, in _run_handler
result = await result

File "/usr/local/lib/python3.12/site-packages/matter_server/server/device_controller.py", line 703, in send_device_command
command_cls = getattr(cluster_cls.Commands, command_name)


Analysis

The Python Matter Server attempts:

getattr(cluster_cls.Commands, command_name)

where command_name appears to be:

on

However, the current CHIP SDK exposes:

Commands.On
Commands.Off


which results in the AttributeError.

It is therefore unclear whether:

Domoticz sends "on" instead of "On", or
the Matter Server converts "On" to "on" before calling getattr().

Since the Matter Server traceback indicates the exception occurs inside send_device_command(), it may be helpful to log the received command_name before the getattr() call.


Expected behaviour

Clicking On or Off in Domoticz should switch the Matter device successfully.


Additional observations

State synchronization from Apple Home → Matter Server → Domoticz works perfectly.

Only Domoticz → Matter Server → device fails.

Re: Issue with integration of Domoticz and Matter server: Unable to switch On/Off

Posted: Tuesday 04 August 2026 14:58
by gizmocuz
Thanks for the detailed report, the logs made this easy to track down!

You found a real bug. The Matter driver was developed and tested against matterjs-server, which is tolerant about command name casing (it converts whatever it receives).
The original python-matter-server that you are running is strict: it looks up the command name directly on the Matter SDK command classes, which are PascalCase. Domoticz was sending "on" instead of "On", hence the AttributeError you saw.
That also explains why state updates worked fine in one direction: those don't involve command names at all.

I've just pushed a fix that sends the proper PascalCase command names (On, Off, MoveToLevelWithOnOff, etc.) for all device commands. This works with both python-matter-server and matterjs-server.

The fix will be included in beta build 18167 (or later).

Please update to the latest beta once it's available and let me know if you can control your MAGC-2300 from Domoticz.