bitfocus / companion-module-stagetimerio-api

MIT License
2 stars 3 forks source link

Target offline app instead of cloud service #4

Closed mixmastrbrock closed 12 months ago

mixmastrbrock commented 1 year ago

With the beta launch of their offline server, is there a way to point the API calls to a local server instead of the cloud API?

painteau commented 1 year ago

I plus plus that ! It looks like its just a change of url only

For example, instead of using the URL https://api.stagetimer.io/v0/room/YOUR_ROOM_ID/start as you would with the web version, you will use https://127.0.0.1:3000/api/v0/room/YOUR_ROOM_ID/start, replacing 127.0.0.1 with the IP address and 3000 with the port number chosen when starting the offline version.

lhermann commented 1 year ago

Yes. The offline version comes with the same API, but the URL is now the IP address of you computer (or 127.0.0.1)

We're planing to update the Companion module in the coming month, including a way to point it at another URL / offline version.

shermanp commented 12 months ago

Seems like this is still an issue using companion V3.1.2 and IO v 2.9.3. I haven't use the app in a while and just getting back to trying to use it now.

Notice that I can not save a offline API URL with .../api/v0/ but can save it with .../api/v1/ but module reports Connection Failure.

The API url provided when set up is http://127.0.0.1:3000/api/v0/

lhermann commented 12 months ago

In the Stagetimer Offline Version v2.9.3 the API popup looks like this:

image

The defaults when adding a stagetimer connection in Companion v3.1.2 look like this:

image

The Companion v3+ module only works with the v1 API from Stagetimer. The v1 API offers a web socket connection which the companion module uses to show feedback states.