Skip to content

[BUG] Error running dbus command from a published mqtt packet #535

Open
@eljefe80

Description

@eljefe80

Go Hass Agent Version
Go Hass Agent: v13.2.7

Describe the bug
A specific mqtt.publish dbus command as described in [https://github.com/joshuar/go-hass-agent?tab=readme-ov-file#custom-d-bus-controls] fails to work

To Reproduce
Steps to reproduce the behavior:

  1. Install go-hass-agent and configure home-assistant and mqtt
  2. perform an mqtt publish through the home-assistant MQTT "Publish a Packet" interface using the following payload:
{
  "bus": "session",
  "path": "/org/gnome/Mutter/DisplayConfig",
  "method": "org.freedesktop.DBus.Properties.Set",
  "destination": "org.gnome.Mutter.DisplayConfig",
  "args": [
      "org.gnome.Mutter.DisplayConfig",
      "PowerSaveMode",
      "0"
  ],
  "use_session_path": false
}
  1. See failed dbus command in the agent logs.

Expected behavior
I expect to see the dbus command succeed in the agent logs.

Logs

go-hass-agent.log

Desktop (please complete the following information):

  • OS: Linux
  • Armbian
  • 25.5.1

Additional context

The analogous dbus-send --print-reply --dest=org.gnome.Mutter.DisplayConfig /org/gnome/Mutter/DisplayConfig org.freedesktop.DBus.Properties.Set string:org.gnome.Mutter.DisplayConfig string:PowerSaveMode variant:int32:0 works fine.

From what I can tell, the error returned by dbus is similar to the one received when improperly formatted args are passed to dbus-send. However, I've tried various permutations of prepending the values in the packet with "string:" and "variant:int32" to no avail.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions