-
Notifications
You must be signed in to change notification settings - Fork 31
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
API to deal with multiple relays at once #41
Comments
That's correct. Only one relay at a time is supported for both command line and in each HTTP request. The command line could possibly be modified quite easily to accept multiple relay parameters. The current REST API instead is not something I will modify any more. I would rather replace it with a new implementation, based on json format. That new API would also support multiple relays. This has been discussed some time ago here |
Missed that bug in my search presumably because it was closed. Yes agree JSON would make more sense. To answer the motivation question - it would be to better guarantee that all relays have been successfully set. If the command returns success, all relays have been changed, whereas if you have to call them sequentially, more can go wrong. I ended up doing them through concatenating several calls to the commandline over a single instance of ssh (with error checking only on the ssh call), but that means sharing ssh keys to all the hosts that need to control the relays. Keep the bug open and I'll see whether I get enough time to learn JSON libraries :) |
Rather than calling the command line via ssh I would recommend using the REST API. This is the preferred way of remotely controlling A very nice JSON library is libjansson. By the way, another way of remotely controlling |
process_http_request() (and the comandline, I think) can only deal with one relay at a time per call. It would be nice if there was a way of dealing with multiple in the one call.
The text was updated successfully, but these errors were encountered: