Konnected Alarm Panel wired alarm system integration

That's weird. The error seems to indicate that request.JSON is null. This would be the JSON post body from the Konnected device that's communicating state changes. Not sure how that would suddenly be null. You didn't touch the firmware, right?

I haven't changed anything in months.

@nate, it happened again at 1:30am and seemed to crash my hub. Again, I don't want to make assumptions as to whether this is the cause or a symptom of the hub crashing, but it's the only errors in my Past Logs....and there are a LOT of them. Too many to count but a least a couple hundred between 1:30 and 6:30 when I had to pull the power on the hub. Please provide some direction. I am willing to edit code and test as needed.

At the very least, we need to capture this error and log details that could help (what pin/device etc). This is a major inconvemeince in the morning when the family wakes up and no automations fire. I like the simplicity of your setup but I will have to either move this to my dev hub (a lot of work to tie both hubs together) or switch back to Hubduino.

Please advise.
Stephan

It sounds like somehow with no warning or changes request.JSON becomes null and this causes the app to crash and return a 500 status code. As a result, the Konnected device continuously retries until it gets a success response (this is a failsafe mechanism).

request.JSON typically will contain just a simple dictionary of the pin number and open/close status, i.e. {"pin":1, "state":0}

It seems that there are two possible ways that this could happen:

  1. the Konnected device suddenly stops sending the JSON body in state change requests
  2. Hubitat suddenly fails to parse the JSON body

Both of these sound extremely unlikely to me, especially since no changes have been introduced and I haven't heard any other reports of this issue. I would suggest running Wireshark or a similar network traffic monitor and filter it to show communication from the Konnected device's IP. This will let you see the actual HTTP requests going over your LAN and will help determine if it's the Konnected device or Hubitat that's failing.

As you can see with the dates between the incidents, this could occur weeks apart. While I may set up wireshark to determine the cause, I would need something to catch the error and prevent it from drowning my hub in error logs as well.

I understand that this may require a significant amount of your time and there may not be enough Hubitat users to justify the investment. However, waking up to instant troubleshooting and an angry wife for a 3rd time is not option for me if it can be avoided.

Please let me know if there is anything you can do to help in the meantime or I think I'll just have to move back to Hubduino. I am comfortable editing the app code, so if it's simple enough, I would just need a "replace line ?? with the following code..." instructions.

you could just add the "safe navigation operator" to request.JSON on line 383 so that instead of crashing with a NullPointerException it would just return null:

Replace line 383:

  def pin = params.id ?: request.JSON.pin

with the following:

  def pin = params.id ?: request.JSON?.pin

In this case the variable pin would be be assigned null and the function should just be a no-op. This would prevent the crash but won't help at identifying the root cause.

1 Like

Thanks @nate. I'll do that and try to track down the issue with wireshark when I can.

@nate, is it possible to configure a nodeMcu to report to multiple hubs at the same time?
I have 2 HE hubs and would like one of my boards to report to my dev hub for testing. I installed the apps and drivers but I'm unable to discover any konnected boards. Thoughts?

1 Like

I asked Konnected support that question before and was told it was not possible. I didn't ask Nate directly, though.

Thanks for the heads up. I saw someone ask in the Konnected forums as well with no response so I figured it was a no. Do you know the correct procedure to move between hubs? Do I need to reset/reflash the nodemcu?

Reporting to multiple hubs is not currently supported in the Konnected firmware, however it is open source so I'm sure it's possible if you were willing to modify the code.

To switch between hubs all you need to do is sync the settings from the new hub and it'll overwrite the previous settings. No need to re-flash.

1 Like

@nate, thanks for the confirmation but I'm not sure what you mean here.

Simply discover and set up the device on the new hub. Once you click "Save" on the zone assignments screen Hubitat syncs the new settings to the Konnected device, overwriting whatever previous settings were there. from that point onward the Konnected device will report to the new hub.

That's the problem I'm having. The new hub is not discovering the nodemcu. Do I need to remove it from the other hub first?

No need to remove it. It should be discoverable unless you've disabled discovery when setting up originally. If so, just go back to the old hub and re-enable discovery and save.

1 Like

:man_facepalming:
I did disable discovery when I first set this up. Completely forgot. Thanks again.

Moving my question from a separate thread over here, per stephack's advice.

I have a glass break sensor that is correctly wired to my Konnected hub. I have all my door sensors and window sensors working and set up in my dashboard correctly. But I was working on the Glass Break sensors and ran into an issue with the first one. When I add a sensor to my Konnected App and try to add it to the Dashboard, it doesn't seem to recognize it (the "question mark" symbol on the dashboard tile). I have the driver downloaded for glass break sensor.

I checked the glass break sensor and did the test jingling car keys and hitting the wall (to simulate breaking glass), and the lights do change on the glass break sensor. I also checked the GB sensor to see if there was a resistor (Nate correctly identified this on my motion detector which I removed and it worked), but the GB sensor doesn't have any resistors to remove. Thanks!

Can I ask, seriously not trying to offend, whats the extra value/purpose of an alarm based system verses using the sensors that would be in the house which sense presence etc automatically.

I'm sure there are lots, hence the question but grateful if someone can walk me though what this has differently.

Any draw backs?

I'm UK based.

having issues with glass break sensors not working as well

The link in post # 1 to github is giving me a 404. Can anyone comment or direct me to an alternate repository.

edit : Ah, the links on this page are functional :wink: