Skip to content

Instantly share code, notes, and snippets.

@kellerza
Created May 17, 2016 17:06
Show Gist options
  • Save kellerza/0449688ba8bbacc2b99aebc10ade1c29 to your computer and use it in GitHub Desktop.
Save kellerza/0449688ba8bbacc2b99aebc10ade1c29 to your computer and use it in GitHub Desktop.
QS Mobile auto-start instructions

Qwikswitch Mobile auto-start

This gist contains instructions to auto-start the QS Mobile application (used for Debain/Jesse on Raspberry Pi).

  • Create a 'qsusb' user: sudo adduser qsusb

  • Copy the QS Mobile application to /home/qsusb/qsusb

  • Ensure all the files belong to the target user:

    sudo chown qsusb:qsusb -R /home/qsusb/qsusb/*

  • Create the systemd & udev files shown below

  • Finally start the service:

   sudo systemctl daemon-reload
   sudo systemctl start qsusb

systemd startup script for QS Mobile

File /etc/systemd/system/qsusb.service:

[Unit]
Description=Home Assistant
After=network.target

[Service]
Type=simple
User=qsusb
ExecStart=/home/qsusb/qsusb/qsusb
Restart=on-failure

[Install]
WantedBy=multi-user.target

udev rule for QSUSB

File /etc/udev/rules.d/50-qsusb.rules:

SUBSYSTEMS=="usb", ATTRS{product}=="QwikSwitch*", GROUP="qsusb"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment