companion icon indicating copy to clipboard operation
companion copied to clipboard

Ember+ Consumer for Companion control

Open phillipivan opened this issue 2 years ago • 5 comments

Is this a feature relevant to companion itself, and not a module?

  • [X] I believe this to be a feature for companion, not a module

Is there an existing issue for this?

  • [X] I have searched the existing issues

Describe the feature

Companion includes a ember+ provider for remote control from other devices, and the generic ember+ consumer for controlling devices. However sometimes I am stuck with having ember+ providers at both sides and nothing in between them.

What I would like is a companion (not module) side ember+ consumer, that can connect to a provider, and and map boolean elements to button presses. If other functions could be read into custom variables that would be very useful also.

Usecases

I have an audio console which includes an ember+ provider. Some of the user button states are available directly as Boolean elements in the ember+. I would like to use them to trigger buttons or complex events inside companion for control of other devices. However companion is also a provider, so I have two systems that talk the same protocol but require an intermediary for any control to work.

phillipivan avatar Nov 15 '23 02:11 phillipivan

I feel that implementing this in Companion is going to be a sizeable undertaking, solely because of building the UI to map nodes in the ember tree to do things in companion, and I wonder if this would be better served by some separate translation program instead.

Or in fact this would be easier to do with some additions to the generic-emberplus module? It would be fairly simple to add a feedback to that module which subscribed to and reports the boolean value of a node. It would then be possible to use this in a trigger to make things happen. For other values (string/number), that requires some more thought on how to define what to do, but these could be exposed as variables by the module.

Julusian avatar Nov 15 '23 12:11 Julusian

I have looked for a translation program. The only ones I can find, are big/complex/expensive broadcast control systems. No doubt someone could build an application like this with one of the available ember+ libraries around.

With that said, things are cleaner and simpler if there is no requirement for an intermediary.

Regarding the UI: you may well be correct. However I would note that given anyone who spends much time working with ember+ is likely to be (or ought to be) familiar with ember+ viewer, there isn't much need to recreate the visualization and browsing of the tree structure. Rather, a direct mapping of node paths would be completely adequate, which would keep the UI changes simpler, at least in relative terms.

Certainly if the existing generic-emberplus module was capable of delivering feedbacks based on subscriptions to boolean nodes, that would also be a good solution. I placed the request here rather than in the module repo as my intent is very specifically as a path to control companion.

phillipivan avatar Nov 15 '23 22:11 phillipivan

+1 This function would be very nice to have!
@phillipivan A possible software to use as a workaround between an ember+ provider and Companion can be BTConnect from broadcastthings.com There you can use BTConnect as a ember+ consumer and convert values / states to MQTT or Webhooks to be used in Companion. But it is not free software and I agree it would be better to have this integrated in Companion.

Svein-sch avatar Mar 15 '24 11:03 Svein-sch

Hey thanks for the link to BTconnect. I hadn't seen that before.

Have you used it before?

phillipivan avatar Mar 20 '24 10:03 phillipivan

Yes, I have used it before to connect and do protocol conversions together with Companion. It's been working very vell for me. Node-Red could maybe also be an option. It´s both ember-module, webhooks and mqtt there, but I unfortunately don't get the ember-module to work there.

Svein-sch avatar Mar 21 '24 09:03 Svein-sch