Use doki to control interactive BLE devices from the terminal.
doki scan - Scan for BLE devices (auto-starts daemon)doki connect DK-META2 - Connect to device (auto-starts daemon)doki start - Start background daemondoki stop - Stop background daemondoki status - Check daemon and connection statusdoki scan - Scan for BLE devicesdoki connect [name] - Connect to device (default: DK-META2)doki disconnect - Disconnect from devicedoki player play [audio] <timeline.json> - Play timeline with optional audio syncdoki player pause - Pause playback (stops device)doki player resume - Resume playbackdoki action linear 50 - Set linear to 50%doki action rotary -30 - Set rotary to -30 (reverse)doki action vibration 80 - Set vibration to 80%doki action pause - Immediately stop all device actionsTimeline files are JSON files defining device actions at specific timestamps:
json
{
"duration": 180.5,
"actions": [
{"timestamp": 0.0, "type": "VIBRATION", "value": 50},
{"timestamp": 5.5, "type": "LINEAR", "value": 30},
{"timestamp": 10.0, "type": "ROTARY", "value": -50}
]
}
TypeValue RangeDescriptionLINEAR0-100Linear/stroke motion intensityROTARY-100 to 100Rotation speed (negative=reverse)VIBRATION0-100Vibration intensity
ffplay (Linux/Windows) or afplay (macOS)/tmp/dokidoki.log