Trevliga Spel forum
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Save last sendet data (and send it on boot)

3 posters

Go down

Save last sendet data (and send it on boot) Empty Save last sendet data (and send it on boot)

Post by lublak Mon Mar 18, 2024 11:10 pm

I have a issue.
If i change a value in the dial. It works all fine. But if i reboot my pc the value goes to 0.
It would be nice if the plugin saves the state and send it on boot (perhaps with a delay option).

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Mon Mar 18, 2024 11:28 pm

That sounds very dangerous to me.

And the plugin doesn't know if it is loaded due to a reboot or a profile/ page swap (or created/moved in the editor), so the logic to keep track of such a thing would be a nightmare.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Mon Mar 18, 2024 11:44 pm

Than just keep the last state for itself (without sending it). For me it's every time annoying.
I change a value. My plugin host saves the value (also after reboot). After restarting my computer the midi plugin just shows the initial data (0). If I than move the dial I need to adjust completely to the value that I want. If it saves the value, after rebooting, it should the same as the plugin host.

(Alternative solution would be to never shutdown the pc, but that's also bad xD)

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Tue Mar 19, 2024 11:08 am

Just saving and restoring it locally might be doable. I'll put it on the wish list.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

lublak likes this post

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Joerg Tue Mar 19, 2024 3:55 pm

Admin wrote:Just saving and restoring it locally might be doable. I'll put it on the wish list.
But only optional, please.  Cool

Joerg

Posts : 142
Join date : 2021-09-03

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Tue Mar 19, 2024 4:01 pm

Joerg wrote:But only optional, please.  Cool
Yes, of course.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

lublak likes this post

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Wed Mar 20, 2024 8:27 pm

Admin wrote:Just saving and restoring it locally might be doable. I'll put it on the wish list.

Thanks Smile

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Thu Mar 21, 2024 1:33 pm

You can try this version. Install the plugin, and when that is done, you must move the file "StreamDeckMidiUserSettings.xml" from the plugin folder to the "Documents/Trevliga Spel" folder (create the folder if you don't have it). The file must be moved, the copy in the plugin folder is a template only and is not accessed by the plugin.

This line in the "StreamDeckMidiUserSettings.xml" file controls the functionality of the new save feature:

<MidiState RestoreAtStart="true" SaveInterval="60" MaxAge="24" />

  • RestoreAtStart must be set to "true" to enable the feature.
  • SaveInterval is how often (in seconds) the midi state is saved to disk. The saved file may be large, and I see no reason to have real-time or close to real-time updates. The default value of once a minute seems reasonable but can be changed if needed. Disk saves are only performed if there has been any midi activity since the last save.
  • MaxAge is the maximum age (in hours) of MIDI events that will be restored at the start of the plugin. The default value of 24 means that only midi events created in the last 24 hours will be restored during the plugin start. The idea is that if the computer has been shut down for longer, the saved midi state is probably irrelevant.

Let me know what you think.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

lublak likes this post

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Thu Mar 21, 2024 7:08 pm

First of all, it has to be said: it works! And i love it!
Secondly, the version you gave me has a bug which no longer displays the state icon correctly. (but the correct signal is sent).

Now for my opinion:
SaveInterval is totally fine. I don't change it that often. And certainly not just before I shut down the computer. I think one minute is a good number.
I also took a look at the JSON file and it looks really nice.
Only the last status is really used here. That is really sufficient (so the file is not unnecessarily large). I will then probably set MaxAge to 672 hours (4 weeks). As it is also important to me that it restores the state after a longer period of time. But everyone can customise this individually.

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Thu Mar 21, 2024 8:34 pm

lublak wrote:
Secondly, the version you gave me has a bug which no longer displays the state icon correctly. (but the correct signal is sent).
That's worrying since it is based on the 3.9 release I have just sent to Elgato for publishing. Please give my more details on which dial, how itis configured and so on.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Thu Mar 21, 2024 8:45 pm

Admin wrote:
lublak wrote:
Secondly, the version you gave me has a bug which no longer displays the state icon correctly. (but the correct signal is sent).
That's worrying since it is based on the 3.9 release I have just sent to Elgato for publishing. Please give my more details on which dial, how itis configured and so on.

Because everything was to long for one post:

Here are the configs and the Protokol (Protokol shows the correct data)

https://imgur.com/a/F5hEyoi

Here is the plugin log:

https://pastebin.com/8tQNKKJg

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Thu Mar 21, 2024 9:18 pm

That was a pretty nasty bug; I can't imagine how I missed it! How fortunate that you spotted the problem and reported it.

It is corrected in this version.

Now, I must stop Elgato from publishing that version. Rolling Eyes
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Thu Mar 21, 2024 9:21 pm

Admin wrote:That was a pretty nasty bug; I can't imagine how I missed it! How fortunate that you spotted the problem and reported it.

It is corrected in this version.

Now, I must stop Elgato from publishing that version. Rolling Eyes

I can confirm: It is fixed Smile

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Sat Mar 23, 2024 9:40 am

Please check the beta 3.9 thread.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Sun Mar 24, 2024 2:13 pm

Admin wrote:Please check the beta 3.9 thread.

I tested it now, for me works all fine. Simetimes after reboot (the state gets restored) the gui don't change.
But the internal state. As an example. The Dial is on 50%.
After reboot it shows sometimes (not everytime) 0% but if i move the dial it humps back top 50% +- 1%.

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Sun Mar 24, 2024 2:21 pm

When you get this problem, are all dials/buttons affected or just a single one?
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by lublak Sun Mar 24, 2024 4:18 pm

Admin wrote:When you get this problem, are all dials/buttons affected or just a single one?
On all dials/buttons i think.

lublak

Posts : 15
Join date : 2024-01-16

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Admin Sun Mar 24, 2024 4:20 pm

I think it's a timing issue. I've published a new beta version, and I hope I have solved that.
Admin
Admin
Admin

Posts : 1235
Join date : 2020-03-26

https://trevligaspel.forumotion.eu

Back to top Go down

Save last sendet data (and send it on boot) Empty Re: Save last sendet data (and send it on boot)

Post by Sponsored content


Sponsored content


Back to top Go down

Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum