Konnected Alarm Panel - connect a wired alarm system to HA new in 0.70

I finally had some time to address this. I found that the api_password is actually not a problem as @Crhass determined, but setting base_url can pose a problem.

The solution was just merged in this PR: https://github.com/home-assistant/home-assistant/pull/14896

In the next release there’s a api_host configuration option that you can set in your konnected config. This should be set to the local hostname or IP/port if you’ve set base_url to something else. This will ensure that Konnected will only communicate with Hass over your local LAN

Hi Nate, not sure if you are aware but when https:// is enabled and set up for hassio, you can then only access using https:// and not http://

It still uses the same port of 8123 but disables http://
Konnected doesn’t seem to then be able to connect locally without https://
If another port could be used by home assistant for http:// for local Lan only even though https:// is enabled, it would work.
The MQTT server in Hassio accepts unencrypted connections but konnected would need to publish MQTT to this. Is this an option or can you get https:// to work correctly?

Ok, I wasn’t aware that http would also be disabled. However, there’s no reason why https shouldn’t work as long a valid certificate was offered by the Hass api server. Konnected does support https. In fact, SmartThings API is https exclusively and Konnected was originally built with SmartThings support.

So my question is … why is HTTPs endpoint not working? is there a certificate error?
Do you know what type of cipher the Hass api server is using to serve up https, or is that set up external to Hass?

Malcolm Lashley has posted more details on what he thinks may be wrong here. Have you seen it?

https://help.konnected.io/support/discussions/topics/32000001193

As for the cipher, the duckdns addon automatically sets up a letsencrypt certificate. The info from Chrome on my test install shows TLS 1.2, CHACHA20_POLY1305 and ECDHE_RSA as the key exchange mechanism. Does that help?

Thanks for that link. I’m embarrassed to say that I hadn’t seen that discussion yet.
I will take another look at this. I suspect it might just be a cipher issue. The Konnected firmware is compiled with a limited number of enabled ciphers to minimize memory consumption.

1 Like

Thanks, Malcolm said he got a nodemcu to connect but not consistently, i got the impression that he also felt it was to do with memory. He said it seemed to stop working when heap size reduced.

Let me know if you want me to help test anything.

Hi,
I have just set my Konnected board up. The Binary sensors in HA are updating as expected. However I can’t get my siren to turn on. I have added the siren switch to my HA front end so I can easily switch it on and off, but when I do the siren doesn’t sound.
Unlike the instructional video my alarm system has several wires for the siren:
https://photos.app.goo.gl/PSs4p7e7fqKsg2bb7

Black = strobe
Blue = 0V
Red = Tamp
Green = Bell
White & Yellow = +12V

I ignored the strobe, 0v and tamp wires, and hooked up the white & yellow wires into the +12v port on the Konnected board. I put the green wire (Bell) into the - port as per the alarm instructions:
https://www.manualslib.com/manual/833866/Texecom-Veritas-8.html?page=13#manual

Here’s my HA config:

konnected:
  access_token: blahblahblah
  devices:
    - id: 8F238
      binary_sensors:
        - zone: 1
          type: door
          name: 'Back Door'
        - zone: 2
          type: door
          name: 'Front Door'
        - zone: 3
          type: vibration
          name: 'Bay Window Sensor'
        - zone: 4
          type: vibration
          name: 'Kitchen Sensor 1'
        - zone: 5
          type: vibration
          name: 'Kitchen Sensor 2'
      switches:
        - zone: out
          name: siren

Like I said the binary sensors are operating as expected.

I can’t think of anything I have done wrong, so why doesn’t the bell sound? Any pointers much appreciated!

2 Likes

Hi @Dan_Nuttall you must be in the UK. Your sirens configurations in Europe are a little different than here in North America. Try this, I think it should work:

White & Yellow: AUX/ALARM+ (middle black terminal on Konnected board)
Green & Black: ALARM-
Blue: AUX-
Red: probably not needed, but if the siren chirps at you, try connecting it to AUX-

2 Likes

Thanks Nate that did the trick! The red (tamper) wire wasn’t needed.

1 Like

@heythisisnate
If you do get SSL for hassio to work with konnected.

If we connect to the api_host address, the certificate will then show as not matching the base_url. Will konnected still connect or will this be another issue?

This is great. I have it all set up and working with the Hass Custom Alarm. Many thanks for your efforts Nate!
I do have a couple of queries though:

  1. Before I swapped to the Konnected board my alarm system beeped once when I opened / closed my front/back doors to make me aware someone had entered the property. It also beeped (slightly different sound to opening doors) every second after setting the alarm as the pending time counted down before arming it, and likewise it beeped every second upon entry as the warning time counted down before inputting the code. The sound came from a loudspeaker located above the keypad. It plugged into the old board +/- ports (you can see it on my photo from my last post). Is there any way of attaching this loudspeaker up to the Konnected board to perform the same actions?

  2. The frequency of the siren was much faster on the old board. It is now equally as loud but it pulsates a lot slower which is less alarming! Is there anyway to increase the frequency of the siren?

Thanks

1 Like

@heythisisnate

Hi Nate,

I have found that sometimes the Konnected component takes a while to load. To ensure that all the its entities (binary sensors) are are exposed to HomeKit I am trying to find a reliable method to check that the Konnected component has finished setting itself up. Is it possible to have it generate an event, say konnected.device_ready, when all of its sensors are good to go?

Thank you!

I have the same issue that the devices take a long time to discover in HA. Sometimes never (or at least over night). I emailed with Nate a few times and he indicated that a fixed IP for the boards and a corresponding entry in the HA konnected setup might work in the future to alleviate this. I hope that this can be implemented soon :).

In the meantime, I’ve considered creating a template sensor to check if another sensor exists or not and then link this new sensor to automatons I’ve set up. I would rather not spend the time if it is fixed soon however.

1 Like

This is most likely caused by a delay in device discovery. Because HA doesn’t have any storage mechanism for persisting state between restarts, Konnected relies on discovery running every time after a reboot to re-discover the Konnected devices. There may be an event that the discovery component triggers that you can listen for.

As @ktdad mentioned, I’m thinking about a fix for this that would involve manually entering the local IP and port of the Konnected device(s) in your configuration so that the devices can be contacted immediately without relying on the timing of discovery. I think this will solve your problem as well as few other related issues.

I’m totally committed to improving this and making it work, but please give me some time to get it done!

2 Likes

Thanks @ktdad and @heythisisnate!

I’ve tried PLATFORM_DISCOVERED and it’s being announced for Konnected at least 4-5 times. COMPONENT_LOADED is too early. The others are pretty much unusable for my purpose. I guess I will wait for Nate to work on the fix, as long as its in the works. Thank you!

I got my Konnected device on Friday. Right now all I have hooked up is one motion sensor to one of the expansion boards to test the integration with Home Assistant.

I’ve run into the same problem with inconsistent discovery that I’ve seen others bring up. Sometimes it’s there and sometimes I have to restart a couple times for it to finally show up. I’d love an option to statically set the IP in the Home Assistant config for faster discovery.

The bigger problem I’ve had so far is that the motion sensor state doesn’t get updated in Home Assistant. Once it’s detected it stays in whatever state it was detected as initially. I’ve run TCPdump on my Home Assistant server and each time I trigger the motion sensor I can see traffic back and forth between the Konnected and Home Assistant on port 8123. No state changes though.

I’m on Home Assistant 0.73.1 and the Konnected is 2.2.1. I’m kind of at a loss at where to go from here. As far as I can tell everything is in place and it should be working. Any ideas on what else to look at?

Do you know if the motion detectors worked prior to hooking it up? I had to replace one of mine after I did some testing by ‘shorting’ the circuit to verify that the board and HA were working correctly among other tests.

I should clarify that the zone circuit can be closed manually to verify a detected signal and then opened to test the Konnected and HA functionality but I wouldn’t do this to the power wires.

Yep it works. I could see when motion changed the state in the NodeMCU’s web interface and when I had it hooked up ESPlorer.

Do you have any logs from the konnected component?
Any details on the traffic you’re seeing?
If you have it hooked up to ESPlorer, what is the HTTP status code response?