A Gleam client library for controlling buttplug.io supported devices.
Further documentation can be found at https://hexdocs.pm/bummer.
gleam add bummer@1
import bummer
case bummer.connect("ws://127.0.0.1:12345/") {
Ok(socket) -> {
io.println("Connected to intiface-engine websocket")
io.println("Initiating a test sequence")
bummer.scan(socket, 5000)
bummer.vibrate(socket, 500)
bummer.rotate(socket, 500)
io.println("Test sequence finished")
}
Error(_) ->
"Cannot connect to intiface-engine websocket. Is it running?"
|> io.println_error
A toy communicates with your computer via Bluetooth LE. Some manufacturers require pairing before use, some don't. You don't use the system Bluetooth manager to connect to the device.
Clients like buttplug-py, buttplug-js, or this Gleam client, don't control the toy directly. They only communicate with a server like intiface-engine via websockets. The server then does the heavy lifting.
You can run the server like this:
cargo install intiface-engine
~/.cargo/bin/intiface-engine --websocket-port 12345 --use-bluetooth-le
Only then you can use your client.
This package is supposed to be used only as a library for your client tools but comes with a short executable to test your setup more easily.
gleam run
Run it twice to be sure.
- API spec - Describes the architecture, messages schema, etc
- A Python client - Logs sent and received messages, can be used for inspiration
- Clients for other languages - And many other projects
- List of supported devices - A comprehensive list of all supported manufacturers and devices with links where to buy them
- Make sure you have a supported Bluetooth dongle
- Make sure the toy isn't paired to another device
- Try disabling unsupported Bluetooth adapters
- Try
sudo rfkill unblock bluetooth
andsudo systemctl restart bluetooth.service