Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

I can't get it working #145

Open
philmulley opened this issue Jan 6, 2025 · 7 comments
Open

I can't get it working #145

philmulley opened this issue Jan 6, 2025 · 7 comments
Labels
installation Installation

Comments

@philmulley
Copy link

What type of installation are you running?

Desktop

Which Linux OS are you using?

Arch

Which version of LNXLink has the issue?

2025.1

The problem

I installed pipx and pip3 with no issues. When I get to the setup stage I start to see errors.
I've attached a screenshot of my lnxlink.log file which shows these errors.
2025-01-06-141303_hyprshot

I tried the curl command and saw more issues:
2025-01-06-141541_hyprshot

I tried to restart the service and "lnxlink.service not found" error came up.

I do have the settings.yaml set up and it looks fine.

If there is anything else I can do to help fault find: please let me know and thanks in advance for your time.

P

Logs

No response

@philmulley philmulley added the installation Installation label Jan 6, 2025
@bkbilly
Copy link
Owner

bkbilly commented Jan 7, 2025

It seems that I don't have included the Arch Linux in the installation of the required packages in the installation script.
Which Arch distribution exactly are you using so that I could try it out and fill the missing requirements?

@KoderFPV
Copy link

@bkbilly
I have same problem. Pls do it for vanilla arch pls :)

It would be excellent to have arch wiki page and/or AUR package of this tool :)

@philmulley
Copy link
Author

I'm using Arcolinux which is an arch derivative.

Thanks for your quick reply.

P

@bkbilly
Copy link
Owner

bkbilly commented Jan 18, 2025

I've updated the installation script which will install the dependencies for the ARCH Linux distros. I've only tested it for Arcolinux that you suggested, but it should work across all arch distributions.

curl -L https://raw.githubusercontent.com/bkbilly/lnxlink/master/install.sh | bash

There is an issue with the 'gi' library that is missing which will be fixed in future releases. For now, once the installation is complete, you should also write this command:

~/.local/share/pipx/venvs/lnxlink/bin/python -m pip install PyGObject

@philmulley
Copy link
Author

philmulley commented Jan 24, 2025

I followed your instructions and everything worked. Great stuff.

However, although I can run the program manually as you suggest, I do not have a lnxlink.service for systemd to start or stop. I could run the manual command at system startup but how do I create the systemd service?

@bkbilly
Copy link
Owner

bkbilly commented Jan 24, 2025

This is curious behaviour. After the message SystemD service not found, it should have prompt you to install it.
When you installed it, did it ask you to setup the MQTT server, users, etc...?

Normally, everytime you run it, it looks for SystemD. This can be done with the following command:

lnxlink -c settings.yaml

Let me know if the above command helps.

EDIT:
The service might already be installed, but as a user service, in which case it needs the --user option:

systemctl --user restart lnxlink.service

@philmulley
Copy link
Author

Here is the output of the first command:

lnxlink -c settings.yaml
INFO:lnxlink:Config file not found.
INFO:lnxlink:Created new template: /home/phil/settings.yaml
INFO:lnxlink:
Leave empty for default
Enable MQTT automatic discovery (True/False) [True]:
MQTT server [192.168.1.1]: 192.168.0.10
MQTT port [1883]:
Enable TLS (True/False) [False]:
MQTT username [user]: mqtt-user
MQTT password [pass]: mqtt-user
Change clientId [DESKTOP-Linux]: n
Send statistics (True/False) [True]:
INFO:lnxlink:
All changes have been saved.
INFO:lnxlink: MQTT Topic prefix for for monitoring: lnxlink/n/...
INFO:lnxlink: MQTT Topic prefix for for commands: lnxlink/n/commands/...
INFO:lnxlink:LNXlink 2025.1.0, Python 3.13.1
ERROR:lnxlink:Error with addon docker, please remove it from your config: Docker instance not found: Error while fetching server API version: ('Connection aborted.', FileNotFoundError(2, 'No such file or directory'))
INFO:lnxlink:Loaded addons: active_window, bluetooth, camera_used, cpu, disk_io, disk_usage, display_env, gamepad, interfaces, memory, microphone_used, mounts, required_restart, restart, shutdown, speaker_used, statistics, steam, suspend, sys_updates, temperature, update, wifi
INFO:lnxlink:MQTT connection: Success

When I ran the second command I did not get the error again saying that there was no such service: so I was very hopeful that the systemd service had been created. However, when I checked all systemd services I could not find any that related to lnxlink.

It seems that when I ran the first command a second media player was created within MQTT in Home Assistant. I opened this object and found it to be working ok.

When I closed the command window where I had run the commands this media player stopped responding and all the sensors came up as unavailable again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
installation Installation
Projects
None yet
Development

No branches or pull requests

3 participants