Skip to content

Commit

Permalink
Update service and arguments
Browse files Browse the repository at this point in the history
  • Loading branch information
mill1000 committed Nov 8, 2024
1 parent 0253dfb commit 511b964
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion mpris-monitor.service
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ After=dbus.service network-online.target
Wants=dbus.service network-online.target

[Service]
ExecStart=/home/pi/.local/bin/mpris-monitor-kasa --pause_timeout=300 --stop_timeout=10 'TP-LINK_Power Strip_E705'
ExecStart=/home/pi/.local/bin/mpris-monitor-kasa --pause-timeout=300 --stop-timeout=10 kp303.lan
StandardOutput=journal
StandardError=journal
SyslogIdentifier=mpris-monitor
Expand Down
6 changes: 3 additions & 3 deletions mpris_monitor_kasa.py
Original file line number Diff line number Diff line change
Expand Up @@ -453,12 +453,12 @@ def main():
format='%(levelname)s: %(message)s', level=logging.INFO)

# Argument parsing
parser = argparse.ArgumentParser(description="Automate system power by subscribing to MPRIS D-Bus signals.",
parser = argparse.ArgumentParser(description="Monitor the system D-Bus for MPRIS signals and control a Kasa switch.",
formatter_class=argparse.ArgumentDefaultsHelpFormatter)
parser.add_argument(
"--pause_timeout", help="Disable system power when paused for this duration (seconds).", default=60, type=int)
"--pause-timeout", help="Disable system power when paused for this duration (seconds).", default=60, type=int)
parser.add_argument(
"--stop_timeout", help="Disable system power when stopped for this duration (seconds).", default=5, type=int)
"--stop-timeout", help="Disable system power when stopped for this duration (seconds).", default=5, type=int)
parser.add_argument(
"--discover", help="List Kasa devices discovered on the network and exit.", action="store_true")
parser.add_argument(
Expand Down

0 comments on commit 511b964

Please sign in to comment.