Plugable-BTAPS Python Library for Creating Custom Applications with the Plugable PS-BTAPS1

Plugable BTAPS Command Line Application

We are excited to announce the release of our open-source library for interacting with our Plugable PS-BTAPS1 Bluetooth Power Switch. This library is fully compatible with Windows and Linux systems running Python 2.7 and the pyBluez library. We hope that this library will help the open-source and maker community create interesting new projects and applications with our Programmable Bluetooth Power Switch.

All of the code and documentation for the library is hosted on our Plugable BTAPS Github Repository. Some examples of how to use the library can be found in our Github wiki. The library is MIT Licensed, so feel free to use it directly, or as a reference for implementing BTAPS functionality in any of your projects.

This library exposes most of the features present in our Android and iOS apps including:

  • Setting Switch On/Off
  • Reading current status of switch (name, on/off state, timer settings)
  • Creating, modifying, and deleting timers
  • Changing the device’s name
  • Updating the device’s date and time to your PC’s current date and time

Bundled with the library is also a simple command-line interface for interacting with a single Plugable PS-BTAPS1. It’s an interactive program, and only requires the Bluetooth device address of a PS-BTAPS1 to be used.

# Replace 00:00:00:00:00:00 with your device's Bluetooth Device address
btaps 00:00:00:00:00:00

The library and CLI application can be easily installed using pip.

pip install plugable-btaps

Some small features are still missing, but they will be implemented as time allows. This is the first release of the library, and there are certainly areas to improve on. We welcome code contributions and bug reports in our Github repository.

7 comments on “Plugable-BTAPS Python Library for Creating Custom Applications with the Plugable PS-BTAPS1”

    • Ivan Fossa Ferrari

      Thanks! We don’t currently have any plans to develop libraries in other languages, but it should be fairly easy to write one with all of the information we just released.
      It looks like node.js has a node-bluetooth-serial-port library that would help in this regard.


  1. Rimba Han

    I would like to do the following with the switch.
    I would like to setup 2 x Home Automation Switch, one is primary and the second is the secondary. I would like to have an appliance ( Blower for my indoor shrimp farm ) connected to the Home Automation Switch. So there are 2 blowers, one is the primary and other the secondary. I would like know if I can write a script that if the primary switch is not getting any power readings, the secondary will turn on automatically. The reason is that I cannot have the blower die and the other blower did not kick in at all. I would like to make sure to make sure that there is always aeration in my system. Thank you and I look forward to hearing back from you.

  2. Rimba Han

    Would the API read the power usage, and is it being saved in the text file format??

    • Sam Morgan

      Hey Rimba,

      Thanks for the question! The switch has no way to sense power, it only performs on/off functions.

  3. Geoff Witt

    Is there any way to increase the range/sensitivity for the NFControl setting?

    • Sam Morgan

      Great question! This would need to be done from the host device in your code. Just set your proximity code to trigger when Bluetooth signal strength reaches a certain level.

Comments are closed.