Closed tcconway closed 8 months ago
Hi @tcconway, this is a good suggestion.
Having good capabilities in integration is important for the app roadmap Few questions from my side
/change/:timerid/duration/:durationvalue
?And a semi-related question: should we, as part of v2, remove the input field for end time in the rundown editor (keep it in the bottom sheet)
I'd imagine this would be exactly as you mentioned. This is preferable over the HTTP API as apps like QLab and Millumin seem to prefer osc over an http call. Side note: I'm a fan of /app/action/id/value
format, but that's a bigger discussion LOL.
As for deciding if it should modify, I imagine if it ever receives an OSC message, it would make the change...obviously a security risk, but you're running this on a private LAN, right
I would definitely keep the end time in the rundown editor. I find that I type in there all the time...It's a great confirmation for the operator... and you have plenty of room in the GUI there anyway!
Hey! You can assign this to me and I can tackle this
Nice! Obrigado
HI @arymoraes , could we help you get started here?
HI @arymoraes , could we help you get started here?
Hey, sorry about taking long, last couple of weeks have been very busy with work + some other bureocracy I have to do. So the thing is I'm not extremely familiar with OSC API. I did go through the code and I do have a good idea on what and how to do this task, but I just don't know how to test it (test it locally, not unit/integration/e2e testing)
I do get this on my console when I run the dev mode
OSC integration client connected to 127.0.0.1:9999
but theres nothing at localhost:9999, is there a UI client for the OSC integration or is it all just on server on 8888
?
No problem, I understand OSC is very industry-specific and tricky for someone to jump in.
I normally use OSC Tester to send messages and Protokol to inspect the output of ontime. There are better solutions, but these are free and lightweight
The exact input / output configuration are in the integration options. Puzzle icon in the left menu bar https://ontime.gitbook.io/v2/main-concepts/interface-1/integration-settings
I would suggest that you publish your code and I can help with the testing. I can also help you find a task that involve less business knowledge?
No problem, I understand OSC is very industry-specific and tricky for someone to jump in.
I normally use OSC Tester to send messages and Protokol to inspect the output of ontime. There are better solutions, but these are free and lightweight
The exact input / output configuration are in the integration options. Puzzle icon in the left menu bar https://ontime.gitbook.io/v2/main-concepts/interface-1/integration-settings
I would suggest that you publish your code and I can help with the testing. I can also help you find a task that involve less business knowledge?
Thanks! That was very helpful. I probably have enough information that I can properly tackle the issue.
I think this task is good because I also want to be pushed out of my comfort zone. I'll try, and if I feel I'm hitting a wall I'll let you know and I can switch to another task, but I'll give this one a go
So update on this:
I was able to change the event duration using the DataProvider
we have, but I have an issue:
using DataProvider
to update the event updates my database at this path 'C:\\Users\\Ary\\AppData\\Roaming\\Ontime\\db\\db.json'
, while the data my localhost:4001
gets is from rootDir/ontime-db/db.json
. Can you explain me the difference between my local windows AppData db and the rootDir/ontime-db?
Absolutely.
When ontime starts, it creates a few files and directories in the user public folders, this is important and allows the users to keep their data between the installs. These folders are installation and OS specific You can follow that process in setup.ts
For test running, the folder used is the one collocated with the app. This aims to make it easier for us to create test scenarios.
As for your code, DataProvider
is absolutely the final destination for the change, however you might find it easier to use the rundownService
which wraps interactions to the rundown. It would also handle side effects for you
See editEvent()
Hope this helps
Absolutely.
When ontime starts, it creates a few files and directories in the user public folders, this is important and allows the users to keep their data between the installs. These folders are installation and OS specific You can follow that process in setup.ts
For test running, the folder used is the one collocated with the app. This aims to make it easier for us to create test scenarios.
As for your code,
DataProvider
is absolutely the final destination for the change, however you might find it easier to use therundownService
which wraps interactions to the rundown. It would also handle side effects for you See editEvent()Hope this helps
It does, thanks a lot for the info.
That makes a lot of sense. I am now using editEvent
to edit the event, which works, I only have a couple of things to figure out (and then write tests for it), can probably have it done this week.
Hey @arymoraes, I thought I would follow up here. Do you happen to have any news on your progress? Can I lend you some help with the task?
Hi sorry for the lack of updates, I've been out of town for the past 2 weeks.
So I was able to make it edit the events, but I couldnt find a way to edit the correct data, it still updates the one on the public folder, not the one in memory.
I did push my code on a feature branch if you want to take a look at what I have done.
https://github.com/arymoraes/ontime/tree/feat/set_duration_for_specific_event
No worries. I will take a look into your branch (the link seems broken, I will try and find it)
Hi @arymoraes , I completely forgot to try the link again. Apologies that it took so long, I have made a PR from your code and we can look into it
Hey @cpvalente no worries, things have been a bit busy on my end too. I'll set a reminder for my calendar to take a look at this during the weekend if that's ok.
sounds good to me @arymoraes It seems that the PR is pretty close to merging, I expect that there wouldn't be too many changes needed
Done with #553
Possible for OSC to update/change the duration of a specific eventID?
I'm exploring having other apps control Ontime. For example QLab sending commands via OSC that set a specific timer duration...then running the event.
Might be a good approach for #318 and #283.