Switches not working with 0.1.0 beta of Konnected plugin for homebridge

I am copying my original post: 


Thank you Mike for your work. I was very excited to try this out. I have an Alarm Pro and all of my contact sensors work. However I am having difficulty getting the piezo buzzer to work as a switch or my siren to sound. I can activate them using the 'accessories' in home bridge and change their states from 'false' to 'true' however I do not get any noise. Also the HomeKit switches for the alarm or buzzer do not seem to change the accessory state in Homebridge per the log. Any ideas?

Can you provide the following details to help troubleshoot?

  • Describe the Bug
  • Steps to Reproduce
  • Expected Behavior
  • Attach Files to Support Your Experience:
    • Screenshots
    • Log Snapshot (txt file)
  • Homebridge System:
    • Node.js Version
    • NPM Version
    • Homebridge/HOOBS Version:
    • Operating System: Raspbian / Ubuntu / Debian / Windows / macOS / Docker
    • Process Supervisor: Docker / Systemd / init.d / pm2 / launchctl / hb-service / other / none
  • Any Additional Relevant Information

Bug: Unable to activate piezo buzzer or alarm with konnected Pro

Steps: Using either HomeKit or the homebrdige accessories function, the switch that correlates to the piezo buzzer, in my case zone 7, does not result in any sound despite displaying 'Pro generic switch true' in the log. Also the home app switch has different functionality than activating the accessory under home bridge.


Of note, I have refreshed alarm panel pro, done a fresh install of plugin, reset homebridge connection, cleared cached accessories but all don't seem to result in same problem.


I will attach a log with debug mode turned on


Here is my system info:


Node.js Version

v14.15.4

Npm Version

v6.14.10

Homebridge v 1.2.5

OS: Raspbian GNU/Linux Buster (10)

Linux version 5.4.79-v7+ (dom@buildbot) (gcc version 8.4.0 (Ubuntu/Linaro 8.4.0-3ubuntu1)) #1373 SMP Mon Nov 23 13:22:33 GMT 2020

Home bridge Supervisor


@Fred, thanks for the details. I had an initial issue with the piezo buzzer not working immediately after setting it up in Homebridge. I would try the switch for the piezo buzzer, but nothing. Then I restarted Homebridge completely .. and then the button worked. I'm assuming you tried one more restart on Homebridge?

Hi. Yes I have restarted Homebridge. I have reflashed the.konnected unit as well. I have tried another piezo buzzer too, switched polarity on the buzzer, removed all other zones and just had piezo buzzer, unpaired from HomeKit. None of those work

Shouldn’t the LED blink on the unit when I activate the switch? That also doesn’t happen

I have tried another piezo buzzer too, switched polarity on the buzzer, removed all other zones and just had piezo buzzer, unpaired from HomeKit. None of those work

I wouldn't switch the polarity of a buzzer. Depending on the setup or specific piezo buzzer, you can burn it out. Can you check if the buzzer itself isn't burnt out? A way to test that would be to try restoring your setup before you tried using the Homebridge plugin.

Shouldn’t the LED blink on the unit when I activate the switch? That also doesn’t happen

There's a setting in the Homebridge plugin configuration to blink the LED on and off for each panel, the default should be 'selected', however can you verify what that is on the Homebridge configuration for your panels?


So I have no idea why, but the piezo buzzer started working. I haven’t touched anything since my last message. I wonder why this is so buggy??

I am working on a version that outputs a more semantic logging scheme to help better debug states and the overall state logic. However, I'm also integrating the ability to invert a sensor's input and register that correctly in that version as well. I have some further testing to complete before pushing out the update.

Do the Homebridge and Home app have different results still after the piezo buzzer started working?



Gotcha


So the logs have remained relatively the same. Here is the log when you switch through homebridge GUI:


[24/01/2021, 10:55:14] [Konnected] Set [Alarm Box Generic Switch] 'Switch' Characteristic: true

Pro Generic Switch true

[24/01/2021, 10:55:15] [Konnected] Get [Alarm Box Generic Switch] 'Switch' Characteristic: 1

Pro Generic Switch 0

[24/01/2021, 10:55:16] [Konnected] Get [Alarm Box Generic Switch] 'Switch' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Front Door Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Back Door Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Porch Door Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Master Bedroom Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Office and George's Room Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Contact Sensor 0

[24/01/2021, 10:55:16] [Konnected] Get [Amos's Room Contact Sensor] 'ContactSensorState' Characteristic: 0

Pro Alarm Siren false

[24/01/2021, 10:55:16] [Konnected] Get [Alarm Siren] 'Switch' Characteristic: 0



Here is the log when I switch with Home app:


[24/01/2021, 10:57:04] [Konnected] Set [Alarm Box Generic Switch] 'Switch' Characteristic: true

There is a new beta version out, it doesn't show up as an update in homebridge/hoobs .. you have to manually install it.
The following command will install it globally on the system:

npm install -g homebridge-konnected@0.1.2-beta.0

If you prefer to install it in a specific directory that you've navigated to, just perform the above command, without the '-g'.
Feel free to install it and see if that helps.

Will do! Thanks

SO I am having an issue with the piezo buzzers not responding again. They had worked for a time with the latest release of 0.1.2. I can hear them beeping at times when I do a homebridge restart, or I restart the Alarm Pro through the Konnected app on my phone. Should the piezo be configured as a high or low trigger in the plugin? 

Should be triggered high.

Ok I have them set to trigger high.

I have noticed that after restarting the Homebridge server the Konnected panel will become unreachable even with the iOS app. There will be a solid blue light on it. The only remedy seems to be reflashing the board. At other times the buzzers will get caught in some kind of loop where they beep continuously. My settings haven’t changed. Do you think this is a software issue with the plug-in?

Hi Fred,

What does your Homebridge config.json look like?

Can you send another log output from a fresh start of Homebridge in debug mode with some examples that have the piezo buzzer issues?

Sure thing. At the bottom of the log is where I flipped the switches with no sound


Would there be a way to use a multimeter to verify a voltage change across the Konnected where the switches are attached? I have a feeling there is no change in voltage as they had worked before

Hi Fred,

I'm struggling to find a way to reproduce your piezo buzzer issue. I have tested the code with the Konnected Pro panel and the piezo buzzer I have and it works reliably as expected.

I did notice that you have assigned an actuator/switch as "Generic Switch" ("switch" in the config) to the two zones which I assume one is the piezo buzzer, versus assigning "Alarm Siren Switch" ("siren" in the config) for that zone instead. It really shouldn't matter though because they all end up creating an actuator in the panel itself anyhow.

Another thing I remember you mentioning is that you were switching the polarity of your piezo buzzer to try and get it to work in your previous setups. If this is the case, you could have inadvertently damaged the piezo buzzer. I asked the Konnected hardware team and they say that piezo buzzers are susceptible to damage from not properly using the outlined correct polarity that the piezo buzzer comes with. I also think that's the reason why piezo buzzers have that sticker on them indicating which terminal on the buzzer is positive or negative.

That being said, there'a s couple things you can do to determine if the piezo buzzer is damaged:

1. you can buy another one, they're incredibly inexpensive ($1 each), https://konnected.io/collections/shop-now/products/piezo-sounder-for-konnected-beep

2. you can try and restore your old setup, pre-Homebridge, to see if the buzzer works in that scenario reliably and consistently

Please try either of those two things and get back to me.

Hi again Fred,

I did see a warning my logs when I assigned a zone as a Alarm Siren Switch that says:

Invalid Zone: Konnected Pro Alarm Panels cannot have zone 7 as an actuator/switch. Try zones 1-8, 'alarm1', 'out1', or 'alarm2_out2'.

However, the actuator/switch was created in Homebridge and HomeKit and still operated normally regardless of that notice.

I've already fixed this on my end and still the piezo buzzer confidently makes a noise as it did before.

Regardless, the warning will be corrected in an upcoming update.

Thanks for the reply. I actually have two different piezo buzzers in different locations. I am pretty sure both of them work and have verified the polarity. I don’t think I damaged either of them and only one of them did I experiment with changing polarities. I will see about restoring to a smart things setup to see if that works and get back to you

So after a bunch of trial and error I finally got it working for now. The piezo’s work fine. There seems to be a delicate art to getting the konnected to provision properly. The process that seemed to get all the buzzers working was : delete the Homebridge plugin and all config settings, reflash the Konnected, reinstalling the plugin, then adding all zones, restarting the server.

It seemed that if I would add a few zones and then come back after restarting the Homebridge and add a few more zones, things wouldn’t work and I would eventually get a non responsive Konnected that had to be reflashed. At this point I don’t want to add any more zones or alter my set up as it seems so delicate.

Have you had any issues in adding zones over time? Also I wonder, but can’t confirm if setting the delay or pulse duration of the piezo buzzer too low may cause some issues. I was going for a quick beep like you hear with commercial systems, but I can’t seem to hear a difference below 50ms. Below 10ms I get a solid tone. This may have nothing to do with the crashes and unreliability, but something to note.

I wish there was more info that I could post regarding the logs, but they seem unremarkable and don’t seem to capture the capricious behavior of the set up…