StashApp/Stash-Vr Enhancements - StashInteractiveTools

Hi @xtc and @Scruffynerf
Wondering if you’re interested in helping me merge this:

I took the work @Spunkle did with the browser script and forked StashInteractiveTools, then had Gemini 2.5 Pro take a look at the repository and the browser script and figure out how to combine them. It took a bit of back-and-forth but I got it in a working state today. I’m not a webdev and i’ve only toyed with React very briefly back in 2017, but i am a software engineer so I was able to work through the issues with Gemini’s help.

The patch adds a plugin setting for the address of the TCodeESP32 device running Khrull’s firmware

When you load a scene with funscripts it tries to connect to the TcodeESP32 device at the address you entered and then finds all of them for L0, L1, L2, R0, R1, R2 and then sets them to enabled

It’s working as expected and I was able to use it to wireless control my SR6 while browsing my local stash server on my Apple Vision Pro (Immersive VR is not working in stash natively so i just watched 2D videos, hence my request to XTC to look into adding support for videojs-xr to get webXR working on stash natively).

But I was able to successfully browse different single and multi-script videos, it connects each time and sync properly with the video, though sometimes i find it can be very jumpy. Right now i think it’s just finding the TCode commands on a 10millisecond loop, not sure if there is a smarter way to do this but the TCodeESP32 firmware only accepts the raw tcode commands, you can’t send it the files and and a sync time (maybe that would be a cool extension to the device firmware).

Anyway, huge thank you to @Spunkle for working out the way to send the commands, i couldn’t havre done it without his work as a springboard.

This patch has a ton of clean up work needed but since i’m not really a web dev it’s probably better if one of you take over from here if you’re willing to help.

In particular Gemini totally ripped up src/hooks/useInteractiveTools.tsx to make this work. I spent a lot of time going back and forth with it on this file to make it function properly, it really had no idea how to access the funscripts that stash-interactive-tools provides. Eventually I was able to eek it out but it probably is not the best implementation. Also I have no clue whether this has fucked up the Handy integration or IVDB stuff. I don’t have a Handy to test with and I honestly wasnt sure what the IVDB specific stuff was doing, all my funscripts are locally stored on my NAS that runs stash.

Right now i think the client device is sending the TCode commands every 10ms, but i was wondering if there is a way to actually plug in to the server-side code so the server is sending the commands. My reasoning is that it’s likely that the server has a much more stable and faster connection so you can cut one half of the equation (Sending the commands) out of the equation, then it becomes an issue of the ESP32 device receiving them wirelessly

1 Like