Lovense toys and CHs under Linux?

Discussion about Cock Hero and other sexy videos.

Moderator: andyp

Post Reply
monsieur_so
Explorer
Explorer
Posts: 7
Joined: Thu Jun 06, 2019 12:50 am

Re: Lovense toys and CHs under Linux?

Post 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.
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Lovense toys and CHs under Linux?

Post 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...
User avatar
gynephilos
Explorer At Heart
Explorer At Heart
Posts: 152
Joined: Tue Jul 25, 2017 5:33 am

Re: Lovense toys and CHs under Linux?

Post 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.
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
diglet
Explorer At Heart
Explorer At Heart
Posts: 203
Joined: Sun Dec 11, 2022 5:43 pm

Re: Lovense toys and CHs under Linux?

Post 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
monsieur_so
Explorer
Explorer
Posts: 7
Joined: Thu Jun 06, 2019 12:50 am

Re: Lovense toys and CHs under Linux?

Post 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.
monsieur_so
Explorer
Explorer
Posts: 7
Joined: Thu Jun 06, 2019 12:50 am

Re: Lovense toys and CHs under Linux?

Post 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.

Code: Select all

pip install mpv buttplug-py click
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.
User avatar
gynephilos
Explorer At Heart
Explorer At Heart
Posts: 152
Joined: Tue Jul 25, 2017 5:33 am

Re: Lovense toys and CHs under Linux?

Post 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 :lol:
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
User avatar
give_a_nap
Explorer
Explorer
Posts: 24
Joined: Thu Apr 18, 2024 6:47 pm

Re: Lovense toys and CHs under Linux?

Post by give_a_nap »

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.

Code: Select all

pip install mpv buttplug-py click
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.
The pastes.io link has expired.
Can you share this again? Or maybe put it up on GitHub?
monsieur_so
Explorer
Explorer
Posts: 7
Joined: Thu Jun 06, 2019 12:50 am

Re: Lovense toys and CHs under Linux?

Post 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.
Attachments
pympv-funscript-player-3221482267808a112a9ec09fa25090f8e4d8575c.zip
(7.73 KiB) Downloaded 17 times
pympv-funscript-player-master.zip
(9.39 KiB) Downloaded 13 times
User avatar
give_a_nap
Explorer
Explorer
Posts: 24
Joined: Thu Apr 18, 2024 6:47 pm

Re: Lovense toys and CHs under Linux?

Post by give_a_nap »

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:

Code: Select all

python3 -m virtualenv bliss 
. bliss/bin/activate 
python3 -m pip install buttplug-py click mpv websockets
- That's it. Launch monsieur_so's Python code from the activated virtualenv and prepare for your mind to melt...

Code: Select all

python3 ./main.py ~/heaven/Descent.1.mp4
- Do make sure that "~/heaven/Descent.1.funscript" is sitting there, right next to the video.
User avatar
give_a_nap
Explorer
Explorer
Posts: 24
Joined: Thu Apr 18, 2024 6:47 pm

Re: Lovense toys and CHs under Linux?

Post by give_a_nap »

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:

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)
I changed that to:

Code: Select all

    devices = buttplug_client.devices.items()
    ...
    while True:
        ...
        for k, v in devices:
            for a in v.actuators:
                await a.command(instruction)
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.
main.zip
Version of the script with patch for many devices/actuators
(3.99 KiB) Downloaded 16 times
Post Reply

Who is online

Users browsing this forum: apmede, bhk100, Ereinon, Google [Bot], Jasper333, Orgentuno, Speedofsound123 and 63 guests