bitfocus / companion-module-stagetimerio-api

MIT License
2 stars 3 forks source link

Companion connection based on variables, output variables, and Feedback #5

Closed RayHAz closed 8 months ago

RayHAz commented 1 year ago

I have a Companion page dedicated to StageTimer. I'd like to be able to switch between rooms easily without having to manually enter Room ID and API Key. I can store these items locally and push them over to a Companion variable with their API. Is there a way to have the Companion connection work off of a variable? (I know that's a Companion question more than a question about the Stagetimer module - sorry.)

Or is there another easy way to change the connection settings I'm missing?

Would like for the Stagetimer variables to include Room Name and possibly Room ID (so I can confirm visually that I've got the right Room set up).

Would also be great to have Feedback settings on whether a timer is running or paused.

Sorry I'm not much help on programming (good skills, but old-school stuff), but I can help with testing and maybe some "light coding" or code review. image

kgfox1 commented 1 year ago

Hi Ray,

It's not elegant but until they add more API triggers here is my suggestion:

I have just started using Stagetimer and have not needed more than 4 timers in 1 room. So my companion page is pretty simple.

dnmeid commented 1 year ago

I'm not into the stagetimer module but as far as it concerns Companion, dynamic connection endpoints are completely possible. The fields in the configuration are intended for static data only, but if a module developer wants to have a dynamic connection, he can offer actions for changing the endpoint. This won't make sense for most of the modules and the problems you may get are usually bigger than the problems you solve, that is why it usually isn't offered.

lhermann commented 1 year ago

The new stagetimer.io API is now released: https://stagetimer.io/docs/api-v1/

Your request, @RayHAz, is now possible. API endpoint now return data and there's a public websocket endpoint to get real-time updates.

We'll try to get the Companion module updates ASAP.

Edit: Oh, and the URL doesn't contain the room ID any more, so it's easier to change existing setups between rooms via variable change.

RayHAz commented 1 year ago

Excellent! Thanks @lhermann. I'll check it out...

lhermann commented 8 months ago

FYI: You can add multiple connection of the same module. So you can connect two stagetimer integrations targeting different rooms to control multiple rooms from a single streamdeck device.

image