kuestess / homebridge-platform-insteonlocal

Homebridge platform plugin for local Insteon control
Other
77 stars 26 forks source link

Insteon scenes and keypadlinc #5

Closed awaspaas closed 6 years ago

awaspaas commented 6 years ago

Hello and thank you for your development of this! I have a keypadlinc that has been left out of all of this so far, but I was encouraged by insteon scene support which I thought could have been a solution here. The KPL buttons trigger an Insteon scene that turns a device on (this is how device status stays in sync with the KPL button LED). When I added the insteon scene to homebridge, it properly controls the switch and the device, but if I use the KPL, it does not update homebridge (either the scene or the device). Is this a limitation of the event listener? I'd be happy to help you debug, although I'm not a developer.

Honestly if we can get this figured out, it'll save me the $200 from getting an ISY and I'll send you a gift from Minnesota!

kuestess commented 6 years ago

@awaspaas Glad its working for you! I've been trying to figure out a better way to do this since I started writing the plugin. The current plugin should update the status of target devices for a scene, as the event listener will see the ack from each device once a scene is triggered and update status accordingly. This is usually within a few minutes, but could be different depending upon the amount of Insteon traffic. This seems to work in my setup fairly predictably (~45 devices). If the device status isn't updating, try enabling the polling function in you config. Kind of a belt and suspenders approach, but it should work.

Regarding scenes, they don't have status themselves so its not possible to ask the Hub for the status of a scene. One workaround I've been thinking about is adding a keypad device (that will look like a switch/dimmer) and getting the status of a keypad button to represent the scene status. This would require some manual configuration, but it might work. No promises, but I think that should do what you're asking. I've got keypadlincs too, so something I'd like to get a robust solution for.

awaspaas commented 6 years ago

I will remove and re-add and see if the event listener will pick up changes from the keypad because homebridge is not seeing them at all now. Getting scene status from a keypad button would about be the holy grail - count that as a vote for that feature!

kuestess commented 6 years ago

@awaspaas I've got a working update for the plugin that should provide scene status based upon a keypadlinc button. I need to do a little more testing but should have something ready later this week.

kuestess commented 6 years ago

@awaspaas Try version 0.3.2 - take a look at the readme as configuration for scenes has changed.

awaspaas commented 6 years ago

Holy cow this is working for me! I was spinning my wheels for a while but then I saw in the other part that it supports 8-key keypads only. I have both so support for both styles would be excellent. Thanks so much! :)

kuestess commented 6 years ago

Let me see if I can get 6 button support working. May need your help testing as I don't have a 6 button keypad (or one confugred as such).

kuestess commented 6 years ago

@awaspaas Just uploaded a version with experimental 6-button keypad support. You can just update via npm. To configure a 6-button keypadlinc, add "six_btn": true to your config for that device. For the keypadbtn field, you can put "ON" if the scene is controlled by the top/bottom buttons (all others are the same). Appreciate any testing you can do as I don't have a 6-button keypad. Thanks!

awaspaas commented 6 years ago

Okay, finally got a chance to try this out. It works but I think the button letters need to be rearranged. The letters should be just A-D on the four buttons between ON and OFF. When I tried declaring button C it took status from the first of the four scene buttons. It works correctly now when I declare button E for the third scene button, but that should be button C.

kuestess commented 6 years ago

@awaspaas Thanks! My bad, should have payed more attention to that. Will try to fix this evening.

awaspaas commented 6 years ago

For reference screen shot 2018-05-29 at 11 32 40 am

kuestess commented 6 years ago

@awaspaas Update live on npm - should address the 6 button status issue.

rasod commented 6 years ago

Should you be able to control the scene button from HomeKit? I added a button and it’s status is updated in Home app when I push the button. If I use the Home app to change its status it doesn’t update with a “Not Responding”

kuestess commented 6 years ago

You should be able to control a scene via the Home app which would turn any button on that is specified in the scene. You can't currently turn on specific keypad buttons, although that is possible. Hmmm....might make a nice trigger.

rasod commented 6 years ago

That is exactly what I was trying to do. Created a automation where if any light was turned on the “Goodbye” button would light up. Then if Goodbye is turned off all the lights turn off.

I know I can do this with Insteon natively, but I no longer have the patience with Insteon “programming” 🤮

kuestess commented 6 years ago

I could create a keypad device that would allow you to toggle a specific button and monitor its state, different than the current scene state paradigm. It would only turn on/off the button and not any associated scene. That should allow you it use it as a trigger.

rasod commented 6 years ago

I would find it useful to have the keypad scene buttons be standard switches in HK, but i'm just one person. :)

rasod commented 6 years ago

As a followup, I can't seem to get the scenes to work from Home, the switch will show the correct status but when I try to change it in Home it just spins and then “Not Responding”. Not much in the log either.

Jun 7 07:57:09 raspberrypi homebridge[22985]: [6/7/2018, 7:57:09 AM] [Insteon Local Platform] Setting power state of Goodbye to off

    {
      "name": "Goodbye",
      "deviceID": "2A9607",
      "dimmable": "no",
      "deviceType": "scene",
      "keypadbtn": "A",
      "six_btn": true,
      "groupID": "26"
    },
awaspaas commented 6 years ago

Greetings, sorry for the delay in testing. The behavior is now correct when triggering from homekit, however when triggering from the keypad, homekit shows the main load has also turned on as well.

kuestess commented 6 years ago

Closing for inactivity - please open another issue if the current support is not working.