StashApp/Stash-Vr Enhancements - StashInteractiveTools

What I mean is for example to be able to set one or multiple certain patterns in the settings, for example 20% speed, 100% Stroke length and then be able to switch to that while watching with the click of a button or hotkey for a bit while the video continues playing, and then be able to change back to the handy reacting to the script attached to the video again. I hope this helps, it’s a little hard to convey :smiley:

Tried to visualize it

@Spunkle you should be good for a while, I setup the interface to always be the same for others to leverage finding multiple files. Lmk if you want to port any changes into the base because right now I think it will only pick up (name).funscript. I did have plans for users to setup their matching pattern but never gotten around to implementing it.

@zala77 This can work, one side effect you may experience is some delay in switching modes due to how the handy api works (have to switch it to different modes). I’ll have to play around to see how to cut that down so it isn’t so bad.

I’m thinking of mimicking how script modifications UI is and use that for you to create your manual presets. I’ll have to think on the UX of this but the tech side should be doable.

1 Like

Submitted a patch to add multiple heatmaps, better tagging/untagging, duplicate disabling (see below) and some limited flagging of scripts with the wrong length…

@xtc should be rolling it into a release soon. Feedback appreciated, and I’m sure there are more things I didn’t think of that would be easy to add…

The ‘duplicate’ detection is based on hashing the action array… so it works with funscripts with different metadata/etc (not just identical files)… but misses scripts that are different by even one stroke. Ideas on how to detect ‘almost’ identical scripts appreciated.

New version out, read more about the Improved Tagging support done by @Scruffynerf. If you happen to run into issues be sure to navigate to the “Install” task for the plugin and run it.

I get this error when I try to load a video that has an associated funscript. As far as I understand it, the plugin no longer requires a custom stash build, you just need to load the plugin, right?

TypeError: Cannot read properties of undefined (reading 'alwaysDefaultToStashSyncOffset')
    at nr (http://localhost:9999/plugin/StashInteractiveTools/javascript:11:41564)
    at ur
    at dl
    at div
    at Jr (http://localhost:9999/plugin/StashInteractiveTools/javascript:11:64040)
    at Ce (http://localhost:9999/plugin/StashInteractiveTools/javascript:5:13730)
    at Qr (http://localhost:9999/plugin/StashInteractiveTools/javascript:11:64366)
    at div
    at t (http://localhost:9999/assets/index-31134d58.js:44:3626)
    at http://localhost:9999/assets/index-31134d58.js:44:11914
    at http://localhost:9999/assets/index-31134d58.js:44:108046
    at Object.apply (http://localhost:9999/assets/index-31134d58.js:44:185368)
    at div
    at http://localhost:9999/assets/index-31134d58.js:44:107148
    at Ui2 (http://localhost:9999/assets/index-31134d58.js:44:106514)
    at div
    at Object.apply (http://localhost:9999/assets/index-31134d58.js:44:185368)
    at div
    at Wn (http://localhost:9999/assets/Scene-35b0dbcf.js:1:14649)
    at t (http://localhost:9999/assets/index-31134d58.js:40:9217)
    at t (http://localhost:9999/assets/index-31134d58.js:40:11169)
    at v (http://localhost:9999/assets/Scenes-7977711b.js:1:4805)
    at t (http://localhost:9999/assets/index-31134d58.js:40:9217)
    at t (http://localhost:9999/assets/index-31134d58.js:40:11169)
    at Suspense
    at MY (http://localhost:9999/assets/index-31134d58.js:44:448755)
    at div
    at jy2 (http://localhost:9999/assets/index-31134d58.js:54:54945)
    at qg2 (http://localhost:9999/assets/index-31134d58.js:49:4033)
    at C52 (http://localhost:9999/assets/index-31134d58.js:44:188965)
    at Suspense
    at M52 (http://localhost:9999/assets/index-31134d58.js:44:186955)
    at Ug2 (http://localhost:9999/assets/index-31134d58.js:49:3813)
    at Object.apply (http://localhost:9999/assets/index-31134d58.js:44:185368)
    at TD2 (http://localhost:9999/assets/index-31134d58.js:64:32672)
    at t (http://localhost:9999/assets/index-31134d58.js:40:75570)
    at MY (http://localhost:9999/assets/index-31134d58.js:44:448755)
    at c$2 (http://localhost:9999/assets/index-31134d58.js:202:17903)
    at XZ (http://localhost:9999/assets/index-31134d58.js:19:183841)
    at t (http://localhost:9999/assets/index-31134d58.js:40:5733)
    at t (http://localhost:9999/assets/index-31134d58.js:40:12243)

Yeah you can use the latest version of stash. Are you using the lastest version of the plugin as well?

I’m currently running “1.1.0-next.3”, but that is because I saw someone else here mention it so I tested that version as well. Both of the latest versions produce the same error.

For a minute, I thought it was working but in fact, it just doesn’t throw an error like that if the handy is not online. It just outputs an overlay in the corner of the video saying “Error connecting to Handy: Handy not connected”. Is this plugin compatible with Firmware V4? My handy shipped with V4 (I know you can downgrade) and I rely on some of its features so I hope that’s not it.

I haven’t tested with v4 but at one point I had reports that v4 firmware was working. Is this Handy 2 or the OG Handy?

As for the error, could you open up your dev tools (while in stash) in chrome/firefox (posting chrome here) and navigate to the “Applications”. You should see IndexedDB section for storage.

You can try deleting the “StashInteractiveTools” entry and refreshing the page and see if that solves the error being thrown.

It’s the original Handy, I didn’t know about the 2 until it was too late to preorder.

I do not see the entry that is supposed to be there. I have been using Firefox but I did try it in Microsoft Edge (should be the same as Chrome), and got the same result although since I went straight to the video link, it did start loading and even said “connecting” when it threw the same error.

Here’s a screenshot showing the issue with Edge.

I tried changing the “Always default to using the Stash configured server offset first” to on, and it no longer throws that error and the entry you mentioned now appears but it still won’t connect to the handy.

Entry in IndexedDB:

0	"StashInteractiveTools"	
{syncOffset: 0, useSavedOffset: false, alwaysDefaultToStashSyncOffset: true, ready: true, stashSyncOffset: 0, …}
alwaysDefaultToStashSyncOffset
: 
true
ready
: 
true
slideInfo
: 
{min: 0, max: 100}
stashSyncOffset
: 
0
syncOffset
: 
0
useSavedOffset
: 
false

Update: even after changing the server offset toggle back to its original position, that error no longer shows so it seems you have to run it with that toggle on before it will save those settings? I’m still messing with it to see if I can get it to connect. It still says “Error connecting to Handy”.

UPDATE: Nevermind! The secondary error was due to it being an IVDB script. RIP. I guess I have to find all the IVDB urls since it doesn’t recognize the IVDB files?

It worked for a few seconds of one video and now it is broken again but this time it says nothing about not connecting, it just stops shows the heatmap for a split second then disappears and does not work. I’m going to try just deleting stash entirely and starting over.

Switching to the latest development release of stash with a fresh config (although for some reason I had to try twice) seems to have made everything work for now…

So this may be due to some.v4 issues that handy just posted on their discord. Attaching image here..

been away from this thread for a while but glad to see you’re working on multi-axis support. Any chance we can also support Khrull’s wireless firmware for SR6/OSR2?

@okurinsan realized I didn’t respond to all of your findings/questions

  • yes ivdb support currently works with urls only. I’m not sure I have a clear way of detection if it’s a token or real funscript but I’ll try to see if there is a way to detect ( I think @Scruffynerf did some work for this in the feature he submitted)
  • as for the error itself, I should have asked what version of stash you had running. It should work with the current public release, but that toggle error you caught is indeed a bug. I’ll look more into it to see how to solve it for other users

It’s true that the plugin doesn’t have a graceful way of handling instances when handy isn’t connected (sliders bars not working). Crazy that you had to switch to the dev version to get it working. Seems there are still some corner cases from a fresh setup. Anyways glad you got it working and sorry for the headaches you had to go thru

Token recog is mostly a starting values examination… potentially there is a universal method, but I havent quite figured it out. An initial Pos 66 is one part of it, for sure…

I actually just posted the first beta version for testing. Stash-TCode

It currently only supports the wireless firmware. I use Firefox, which doesn’t allow serial access, so that was my first goal. I plan to add serial support in a future release, though.

Thank you, king! This is awesome, I’ll check it out!

Seems something is off with my plugin install

It says i have version 1.0.0 which i installed via the “Add Plugin Source” https://raw.githubusercontent.com/xtc1337/StashInteractiveTools/refs/heads/next/stash.yml

But the settings section says (0.2) and is missing a ton of the settings shown on the github

Also i’m not sure how to get the heatmaps to generate

For the first part, I am using:
https://raw.githubusercontent.com/xtc1337/StashInteractiveTools/refs/heads/next/stash-next.yml
to get version 1.1.0-next.3

For heatmaps, enable heatmap generation in the generate task:

1 Like