stashButtplug - Testers needed for Buttplug.io/Intiface Central plugin for StashApp

Hi. I just got my Kiiroo Keon and noticed that there was no easy way to connect it to StashApp. So I wrote a plugin that connects with Intiface Central to handle the bluetooth and have the plugin connect to Intiface’s websocket.
I figured it might be useful for other’s using hardware connected to Intiface and that I might have overlooked some things.

Plugin and instructions are here: GitHub - happykinkster/stashInteractive: Plugin for Stashapp to connect to Buttplug.io

It contains 2 plugins:

  • stashVR (a way to send the video feed directly to my Oculus Rift S, because I want stashapp to handle both video and funscript)
  • stashButtplug (connecting stashApp and Intiface Central)

Any feedback is welcome!

3 Likes

Hello there, this is an interesting plugin (a feature I would use myself as to bypass the need of third party servers to stream the funscripts)

Are there any dependencies needed for it? I run my Stash instace through Docker and installing python libraries is a major pain

I did a quick test and it seems to work! (No dependencies were required)

However, with the Handy the experience isn’t so good, I believe that it is jumping around, possibly due to discretization of strokes.

For example: if the toy should go from 100 (top position) to 0 (bottom position) in 1 second, then let’s assume a 5Hz update frequency:

  • After 0.2s the Handy will jump from 100% to 80% and stop there
  • After another 0,2s it will jump from 80% to 60%
  • So on, and so forth until the end of the stroke (0% at 1s)

This might be due to differences in the workings of theHandy and Keon, so I don’t know what the possibilities are.

Also, it seems that the funscript stream desyncs if the video is paused (i.e.: the video pauses and the funscript continues)

Thank you so much for testing! I don’t have a handy myself (yet) to try and fix this problem, but I did make a minor change to this plugin. If you let StashApp update it, perhaps it will fix the jumping. The desync is something I don’t experience myself. When I pause a video, the Keon will pause as well. Am I understanding correctly that the handy keeps on following the funscript even though the video is not?

Yeah, that was what happened to me, however it may be some weird stuff about Intiface and the Bluetooth adapter, as the Logs show a lot of “BLE Errors” (don’t remember exactly)

I’ll try it again later (probably tomorrow) and report, thanks for the prompt response!

Coming back after giving it another test. It seems I have some tinkering to do on my end, as I believe that most issues are due to something misconfigured or a faulty Bluetooth dongle (no idea if it works as intended as I don’t have other uses for Bluetooth)

When running stuff, I see these messages on pretty much every frame of the video, I don’t now what is happening but I believe that this is what is behind the “paused video doesn’t pause action” thing, I noticed that sometimes some random strokes happen out of nowhere (even with everything related to Stash closed)

So, back to setting up for me it is (I’ll try to test it with a different Buttplug client to see if the problem is on my BT adapter).

On a totally unrelated note: does the plugin only work for streams on the host machine?
Let’s say that I have a cellphone accessing stash in a(n Android) browser, should the host machine try to sync with toys using Intiface (running on the host machine)?

Would it work for Intiface running on another computer (that is also accessing Stash as a client)?

Could it work with the AndroidTV application for stash (perhaps by pairing from the host machine)?

P.S.: Sorry for these unrelated questions hehehe, they are not demands in any way (just genuine doubts), and I understand if we don’t want to open this can of worms (of multiple devices) hehehehe

Well the ideal update rate for bluetooth, i think is at 20hz. Anything faster and it will struggle.

The plugin is actually working client side. So wherever you start Stash (Desktop browser also on another pc, Android browser, or the app installed on your phone through the android browser) it should start the plugin as well. If you have intiface installed on your phone, listening on all interfaces, it should automatically connect with stash. As for Android TV, I don’t know. I guess as long as it is connected to stash via a browser and that it can make a connection to your Intiface instance.

So in short: no, the host machine is not connecting to intiface. Your browser is.

I see, many thanks for the clarification! I’ll tinker with it some more and see what happens

Edit: It seems to be working greatly! I also was able to reproduce the “stroking while paused” thing:
If I jump around it works normally, the same if I pause a video. However, when I pause and then jump to another section, then the handy starts stroking as if I jumped to that region while playing the video.

In this scenario, a quick play/pause is enough to have the device stop again, and then it resyncs once video resumes

Heya, thanks for putting this together. Been enjoying it with a vibration device.

I have noticed two issues with it in my experience though.
First is the runLoop dying in some of the scripts I run, this is due to advanceKeyframes returning false when currAt < (currAction.at + this._offset); at the bottom of the method.
I think you need to take a look at the while loop or that particular return.
You can see the issue consistently if you try this video and script: https://discuss.eroscripts.com/t/training-with-shimakaze/278293. Happens around 10 secs, in the transition between action index 23 and 24.
I’m guessing this is happening due to too many actions in a short amount of time, I tried using the speed limit setting and that didnt resolve the issue. Not sure what the correct logic for that it is. Locally I changed the return to !isAtEndOfActions and that gets past it.

The second issue is the script not getting updated when videos autoplay from one to the next, looks to just start the first videos’ script again.

thanks for the detailed bug report. I’ll download the funscript/video and test it in the coming week to see if I can fix it. Going from one video to the next was not on my radar at all, but something I can test easily as well.

The plugin can be updated from within Stash and should handle the next video and handle the loop better. (tested after 10 secs and the script should continue)

Can confirm on both accounts, Thanks!

I’d love this to work but unfortunately the settings menu doesn’t appear in Stash > Interface. The settings do show in Stash > Plugins but there is no ‘Connect’ button that the instructions note

ah, I forgot to update the docs. You should not need to connect with a ‘Connect’ button anymore, but it can now autoconnect if you start a video. If you press F12 in your browser, you should see it making a connection in the logs. I’ll update the docs soon!

1 Like

Thanks, I managed to figure that out and my Keon was syncing with Stash, however the stroke length seemed to be abnormally short - even after increasing the amplitude setting

Do you have the link to the file you are using? That way I can test it as well. I usually experience shorter lengths when the frequency and speed of the commands is too hight (either too fast for bluetooth or too fast for the Keon)

thanks for this project! I also have the same issues as described by other replies! Movements are stuttery and very short (basically vibration when the movement should be near complete up/down strokes). Turning up the gain seems to help a bit with the stroke length but not entirely and seems to not help (or actively make worse) the stuttering during fast scenes. Let me know if I can collect any data from my machine that would help!

1 Like

Very fast movement will probably always stutter as the bluetooth frequency might not be able to keep up with the input data. I’ll have to think of a workaround for that. It has something to do with how Intiface handles the commands. Any help is always welcome.

As for any data that might help: You wouldn’t happen to have the files you are using somewhere with timestamps when the stutter is happening, would you? If you do, I can try to recreate the problem with a realworld example and try to find a fix.

it was any kind of file including slow scripts, experienced that stutter as well - valuable project you’ve taken on though