Page 1 of 1
Re: Lovense toys and CHs under Linux?
Posted: Mon Jan 15, 2024 9:31 pm
by monsieur_so
You can install Intiface Central on Linux, which work great with Buttplug.io. Saldy, I don't know any video player supporting Linux. As they are C# based, they certainly won't easily be ported. Wine seems
not to help.
There remains a web-based player,
https://funscript-player.vercel.app. However it does not support buttplug.io connection, relying instead to experimental WebBluetooth API. Testing it on one Linux machine (Chrome/Chromium), the device is recognized, but the app fails with an error (in the dev console). Maybe others had better luck. Check these
instructions to enable WebBluetooth.
Finally as a non-solution that kinda works: VirtualBox with a Windows VM. You better have a USB dongle for making it accessible to the VM. The issue then is: you may not have video acceleration, which rapidly sucks a lot of CPU... you may even have a laggy video.
Re: Lovense toys and CHs under Linux?
Posted: Mon Jan 15, 2024 10:36 pm
by diglet
If you can program, making something that loads the funscript, connects to buttplug.io, and syncs with VLC can't be that hard...
Re: Lovense toys and CHs under Linux?
Posted: Mon Jan 15, 2024 10:42 pm
by gynephilos
All the graphical tools seemed too overkill to me. I have created a Python script to convert estim files to intensity levels, which are fed via bluetooth to a device. I had to reverse engineer the device's bluetooth protocol, but it was surprisingly easy. I've been thinking about buying Lovense Edge 2 and creating a driver for it. So yes, it's all possible.
Re: Lovense toys and CHs under Linux?
Posted: Wed Jan 17, 2024 7:15 pm
by diglet
lustfulwh0re wrote: Wed Jan 17, 2024 6:29 pm
diglet wrote: Mon Jan 15, 2024 10:36 pm
If you can program, making something that loads the funscript, connects to buttplug.io, and syncs with VLC can't be that hard...
I can program with Python, but I have no idea how I'd sync with a running VLC video. Is VLC offering some API that constantly reports (over a socket?) what time the video is currently at?
Yes. Information here:
Instructions for enabling the VLC API:
https://www.youtube.com/watch?v=2wu1vQDazNY
Multifunplayer source code:
https://github.com/Yoooi0/MultiFunPlaye ... aSource.cs
Basically you have to query
http://127.0.0.1:8080/requests/status.xml repeatedly to retrieve the current media timestamp. Also try /requests/playlist.xml
Re: Lovense toys and CHs under Linux?
Posted: Wed Jan 17, 2024 8:27 pm
by monsieur_so
Oh, great! Seems indeed really doable.
For connecting to the devices with buttplug.io, there is a
Python library.
So the meaty part seems to get the instructions from the funscript for the current timestamp. All the rest is configuration (the video to read, buttplug device to use).
There is also an API (with a
Python lib) to control MPV.
I'll share my script if I ever give it a try.
Re: Lovense toys and CHs under Linux?
Posted: Thu Jan 18, 2024 10:21 pm
by monsieur_so
Ok, I got something kind of working with MPV and Buttplug.
Here the code:
https://pastes.io/gdmx6pyygu
You need a decent version of Python 3 and to install with pip mpv, buttplug and click libs.
You can then launch the script with a video to play:
Code: Select all
python player.py ch_descent_e1_v3.mp4
I'll make a GitHub repo with all that.
Testing with CH Descent, Andel funscript and a Lovense Gush, it sends the instruction to the vibrator. However I have a vastly different result than with ScriptPlayer: the latter seems to fade the actions (or is it my VM that lag?), which give a much more smooth and interesting result. Does someone knows about the theory of how should be interpreted and transitioned the position?
Beware: this is a POC version, it certainly does not work as is with linear devices.
Re: Lovense toys and CHs under Linux?
Posted: Mon Jan 22, 2024 7:14 pm
by gynephilos
lustfulwh0re wrote: Wed Jan 17, 2024 6:27 pm
I believe I can figure out a Python script, if you can share it please PM me.
What Python module did you use to speak over Bluetooth to your device?
And also, what HW? Did you use a USB dongle?
I found something called
bleak to control the device via Bluetooth. It's a nice library.
I had to reverse engineer the protocol but it was just one message where the number needed to be modified to control the vibration level.
It's a simple USB thing for Kegel exercises but the virbation is too weak and the pressure sensor badly placed to be useful for what I had in mind

Re: Lovense toys and CHs under Linux?
Posted: Thu May 02, 2024 1:07 am
by monsieur_so
Here a zip of my last try. I don't have time right now to create a GitHub account for it.
In this version I tried to replicate the "position to speed" algo of ScriptPlayer, but I failed. I tried to read the original code to understand how it works, but the timing logic is disseminated in many places. If someone is able to describe how the patterns are generated by ScriptPlayer, that would help.
Setting the vibration level directly to the level specified in the funscript is rather easy, however this is really less fun than the "position to speed" mode of ScriptPlayer. I enclosed also an earlier and more simpler version that does just that.
Good luck.
Re: Lovense toys and CHs under Linux?
Posted: Mon May 27, 2024 12:49 pm
by kohlrabidude
Would this potentially work for MacOS (since Intiface is supported)?
Does pausing the video also pause the funscript? Or are you strapped in for the ride?
Re: Lovense toys and CHs under Linux?
Posted: Tue May 28, 2024 8:43 am
by froog
give_a_nap wrote: Mon May 27, 2024 5:36 pm
kohlrabidude wrote: Mon May 27, 2024 12:49 pm
Would this potentially work for MacOS (since Intiface is supported)?
Does pausing the video also pause the funscript? Or are you strapped in for the ride?
Pausing the video also pauses the funscript. And all the features of MPV work the same as always - tuning volume, brightness, even my frame interpolating script setup works.
I have no experience with MacOS, but since Intiface is supposed to work fine there, it's worth a try. The only other dependency left is the Python mpv library - if that works under OS/X, I expect it all to work fine.
Speaking from experience - @kohlrabidude - I couldn't get it to work on a mac because of the mpv library: libmpv (I am on a Mac M1) - There is some complaint about architectures. I can't believe that 4 years on from Mac Silicon thing this is still an issue - I thought I had installed all the latest versions of everything.

Maybe "rosetta" means I have not. I'm sure it's possible to fix if you know what you are doing with this sort of thing, but I am not expert. If you make it work please tell me how.

Re: Lovense toys and CHs under Linux?
Posted: Fri Jun 07, 2024 1:45 pm
by Anzy
give_a_nap wrote: Mon May 27, 2024 5:36 pm
Deleted the post.
This tech turned me into an addict; frankly speaking, it's dangerous.
I don't want to be responsible for turning others into addicts too, so I am deleting all my relevant posts.
that's really sad but no one would hold you responsible for turning others into addicts
when i was doing research to do this on linux yours sounded like the best option
so any chance i can get a copy of the player?
Re: Lovense toys and CHs under Linux?
Posted: Fri Jun 07, 2024 2:08 pm
by paknuyetro
Are you playing with vibrating toys?
Re: Lovense toys and CHs under Linux?
Posted: Fri Jun 07, 2024 2:16 pm
by monsieur_so
Anzy wrote: Fri Jun 07, 2024 1:45 pm
give_a_nap wrote: Mon May 27, 2024 5:36 pm
Deleted the post.
This tech turned me into an addict; frankly speaking, it's dangerous.
I don't want to be responsible for turning others into addicts too, so I am deleting all my relevant posts.
that's really sad but no one would hold you responsible for turning others into addicts
when i was doing research to do this on linux yours sounded like the best option
so any chance i can get a copy of the player?
After give_a_nap first returns, I worked again on the player. I fix several bits, including give_a_nap patches. I think I got the vibration instructions right this time.
Also new are settings to change the min/max range for each device and each of their actuators. (I use that for reducing suction on the Max for eg).
Still need some packaging work so it is easier to use (without needing to use CLI) and testing on other platforms (sadly I don't have a Mac to do test directly, so not sure how I'll do). But it definitely work now for vibrating toys.
Here the zip of the project, still don't have time to create a proper GitHub account.
PS. @give_a_nap, I was glad you had fun (seems like more pleasure that I get myself from it) from this project. Not so much this make you addict. Maybe after the novelty goes away you will regain proper control?
PPS. If any of you try it and encounter a bug or issue, please try send me a bug report. I don't promise anything, but if I can I'll fix it.
Re: Lovense toys and CHs under Linux?
Posted: Fri Jun 07, 2024 2:26 pm
by monsieur_so
paknuyetro wrote: Fri Jun 07, 2024 2:08 pm
Are you playing with vibrating toys?
If you want to test it with the Handy or other linear actuators, the script must be modified to support them.
Looking rapidly at the library code, linear commands take a duration and the position of the axis.
https://github.com/Siege-Wizard/buttplu ... ple.py#L72
I'll need to look at a funscript for linear actuators to check how this can work. Do you have an example you'll want to try?
Sadly I don't have any linear actuators to properly field test it. They are a bit expensive for me, considering I'm really not sure I would use them long. (the setup seems a bit too heavy for my taste)