bkbilly / lnxlink

🖥 Effortlessly manage your Linux machine using MQTT.
https://bkbilly.gitbook.io/lnxlink
MIT License
269 stars 29 forks source link

Wrong config error for gpu and media after upgrading to 2024.8.1 #120

Closed TomBursch closed 2 months ago

TomBursch commented 2 months ago

What type of installation are you running?

Desktop

Which Linux OS are you using?

Fedora 40 Workstation

Which version of LNXLink has the issue?

2024.8.1

Describe the problem

After upgrading from 2024.7.0 to 2024.8.1 the GPU and media add-ons are misconfigured and won't be loaded. Thanks for this great project, by the way!

Additional context

No response

Configuration

mqtt:
  prefix: lnxlink
  clientId: Toms-Desktop
  server: -
  port: 1883
  auth:
    user: -
    pass: -
    tls: false
    keyfile: ''
    certfile: ''
    ca_certs: ''
  discovery:
    enabled: true
  lwt:
    enabled: true
    qos: 1
    retain: false
update_interval: 5
hass_url: null
hass_api: null
modules: null
custom_modules: null
exclude:
- audio_select
- bash
- battery
- boot_select
- brightness
- fullscreen
- gpio
- inference_time
- ir_remote
- keep_alive
- keyboard_hotkeys
- mouse
- network
- power_profile
- screen_onoff
- screenshot
- send_keys
- speech_recognition
- systemd
- wifi
- statistics
settings:
  systemd: null
  gpio:
    inputs: null
    outputs: null
  hotkeys: null
  disk_usage:
    include_disks: []
    exclude_disks:
    - dev/nvme0n1p1
    - dev/nvme0n1p2
  statistics: https://analyzer.bkbilly.workers.dev
  bash:
    allow_any_command: false
    expose: null
  mounts:
    autocheck: false
    directories: []
  ir_remote:
    receiver: null
    transmitter: null
    buttons: []
update_on_change: false

Logs

Aug 07 11:14:52 toms-desktop systemd[5622]: Started lnxlink.service - LNXlink.
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:lnxlink:LNXlink 2024.8.1, Python 3.12.4
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:dasbus.connection:Connecting to the system bus.
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:dasbus.connection:Connecting to the system bus.
Aug 07 11:14:53 toms-desktop lnxlink[108133]: ERROR:lnxlink:Error with addon gpu, please remove it from your config: object of type 'int' has no len()
Aug 07 11:14:53 toms-desktop lnxlink[108133]: ERROR:lnxlink:Error with addon media, please remove it from your config: Invalid method call
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:lnxlink:Loaded addons: active_window, bluetooth, camera_used, cpu, disk_usage, display_env, gamepad, idle, interfaces, memory, microphone_used, mounts, notify, required_restart, restart, shutdown, speaker_used, ...]
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:lnxlink:MQTT connection: Success
Aug 07 11:14:53 toms-desktop lnxlink[108133]: INFO:lnxlink:Gamepads found: ['event2']
hugalafutro commented 2 months ago

i have the same error with media since update about 2 days ago

2024-08-07 11:16:13,894 [5773:MainThread.__main__.start.76] [ERROR]  Error with addon media, please remove it from your config: Invalid method call
2024-08-07 11:16:13,896 [5773:MainThread.__main__.start.84] [INFO]  Loaded addons: bash, update, send_keys
2024-08-07 11:16:13,901 [5773:paho-mqtt-client-.__main__.on_connect.241] [INFO]  MQTT connection: Success
bkbilly commented 2 months ago

I found the issue with the GPU, but I can't find the one with the media. Please run lnxlink with the option -l DEBUG and send me the output.

hugalafutro commented 2 months ago
INFO:lnxlink:LNXlink 2024.8.1, Python 3.12.4
INFO:dasbus.connection:Connecting to the system bus.
INFO:dasbus.connection:Connecting to the system bus.
DEBUG:lnxlink:Found addons: bash, media, update, send_keys
INFO:dasbus.connection:Connecting to the session bus.
INFO:dasbus.connection:Connecting to the session bus.
DEBUG:lnxlink:Can't create thumbnail: [Errno 2] No such file or directory: '', Traceback (most recent call last):
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/lnxlink/modules/media.py", line 130, in get_thumbnail
with open(arturl, "rb") as image_file:
^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: ''

ERROR:lnxlink:Error with addon media, please remove it from your config: Invalid method call
DEBUG:lnxlink:Traceback (most recent call last):
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/lnxlink/__main__.py", line 73, in start
tmp_addon = addon(self)
^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/lnxlink/modules/media.py", line 21, in __init__
self.media_player = self.lib["dbus-mediaplayer"].DBusMediaPlayers(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dbus_mediaplayer/__init__.py", line 27, in __init__
self.watch_changes()
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dbus_mediaplayer/__init__.py", line 73, in watch_changes
watch_proxy.PropertiesChanged.connect(self.dbus_callback)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/proxy.py", line 161, in __getattr__
member = self._get_member(self._get_interface(name), name)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/proxy.py", line 211, in _get_interface
self._handler.specification.members
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/handler.py", line 212, in specification
self._specification = self._get_specification()
^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/handler.py", line 332, in _get_specification
xml = self._call_method(
^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/handler.py", line 450, in _call_method
return self._get_method_reply(
^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/handler.py", line 483, in _get_method_reply
return self._handle_method_error(error)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/sammael/.local/share/pipx/venvs/lnxlink/lib/python3.12/site-packages/dasbus/client/handler.py", line 509, in _handle_method_error
raise exception from None
dasbus.error.DBusError: Invalid method call

INFO:lnxlink:Loaded addons: bash, update, send_keys
INFO:lnxlink:MQTT connection: Success
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): api.github.com:443
DEBUG:urllib3.connectionpool:https://api.github.com:443 "GET /repos/bkbilly/lnxlink/releases/latest HTTP/1.1" 200 1218
bkbilly commented 2 months ago

Found the issue with the media module and I've released a new update for the package dbus-mediaplayer, so you will have to update to the latest version 2028.8.0. This can be done with this command:

python -m pip install -U dbus-mediaplayer

You will have to replace python with your virtual environment which can be found with this command:

head -1 `which lnxlink` | cut -c3-
hugalafutro commented 2 months ago

thanks that fixed it.