home-assistant / architecture

Repo to discuss Home Assistant architecture
317 stars 100 forks source link

Device to device Bindings #111

Closed pbalogh77 closed 1 year ago

pbalogh77 commented 5 years ago

The idea is to have a much simpler and usable way of setting up simple interactions between devices. A device to device binding (d2d, for now) is a python object, which defines a usecase between a number of device platforms. For example the "Venetian Blind controller" binding would have 2 or 4 device parameters of button devices and 1 or more device parameter of cover devices. It'd automatically raise/lower the blinds based on two buttons and tilt the blind blades based on the other two button. It could be a stateful object, e.g. it could remember/restore/count/continue its operation as needed. Envisioned simple use cases:

For the user interface, it could be as simple as a list of these bindings activate, adding/editing a new one would be one or more lists to populate with devices and a selection of the binding to be applied between them. E.g. you select a light that supports dimming and a button, and it offers you only the bindings which are relevant to these devices together.

Jpsy commented 5 years ago

This is in fact very much needed. I was shocked to find out that I have to use automations to copy states back and forth between my KNX switches and my Hue lights, although both of them do show up nicely in Lovelace UI with their proper states. It seems so natural to have an implicit way in HA to couple these entities. One problem I see is that we would need a way of converting between different unit systems used by the entities. In example KNX uses Kelvin for white light color temperature while Hue uses Mired. But then again HA already seems to have an internal representation and an implicit conversion for both worlds as I can read and set both color temperatures correctly in Lovelace UI.

balloob commented 5 years ago

What you're proposing is a new automation component with device and integration specific triggers instead of triggers based on events/states.

rohankapoorcom commented 5 years ago

This sounds like the same thing proposed in #57.

pbalogh77 commented 4 years ago

@balloob, what I proposed was that if you have 10 switches and 10 lights, you could just 'connect' them up. And a switch and light should know how to interact. If you have (like I had in my prev. flat) 55 venetian blinds and 25 set of buttons to control them, instead of creating a separate automation for each press of each button, you could just 'connect' them up. A venetian blind and a 4 button wall switch should know how to interact. Same goes for most sensors, actuators, etc. Having this sort of templates for their interactions (device type A <-> device type B) and config options on these interactions (like what should doubleclick mean) would make building and configuring a system so much less tedious. Using Z-wave for everything and setting up direct associations gets it half done. But why can't I take a zigbee button, and a z-wave light, a z/wave sensor and a wifi actuator and still be efficient and convenient in setting it up?

frenck commented 1 year ago

This architecture issue is old, stale, and possibly obsolete. Things changed a lot over the years. Additionally, we have been moving to discussions for these architectural discussions.

For that reason, I'm going to close this issue.

../Frenck