Thanks, bdraco! I will look forward to seeing the fix in an upcoming HA release. When do you think it will appear?
With regard to your question, I checked my Elk installation using ElkRP2 and it looks like the secure port is enabled by default, with no way to stop it from being enabled. On the other hand, you have to click a check box to enable the non-secure port (2101).
On my end, when I use the config code I provided above the Elk is no longer auto-discovered. I then add the Elk integration manually, and choose to configure it via manual entry. I then type in the ip address and port (x.x.x.x:2101), leave the username and password blank and choose not-secure.
Logviewer then shows the following
2022-03-27 17:26:22 ERROR (MainThread) [elkm1_lib.discovery] ELKDiscovery error: [Errno -2] Name does not resolve
2022-03-27 17:26:25 ERROR (MainThread) [elkm1_lib.discovery] ELKDiscovery error: [Errno -2] Name does not resolve
2022-03-27 17:26:29 ERROR (MainThread) [elkm1_lib.discovery] ELKDiscovery error: [Errno -2] Name does not resolve
2022-03-27 17:26:52 WARNING (MainThread) [elkm1_lib.elk] ElkM1 at elk://x.x.x.x:2101 disconnected
022-03-27 17:21:22 WARNING (MainThread) [elkm1_lib.elk] ElkM1 at elk://x.x.x.x:2101 disconnected
Hi, bdraco. Thanks again for your work on this! Unfortunately the issue appears to still be present.
When I comment out the config code I provided, the Elk is discovered. When I try to configure the Elk I do now get a box that allows me to select that I am using a non-secure port. However, when I make this “non-secure” selection (and also leave username and password blank) I receive the message “Failed to connect.” Logviewer then shows the following:
2022-03-31 00:39:47 WARNING (MainThread) [elkm1_lib.elk] ElkM1 at elk://x.x.x.x disconnected
I tried putting the config code back in and results are absolutely identical to what I have shared above (i.e., Elk is discovered, a box shows that allows me to choose “non-secure” port, but it fails with the exact message indicated above).
It’s great to see there’s activity on this integration. With the help of Home Assistant, I’m finally getting around to cleaning my 12+ year old automations The ElkM1G is a big part of it all.
I just submitted a couple of issues to github in the hopes they’ll get some attention.
For anyone who may be monitoring the issue I submitted, I believe it has made its way here, and if I am reading this correctly, a fix is headed for implementation with the next version of Home Assistant (2022.4.1). Thanks again go to bdraco for all his work on this!
Since I can’t buy you a coffee, let me keep going with the thanks! I think it is pretty amazing that you and other Home Assistant volunteers like you are willing to devote yourself to improving HA, for those of us who are unable to do so and don’t have your programming skills. For my part, I can express that I totally and completely appreciate your work, particularly as it relates to a tool (Elk) that helps keep me and family safe.
I’m using the serial interface on my Elk M1 and may be getting a similar error to what was reported by others; i.e. disconnected
Logger: elkm1_lib.elk
Source: /usr/local/lib/python3.9/site-packages/elkm1_lib/elk.py:123
First occurred: 1:53:59 AM (6 occurrences)
Last logged: 1:55:23 AM
ElkM1 at serial:///dev/ttyS0:115200 disconnected
I can confirm this integration works fine with HA OS 6.2, core-2021.9.5 and supervisor-2022.04.0. Is there any current workaround?
@tfmeier Please open a Sign in to GitHub · GitHub with the logs as Glenn suggests so we can tell for sure how to solve the issue you are seeing with the serial connection.
Yes, guys. Just opened that issue on GitHub. This is the first issue I opened for Home Assistant so hopefully I’ve done it correctly. Thanks for your help on this!