Lovense toys and CHs under Linux?
Moderator: andyp
-
- Explorer
- Posts: 7
- Joined: Thu Jun 06, 2019 12:50 am
Re: Lovense toys and CHs under Linux?
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.
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?
If you can program, making something that loads the funscript, connects to buttplug.io, and syncs with VLC can't be that hard...
- gynephilos
- Explorer At Heart
- Posts: 152
- Joined: Tue Jul 25, 2017 5:33 am
Re: Lovense toys and CHs under Linux?
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.
My videos: Cock Hero: Female Pleasure (forum/viewtopic.php?f=25&t=20080) · Cock Hero: Female Pleasure Vol 2 (forum/viewtopic.php?f=25&t=20482) · Cock Hero: Female Pleasure Vol 3 · Cock Hero: Female Pleasure Vol 4 · Cock Hero: Female Pleasure Vol 5 · Cock Hero: Feel the Vibe · Cock Hero: Female Pleasure Vol 6
Re: Lovense toys and CHs under Linux?
Yes. Information here:lustfulwh0re wrote: ↑Wed Jan 17, 2024 6:29 pmI 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?
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
-
- Explorer
- Posts: 7
- Joined: Thu Jun 06, 2019 12:50 am
Re: Lovense toys and CHs under Linux?
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.
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.
-
- Explorer
- Posts: 7
- Joined: Thu Jun 06, 2019 12:50 am
Re: Lovense toys and CHs under Linux?
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:
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.
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.
Code: Select all
pip install mpv buttplug-py click
Code: Select all
python player.py ch_descent_e1_v3.mp4
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.
- gynephilos
- Explorer At Heart
- Posts: 152
- Joined: Tue Jul 25, 2017 5:33 am
Re: Lovense toys and CHs under Linux?
I found something called bleak to control the device via Bluetooth. It's a nice library.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 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
My videos: Cock Hero: Female Pleasure (forum/viewtopic.php?f=25&t=20080) · Cock Hero: Female Pleasure Vol 2 (forum/viewtopic.php?f=25&t=20482) · Cock Hero: Female Pleasure Vol 3 · Cock Hero: Female Pleasure Vol 4 · Cock Hero: Female Pleasure Vol 5 · Cock Hero: Feel the Vibe · Cock Hero: Female Pleasure Vol 6
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
The pastes.io link has expired.monsieur_so wrote: ↑Thu Jan 18, 2024 10:21 pm 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
pip install mpv buttplug-py click
I'll make a GitHub repo with all that.Code: Select all
python player.py ch_descent_e1_v3.mp4
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.
Can you share this again? Or maybe put it up on GitHub?
-
- Explorer
- Posts: 7
- Joined: Thu Jun 06, 2019 12:50 am
Re: Lovense toys and CHs under Linux?
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.
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.
- Attachments
-
- pympv-funscript-player-3221482267808a112a9ec09fa25090f8e4d8575c.zip
- (7.73 KiB) Downloaded 22 times
-
- pympv-funscript-player-master.zip
- (9.39 KiB) Downloaded 19 times
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
Oh... my... fucking... god.
I just used your Python script to play fragrantEmulsion's first Descent with my Gush... and I had a hands-free orgasm at "bad things..." (around 37 min in). But describing it as a "hands-free" orgasm is an understatement.
I think this was my first-ever, whole-body orgasm. Mind blown.
In the lead up to the explosive orgasm... I started uncontrollably taking deep breaths, convulsing, shaking... I thought I was going insane. And I guess I did? I kept shaking for minutes.
It was unbelievable. I think I'm officially addicted.
Thank you for writing and sharing your Python code; I will... STRESS-TEST the hell out of it.
P.S. In case any other Linux-using Milovanians saw the Intiface/buttplug available video players line-up and went "me=sad; no player for Linux"...be sad no more! Monsieur_so's Python code works like a charm!
In summary, my setup:
- Dirt-cheap Chinese laptop (300$).
- No USB dongle needed. The built-in Bluetooth adapter worked fine.
- Make sure the bluetooth.service is running
- Install intiface central
- "cd /usr/lib/intiface_central ; ./run_intiface_central"
- Then in the GUI, start the engine, click on "Devices" and "start scanning".
- monsieur_so's Python code needs a one-time only setup. I prefer doing separate Python envs so I did it like this:
- That's it. Launch monsieur_so's Python code from the activated virtualenv and prepare for your mind to melt...
- Do make sure that "~/heaven/Descent.1.funscript" is sitting there, right next to the video.
I just used your Python script to play fragrantEmulsion's first Descent with my Gush... and I had a hands-free orgasm at "bad things..." (around 37 min in). But describing it as a "hands-free" orgasm is an understatement.
I think this was my first-ever, whole-body orgasm. Mind blown.
In the lead up to the explosive orgasm... I started uncontrollably taking deep breaths, convulsing, shaking... I thought I was going insane. And I guess I did? I kept shaking for minutes.
It was unbelievable. I think I'm officially addicted.
Thank you for writing and sharing your Python code; I will... STRESS-TEST the hell out of it.
P.S. In case any other Linux-using Milovanians saw the Intiface/buttplug available video players line-up and went "me=sad; no player for Linux"...be sad no more! Monsieur_so's Python code works like a charm!
In summary, my setup:
- Dirt-cheap Chinese laptop (300$).
- No USB dongle needed. The built-in Bluetooth adapter worked fine.
- Make sure the bluetooth.service is running
- Install intiface central
- "cd /usr/lib/intiface_central ; ./run_intiface_central"
- Then in the GUI, start the engine, click on "Devices" and "start scanning".
- monsieur_so's Python code needs a one-time only setup. I prefer doing separate Python envs so I did it like this:
Code: Select all
python3 -m virtualenv bliss
. bliss/bin/activate
python3 -m pip install buttplug-py click mpv websockets
Code: Select all
python3 ./main.py ~/heaven/Descent.1.mp4
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
After a crazy gooning weekend marathon with my two toys (Lovense Edge 2 and Lovense Gush), here's two things worthy of mentioning:
1. Support for more than one toy in the script
The original code was doing this:
I changed that to:
This sends the command to both my devices; and in the case of the Edge 2, to both actuators.
2. Connection loss at the beginning
For some reason that I can't see right now, when I begin the playback, I have to seek (using the normal mpv's seeking - e.g. cursor keys) to the place in the videos where the beats start. If I e.g. start playing Canto 2, after 10-20 seconds the toys stop vibrating - since there are no beats at the beginning - but also, never resume. But if I seek to the beginning of the game - which I want to anyway - it all works fine, all the way to the end. My end
I've tested - is that the term? - over the last 36 hours with Pseudonym's Audition 1, RedLighter's Passion 1, Ragaraja's Canto 2, and fragrantEmulsion's Descent 1. Hands-free orgasms all 4 times. My body convulsing, shaking, shivering... Incredible sensations.
Thank you, monsieur_so! And thank you to the wonderful Milovana community for enriching our lives so much. Love you guys.
I attach the script with my patch.
1. Support for more than one toy in the script
The original code was doing this:
Code: Select all
device = (
buttplug_client.devices[0] if len(buttplug_client.devices) > 0 else None
)
...
while True:
...
if device:
await device.actuators[0].command(instruction)
Code: Select all
devices = buttplug_client.devices.items()
...
while True:
...
for k, v in devices:
for a in v.actuators:
await a.command(instruction)
2. Connection loss at the beginning
For some reason that I can't see right now, when I begin the playback, I have to seek (using the normal mpv's seeking - e.g. cursor keys) to the place in the videos where the beats start. If I e.g. start playing Canto 2, after 10-20 seconds the toys stop vibrating - since there are no beats at the beginning - but also, never resume. But if I seek to the beginning of the game - which I want to anyway - it all works fine, all the way to the end. My end
I've tested - is that the term? - over the last 36 hours with Pseudonym's Audition 1, RedLighter's Passion 1, Ragaraja's Canto 2, and fragrantEmulsion's Descent 1. Hands-free orgasms all 4 times. My body convulsing, shaking, shivering... Incredible sensations.
Thank you, monsieur_so! And thank you to the wonderful Milovana community for enriching our lives so much. Love you guys.
I attach the script with my patch.
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
The... exhaustive testing continues
I just finished a session with SoftDriver's Overdrive 3, at the end of which the urge to climax was... unbelievable. But I somehow made it through. and I continued with Blue Magic 1. I "lost" a bit before the end, but - another new experience for me - my body wanted more... There was no need for rest - the vibrations from the two toys kept me hard, so I continued with Blue Magic 2 - and lost again somewhere around the middle.
Two hands-free orgasms, in a session lasting around 2h. Insane. I could never do this sort of thing before - the combination of the toys and monsieur_so's Python code driving them via the funscripts is... well, a new world for me.
In the process, I actually did find a bug: after climaxing, I was seeking towards the end of the video - and the player crashed, because in the code...
...bisect_left will return an index past the end of the timestamps; so using "idx" to index into "actions_indexed" leads to a crash.
I fixed it with this patch:
Attached below, the current version of the script - containing both my patches.
I just finished a session with SoftDriver's Overdrive 3, at the end of which the urge to climax was... unbelievable. But I somehow made it through. and I continued with Blue Magic 1. I "lost" a bit before the end, but - another new experience for me - my body wanted more... There was no need for rest - the vibrations from the two toys kept me hard, so I continued with Blue Magic 2 - and lost again somewhere around the middle.
Two hands-free orgasms, in a session lasting around 2h. Insane. I could never do this sort of thing before - the combination of the toys and monsieur_so's Python code driving them via the funscripts is... well, a new world for me.
In the process, I actually did find a bug: after climaxing, I was seeking towards the end of the video - and the player crashed, because in the code...
Code: Select all
def find_after(t):
idx = bisect.bisect_left(timestamps, t)
if t < actions_indexed[idx]["at"]:
idx -= 1
I fixed it with this patch:
Code: Select all
def find_after(t):
idx = bisect.bisect_left(timestamps, t)
if idx == len(timestamps):
idx -= 1
if t < actions_indexed[idx]["at"]:
idx -= 1
- Attachments
-
- main.zip
- Patch to avoid crash when seeking past the last timestamp in the funscript
- (3.97 KiB) Downloaded 4 times
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
Final version of the script; two more bugs fixed:
- Upon launch, the script was taking the last "pos" level of the funscript and was using it all the way to the first actual instruction. That meant that in most CHs, the introductory part was spent vibrating Not necessarily bad, but I prefer building up anticipation the way the original creator meant it to happen; subtly, that is. I therefore store the first valid timestamp (right after parsing the funscript) in a global variable, and refuse to send any instruction other than "silence" until I get to that point in time.
- I also hacked around the "we seem to lose connection to Intiface if the intro is too big" issue. I basically used the 'timeout' parameter in the main loop's call to "queue.get"; and if there has been no instruction sent to the toy(s) in the last 5 seconds, I re-send the last one again. This keeps the connection alive, even in CHs with huge intro sections (Cantos, etc).
- Upon launch, the script was taking the last "pos" level of the funscript and was using it all the way to the first actual instruction. That meant that in most CHs, the introductory part was spent vibrating Not necessarily bad, but I prefer building up anticipation the way the original creator meant it to happen; subtly, that is. I therefore store the first valid timestamp (right after parsing the funscript) in a global variable, and refuse to send any instruction other than "silence" until I get to that point in time.
- I also hacked around the "we seem to lose connection to Intiface if the intro is too big" issue. I basically used the 'timeout' parameter in the main loop's call to "queue.get"; and if there has been no instruction sent to the toy(s) in the last 5 seconds, I re-send the last one again. This keeps the connection alive, even in CHs with huge intro sections (Cantos, etc).
- give_a_nap
- Explorer
- Posts: 32
- Joined: Thu Apr 18, 2024 6:47 pm
Re: Lovense toys and CHs under Linux?
I don't envision much maintenance henceforth, but I created a Git repo just in case.
https://github.com/linuxeez/monsieur_so ... ipt_player
https://github.com/linuxeez/monsieur_so ... ipt_player
Who is online
Users browsing this forum: Ahrefs [Bot], Andel, Bing [Bot], Dips, Speedofsound123 and 52 guests