hyperion-project / hyperion.ng

The successor to Hyperion aka Hyperion Next Generation
https://hyperion-project.org/
MIT License
3.04k stars 377 forks source link

Control all instances via hyperion-remote #595

Closed AnthraxLeprosyPi closed 5 years ago

AnthraxLeprosyPi commented 5 years ago

Hi everybody,

AMAZING effort from you guys!!! Tried the new database and instance pull request yesterday and it worked quite beautifully and with zero hazzle (goodby config editing).

One thing that I couldn't manage though was to control all my three instances (adalight, hue, nanoleaf) at once via the hyperion-remote command line tool.

I could only control the main instance. How do I address the other instances?

best regards Anthrax

brindosch commented 5 years ago

Hello, we are glad you like it! We currently think about a syncing function between instances. Additional a new option to select per instance which kind of commands it should listen or not.

A new option for hyperion-remote can be added to select a specific instance for the command. But if you want to send it to all instances anyway, the syncing feature would be simpler.

Greetings brindosch

AnthraxLeprosyPi commented 5 years ago

Hi brindosch,

I knew you were on it ;-) I'm curious - how are the instances communicating since the big PR?

Ciao Anthrax

brindosch commented 5 years ago

I kept the initial design of the api to control just one instance at a time. That means you connect and the first instance is used by default. If you want to control another one you need to request a switch. Here you get further informations instance-docs

We probably need to add an optional instance appendix (like the tan field) to the commands to provide also one-shot solutions. This is especially interesting for connections that close immediately (http is partly a candidate). But also useful for hyperion-remote. Ping @Paulchen-Panther

AnthraxLeprosyPi commented 5 years ago

So if I understand correctly this is not possible via hyperion-remote out of the box at the moment? I would have to use this before every hyperion-remote command - right?: {"command" : "instance", "subcommand" : "switchTo", "instance" : 1}

It would be nice to have a master switch for all hyperion instances though ;-) (using systemctl [stop|start] hyperion for now)

Cheers Anthrax

brindosch commented 5 years ago

Just for you! ;) https://github.com/hyperion-project/hyperion.ng/pull/596

Just joking, have fun :) I consider this issue as solved, for further tuning the internal command sync will come sooner or later :)

AnthraxLeprosyPi commented 5 years ago

Wow, I feel flattered!

Will test!

good night Anthrax