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

Siglo D-Bus daemon #105

Open
wants to merge 13 commits into
base: main
Choose a base branch
from
Open

Siglo D-Bus daemon #105

wants to merge 13 commits into from

Conversation

kq98
Copy link
Contributor

@kq98 kq98 commented Mar 29, 2022

Siglo daemon
The daemon is driven by a d-bus service and is as such init system agnostic. It currently implements:

  • connections, disconnections, scans, pulling the firmware version, setting the time, pushing notifications and music player data to the watch(my old PR)
  • The daemon exposes a dbus interface under the common name com.github.alexr4535.siglo.Daemon that the GUI process or another application can use to interact with the daemon.
  • The dbus interface could easily be expanded and expose kinetic data, which is what some people wanted.
  • Pairing is unfortunately not possible right now with the current gatt library. I'm currently looking into bleak which is the only library that I could find that does implement pairing(recommendations welcome).

Notably the daemon currently does not handle Firmware updates, although that would certainly be possible. I didn't want to make this PR even larger, so for now the flashing is still handled by the gui application.

Problems
Warning messages clutter stderr, they are only present when access to the entire session bus is granted and they seem to be associated with file manipulations. But I don't know anything further.

Testing and Feedback
To make the testing a little bit easier, I pushed the daemon on my testing branch as well, with a slightly modified manifest so that you can install everything like this:

git clone --branch=testing https://github.com/kq98/siglo.git
cd siglo
flatpak-builder --force-clean --install --user build-dir com.github.alexr4535.siglo.json

You can use notify-send to simulate an incoming sms for testing like this:

notify-send Joe 'This is an example message' --hint=STRING:'desktop-entry':'sm.puri.Chatty'

All MPRIS compliant music players should work.
The daemon interface has a Quit() method you can call using d-feet, should the daemon get stuck. Or just kill it using htop.
You can also run the daemon manually to capture it's output with
flatpak run com.github.alexr4535.siglo --daemon

Be aware that if you already installed Siglo on that device in the past, the sandbox permissions might not be up to date. Check with Flatseal that Siglo has access to the entire session bus and permission to run in the background.

I hope, that even when this doesn't make it into the project, which I understand considering the size of this PR, that I could at least inspire some further development on Siglo.

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.

1 participant