rodtoll / homebridge-isy-js

Homebridge platform plugin for the ISY series of home controllers from Universal Devices.
MIT License
22 stars 27 forks source link

ISY State #5

Closed respectTheCode closed 8 years ago

respectTheCode commented 8 years ago

It would be great if there was a way to see and set state values. To make it really useful we would need a way to configure possible values and maybe even names for those values. I use states for all kinds of things but the first one that comes to mind is occupancy. I have a state that is 1 when people are home and 0 when no one is home (away). I then use that state in programs to do all sorts of things. It would be great to be able to use Siri to change this state.

PaulWieland commented 8 years ago

+1 for this, but....

I am also struggling with where the logic should live - in iOS or on the ISY. I just installed Apple's sample HMCatalog app and found Triggers. A trigger can be based on time, characteristics or locations. I can setup a geofence around my house and have it trigger a scene when I arrive or leave home... which is basically what I was trying to do with the occupancy state value on the ISY.

rodtoll commented 8 years ago

Agreed. I'm working on adding variables, scenes and programs.

Out of curiosity how do you determine occupancy in your setup?

respectTheCode commented 8 years ago

I am struggling with this as well. Right now I think the best solution would be to use a HomeKit trigger to update a state on the ISY.

I have keypads by every door and they all have a "Home" button.

I have wanted to add geofencing to my iOS app CtrlHome but I haven't found time to do it. The geofence is simple but the UI to configure the geofence and what it does when the geofence is tripped is pretty complex.

PaulWieland commented 8 years ago

@rodtoll just out of curiosity, what's your plan for adding ISY scenes to homekit? I noticed that Apple's approach is a bit different from Insteon/ISY's. It seems that a HomeKit scene contains the predefined set states for all devices in the scene, where an ISY/Insteon scene is just a group of devices you can turn on/off brighten or dim as a unit...

rodtoll commented 8 years ago

There isn't a good mapping as you have highlighted to a HomeKit device or object. I was thinking of using the device type of the controller device and representing the scene as that device type. Or even better enumerating the devices in the scene and exporting appropriate services. So for example there is a light enable the light controls, a fan, the fan controls, a lock the lock controls etc. probably do the simplest approach first.

rodtoll commented 8 years ago

@respectTheCode - I have added variables to the base project but I have not found a good way to expose them to HomeKit. HomeKit doesn't have the concept that would be equivalent to a variable -- an accessory that you could set a value on. I think a combination of programs and scenes and pushing logic to the ISY is the best approach here.

Incidentally, scenes are now supported in HomeBridge-isy-js now. See the README for details on how to enable them. Hopefully this + logic on the ISY will address your scenario.