Konnected not working after 0.106.0 update

Hi, I am having the same problem. Can you confirm which firmware you are using? I reflashed my NodeMCU with 2.3.3 from 2.2.4 and it won’t let me connect the the NodeMCU to wifi. I get the solid blue light.

Thanks,
Ben

Same problem here, tried everything. Flashing the two boards to current firmware resolved the issue.

Same for me. Upgraded to 2.3.3 and now seeing suggested software update for 2.3.1. Appears to be functioning properly, though.

1 Like

@Salty How did you find the port ? I can get the IP from my router but not the port. Tried everything in this post, i am up to date on everything (HomeAssistant, Konnected firmware, etc…). 2 Konnected boards are discovered but keeps asking for IP and Port. Thanks !

This is my config, just in case

konnected:
  access_token: xxxxxxxxx
  # api_host: http://192.168.86.64:8123 ## not used
  devices:
    - id: xxxxxxx
      binary_sensors:
        - zone: 1
          type: smoke
          name: Smoke_Nick
#          inverse: true  ## not used
        - zone: 2
          type: smoke
          name: Smoke_Lalou
#          inverse: true  ## not used
        - zone: 3
          type: smoke
          name: Smoke_Master
#          inverse: true  ## not used
        - zone: 4
          type: smoke
          name: Smoke_Play Rm
#          inverse: true  ## not used
        - zone: 5
          type: smoke
          name: Smoke_Gst Bed
#          inverse: true  ## not used
        - zone: 6
          type: smoke
          name: Smoke_Gst Hse
#         inverse: true  ## not used
#     switches:
#       - zone: out  ## not used
    - id: xxxxxxxxxxxxxxxx
      binary_sensors:
        - zone: 1
          type: motion
          name: Motion Entry
        - zone: 2
          type: motion
          name: Motion Living
        - zone: 3
          type: motion
          name: Motion Gst Hse
        - zone: 4
          type: door
          name: Motion Entry Gst
        - zone: 5
          type: door
          name: Motion Bck Gst
        - zone: 6
          type: door
          name: Motion Win Gst
#     switches:  ## not used
#       - pin: 5  ## not used

@mviamin I ran a port scan against the IP address of my Konnected board. Link below shows my screenshots:

However, some have had success restarting home assistant, and the Konnected integration will automatically detect the port. After mine had been imported and setup, I kept getting a new devices detected message when I would reboot. Everything was working, but the message would appear. If I tried to go through the setup, it would then immediately fail and say it was already configured (because it was). I finally got tired of dealing with it, and I deleted my original imported Konnected interface, and let Konnected detect the new one and set everything up through the GUI. Since then, everything is working as expected.

Thanks @Salty found the ports :slight_smile:

Started with the first board, input the IP and the port, completed and found all the entities
Board 2, input IP and discovered port, integration created, but no entities…
Restarted Home Assistant, both integrations are now empty, even the first one that had succeeded
Deleted the lines in my config related to Konnected
Restarted
Added a new integration and picked Konnected, entered IP and Port, Integrations created but no entities.
Restarted, both integrations are present but no entities created…

Any ideas anyone ?

Thanks !

@mviamin Can you enter the entities if you:

  1. From Home Assistant, select Configuration
  2. Select Integrations
  3. Select a Konnected.io integration
  4. Finaly, tap/clcik the gear icon in the upper-right corner and manually configure the zones.

That’s what I had to do. My entities were originally imported, but I kept getting the new devices discovered, so I went through the manual setup. After configuring the zones and clicking SUBMIT in step 4, above, you are then prompted to name the entities.

Done…a bit of a pain to do everything manually but now works…thanks @Salty

You missed a step:

  1. Update firmware on Konnected devices to latest.

Or else you won’t see any Konnected integrations in step 2.

For me, the onboarding completely ignored my existing configuration and I had to fill in everything all over again.

AND the punch line is, now nothing works. All of my sensors are stuck in the off state.

Just a heads up on this.

I spent last weekend integrating a v2 add on board (replacing a fault v1 interface board) into my 0.106.5 HA and tripped over an issue with the Konnected v2.3.3 release relating to relays.

With 2.3.3 installed, every time I restarted the Konnected board or restarted HA, the relay triggered.
I’m using the relay as a momentary switch to arm / disarm the alarm, so this was a major issue.

It’s already an open issue on github.

Rolling Konnected back to 2.3.1 resolved it.

Rolling back to 2.3.1 did not fix my problem. It looks like the konnected units are rebooting every 5-6 minutes based on device_tracker losing contact. Tomorrow I’ll look at the logs on the konnected devices and see if I can figure out what’s triggering the reboot cycle. After that I may try rolling back to Hassio 0.105.5

Frustrating that after 13 months of being rock solid, everything has gone to hell with 0.106.

Sorry to hear that - my issue may well be relay-specific - I’ve never seen konnected units rebooting repetitively (my v1 interface just short circuited as far as I can tell).

After looking at the console out, the konnected devices are trying to connect to my home assistant server using port 80 and failing. After ten 400 errors, it reboots. So no wonder it’s not reporting any open/close events. I don’t see anywhere in the new integration to set the api_host key, which is how I had it set via the YAML file. Can I just leave that in YAML and have the new integrations work?

I tried to make a quick fix by enabling port 80 in the nginx addon, but that has wedged nginx and now I have not HTTP or HTTPS access. Trying to get creative via the ssh connection and using the hassio CLI tools.

So far I haven’t figure out how to reconfigure an addon via CLI. I need to disable port 80 in nginx.

This is the thing about Docker that drives me crazy. I know I just need to edit one file, but it’s on some docker image I cannot cd into.

Gack. Totally forgot that nginx is just forwarding to port 8123 so I am not locked out of HTTP/HTTPS. Just 4 levels deep in debugging this and losing my mind.

I’m afraid that’s outside my understanding and I can’t see any reference to api_host in my integration settings.

konnected:
  access_token: !secret konnected_access_token
  api_host: http://10.29.30.20:8123
  devices:
    - id: 807d3a3e221e
      host: 192.168.1.121
      port: 12071
      binary_sensors:
        - zone: 1
          type: door
          name: 'Front Door'
        - zone: 2
          type: door
          name: 'Garage Entry Door'

From my configuration.yaml file. api_host tells the konnected device what URL to use to phone home. I looked at the source code and if this isn’t set it falls back to use the Home Assistant value for base_url For me me was pointing at port 80, which has nginx bouncing to port 443 using HSTS (HTTP Strict Transport Security). This was causing all of the konnected devices to receive a HTTP 400 error code for every request.

So here is a chronology of what I tried and didn’t work.

Day 1. Just upgrade to 0.106 and expect things to work. This didn’t work because.
a) I did not get any automated onboarding or notice that konnected stopped working, I had to notice that some automations stopped working and eventually track the problem back to konnected.
b) why did it not work? First I was on an older firmware (2.2.5). Secondly, I was missing port: settings in my configuration.yaml. Thank you @kit-klein for explaining that. For some reason I didn’t think to look at that until much later. Maybe having a non-conforming configuration breaks onboarding. (that is just a guess)

Day 2: Upgraded to firmware 2.3.3 and tried again. I managed to get onboarding to run, however it did not import anything from my configuration.yaml. I manually added all my sensors. After this no konnected sensored worked. This was because all three konencted devices were in a reboot loop.
Cause was because there is no way to set api_host in the new onboarding. I didn’t realize that at the time, and latched on to reports of problems with firmware and installed firmware 2.3.1
Day 3: This was when I diagnosed the reboot loop. (why so long? Partially because I’m still in denial about how much of a shit show this is, but now it’s getting personal. Especially after nginx went sideways on me and then my sql database got corrupted in one of the many reboots.) By the end of Day 3, I have 2 out of 3 konnected boards reporting doors opening and closing again. Time to run the console on board 3 and see what’s up.

Follow up. My third konnected wasn’t connecting because I failed to reconfigure Wifi on my last firmware update.

With the configuration.yaml fixed, ie with host and port set for every konnected device AND with firmware 2.3.1 I was able to successfully use the onboarding flow and have it import all my sensors from configuration.yaml into the integration.

@randomstring I apologize for all the frustration and thank you for posting such a detailed write up. The api_host was definitely an oversight. A couple notes that might help others in the future.

  1. All of the UI based config only cover settings specific to each device. The configuration.yaml has two global Konnected settings (api_host and access_token) that were left out of the UI configuration. They are now always derived unless imported from a configuration.yaml entry.

  2. If you need to specify either of these globals you can do so in a minimal configuration.yaml (see below). The globals are loaded every time HA starts so you shouldn’t need to reconfigure your Konnected integrations if you were able set them up.

konnected:
  access_token: somesupersecretaccesstoken
  api_host: http://10.29.30.20:8123
2 Likes

Hi @kit-klein

Thanks for all your hard work and providing the following code example.

 konnected:
  access_token: somesupersecretaccesstoken
  api_host: http://10.29.30.20:8123

Would it be possible to include an example for those of us that have more than a single konnected board?

Thanks!