Service

The service does the communication between hardware and software, by sending the commands received from the D-Bus API to the ACPI.

D-Bus API

The service can be controlled through the D-Bus API. You can also view information like the temperature, fan speed, etc.

<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
- file, You can obtain one at https://mozilla.org/MPL/2.0/. -->
<!DOCTYPE node PUBLIC "-//freedesktop//DTD D-BUS Object Introspection 1.0//EN" "https://specifications.freedesktop.org/dbus/introspect-latest.dtd">

<node>
  <interface name="com.musikid.fancy">
    <property name="FansSpeeds" type="ad" access="read"></property>
    <property name="TargetFansSpeeds" type="ad" access="readwrite"></property>
    <property name="PollInterval" type="t" access="read"></property>
    <method name="SetTargetFanSpeed">
      <arg name="Index" direction="in" type="y" />
      <arg name="Speed" direction="in" type="d" />
    </method>
    <property name="FansNames" type="as" access="read"></property>
    <property name="Config" type="s" access="readwrite"></property>
    <property name="Auto" type="b" access="readwrite"></property>
    <property name="Critical" type="b" access="read"></property>
    <property name="Temperatures" type="a{sd}" access="read"></property>
  </interface>
</node>

Properties changes

It's not possible (for now) to subscribe to the following properties:

  • FansSpeeds
  • PollInterval
  • FansNames
  • Critical
  • FansNames
  • Temperatures

This is because they are directly modified by the service and the signal org.freedesktop.DBus.Properties.PropertiesChanged have to be triggered manually, which would consume more CPU.

FansNames and PollInterval change only when Config is changed, so subscribing to Config and getting these properties when it changes should work. The other properties can instead manually be polled with an interval of PollInterval.