Skip to content
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

Multiple "onUrl" and "offUrl" with "stateful" switches #53

Closed
downloard opened this issue May 1, 2020 · 3 comments
Closed

Multiple "onUrl" and "offUrl" with "stateful" switches #53

downloard opened this issue May 1, 2020 · 3 comments

Comments

@downloard
Copy link

Please add possibility that 'onUrl' can be an array.
I've an device (frontier silicon radio) which needs for preset channel change 3 http calls:

  1. activate preset mode
  2. do preset change action
  3. deactivate preset mode

So for one "Homekit-Use-Case" 3 http calls are necessary.

@Supereg
Copy link
Owner

Supereg commented May 1, 2020

The onUrl property can already be an array.
The only requirement is that you use an switchType different from stateful.
The reason I designed it like this is, that it would make no sense to call multiple http servers for the onUrl but query the current state from ONE statusUrl.
If I may ask, what's your setup like. You require to have three urls for setting but can query the current state from only one url?

@downloard
Copy link
Author

I really could not understand what the problem is with to call multiple urls for onUrl, but just a single url for status.
My problem is to support a poor API from DAB radio.
What I want to do is a switch which activated a preset channel and I want also to poll the status to track if it is really active, but activating need the 3 calls I explained above :(

@downloard
Copy link
Author

Hi, thanks for investigation. But in the meantime I forked your great project: homebridge-http-switch-unlimited
So I am fine.
Bye

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants