Feller-AG / wiser-api

MIT License
12 stars 1 forks source link

how to link primary and secondary switches using the API #3

Open neckcen opened 2 years ago

neckcen commented 2 years ago

Hello,

As stated in the title, is it possible to link a primary switch (e.g. actual load bearing) to a secondary switch?

I've read the doc several time and did not see any way to associate a secondary switch to a load. I was expecting to use jobs but apparently secondary switches are not smartbuttons nor can I associate an output (job or otherwise) to a secondary switch.

Thank you for your time and thanks for creating this system, playing with it is quite fun.

woodworm commented 2 years ago

The interaction between jobs and smartbuttons are not yet finally documented. I hope this description helps in the meantime. https://github.com/Feller-AG/wiser-api/issues/24

neckcen commented 2 years ago

Hi woodworm,

Thanks a lot for the link, I somehow missed it and it did help a lot.

For anyone who would end up scratching their head -like me- on how to apply this to a dimmer switch; here is what worked for me (when associated with a secondary dimmer switch, everything seems to work as expected including press-to-dim):

POST api/jobs
{
  "button_ctrl": {
    "event": "click",
    "button": "up down",
    "loads": [
      1
    ]
  }
}

While I'm at it, if I may, a bit of general feedback regarding the API.

Overall though it works well and having everything run locally is great.

woodworm commented 2 years ago

Thanks for your feedback We are aware that more detailed information is still pending in the documentation... We're working on it! In the meantime, we can also offer you support via our Customercare Center to get more information about the core concepts. To do this, you need to write an email to our Customercare Center with the note "API request at woodworm".