-
-
Notifications
You must be signed in to change notification settings - Fork 30.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Can not add two secure instances of Elk M1 when using TLS 1.2 #81516
Comments
Hey there @gwww, @bdraco, mind taking a look at this issue as it has been labeled with an integration ( Code owner commandsCode owners of
(message by CodeOwnersMention) elkm1 documentation |
Well that seems like a bug! Based on the image it looks like you are using the discovered workflow. Could you try adding them not using the discovered devices and see what happens. |
If you mean add integration select Elk select IP then it does the same thing |
Can you supply a debug log. Add the following to your configuration.yaml:
|
Integration error: logs - Integration 'logs' not found. |
Just a tiny typo
|
Invalid config for [logger]: [homeassistant.components.elkm1] is an invalid option for [logger]. Check: logger->logger->homeassistant.components.elkm1. (See /config/configuration.yaml, line 7).
From: J. Nick Koston ***@***.***>
Sent: Thursday, November 3, 2022 8:10 PM
To: home-assistant/core ***@***.***>
Cc: yestrdave ***@***.***>; Author ***@***.***>
Subject: Re: [home-assistant/core] Can not add two secure instances of Elk M1 (Issue #81516)
Just a tiny typo
logger:
homeassistant.components.elkm1: debug
https://www.home-assistant.io/integrations/logger/
—
Reply to this email directly, view it on GitHub<#81516 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWMXKFPXE2QLJARMLDULNGLWGRH4RANCNFSM6AAAAAARWUJKVQ>.
You are receiving this because you authored the thread.Message ID: ***@***.******@***.***>>
|
logger: this work? |
Sorry for my "typo"; I cut/paste from a non-reliable source. Doh. When editing If you hover over the text below a little "Copy to clipboard" icon will pop up in the upper right.
|
doesn't seam to give me much when I try to configure 2022-11-03 20:15:47.579 DEBUG (MainThread) [homeassistant.components.elkm1] Creating elk entities for <elkm1_lib.elk.Elk object at 0x7f05223e3f10> |
192.168.91.11 is the one I want to configure |
Start with neither ElkM1 configured and then add them. Send that log. |
I've done that a couple times. doesnt seam to show in logs |
Does it matter which order you add them in? Is it always the same IP address that fails? |
here is an add non secure and it works 2022-11-03 20:43:51.038 INFO (MainThread) [elkm1_lib.connection] Connecting to ElkM1 at elk://192.168.91.11 |
No it does not matter what order |
Ive tried everything it doesnt want to spit out a log |
No worries. I'll ask again if I can't make progress. |
@bdraco I can't figure out why this is happening (at least without add more debug logs). The only place I see the reported error message is here: https://github.com/home-assistant/core/blob/dev/homeassistant/components/elkm1/config_flow.py#L244 As I understand it, one Elk is discovered and added. The second discovered Elk throws this error. The images supplied show that. Do you have ideas? |
I wrote test to make sure we can add multiple instances and couldn't find a problem. @yestrdave Is it possible there is a disabled or ignored instance already set up that is blocking the creation of the new one? |
Pretty sure that’s not possible. I’ve duplicated on two different servers and the order doesn’t matter. I’ll go into the test server and go through the testing again to make sure.. Since the order does matter it eliminates the set up in the ElKRP too. I will go through and document this shortly. As a last resort I could fire up a fresh vmm and try also. |
Just ran the test in a docker container and same result |
Since you can run this on clean docker installs, could you do this:
Send us the 3 files. Make sure to remove your password from the files. @bdraco I think this is useful. I don't know the internals really at all, does this request make sense? |
Ignore last message, at least for now. I have added some more debug messages to the code. You will have to install the Elk integration as a custom component. Copy the If you need help setting up Also replace your debug logging directives to the following:
After those two things are done:
|
Used notepad plus to redact . Can save any format ya like. Here is a text file. Ill read up on Fenced code blocks |
A text file is perfect. Use code blocks when pasting text in to a comment. I’ll take a look at the log in a bit. On my phone at the moment. |
I'm narrowing in! I see a problem but don't understand why yet. Could you copy the code again from dropbox and rerun the test. I added one more log message. |
on it |
I found the problem! No need for you to continue at this point. Once I have a fix I will get you to test it as a custom_component. @bdraco |
ok its done if you want it |
My devotion is getting overruled by spouse at the moment ;) I'll be back later today with a fix. I know what to fix, just trying to find the best way. |
The log confirms what I thought. Thanks. |
My spouse is traveling for a couple days. I get to "geek out" uninterrupted today....lol |
yarl doesn't seem to work either
|
Every library I can find chokes on the |
The best I could do was to make a new function that partitioned the url at |
All I do in the Elk library is just use split. The urls are simple in all cases. Interested to know if the new test you wrote would work with the 1.2 scheme. (I’m out on a hike. I can fix this tonight if you haven’t got to it) |
I’ll push something up soon. I’m super jet lagged as I just did a 3 day turn to Europe and back so make sure to double check whatever I write 😬 |
There’s this: https://github.com/gwww/elkm1/blob/main/elkm1_lib/util.py#L27 would work |
Nice. Will use that instead |
fixed in #81627 I use the function from the lib to parse the url |
@yestrdave the new patch release 2022.11.2 is out with this fix. |
Thanks Glenn. Traveling until next week. I’ll try it out then.
Thanks DaveR
…________________________________
From: Glenn Waters ***@***.***>
Sent: Tuesday, November 8, 2022 9:30:07 PM
To: home-assistant/core ***@***.***>
Cc: yestrdave ***@***.***>; Mention ***@***.***>
Subject: Re: [home-assistant/core] Can not add two secure instances of Elk M1 when using TLS 1.2 (Issue #81516)
@yestrdave<https://github.com/yestrdave> the new patch release 2022.11.2 is out with this fix.
—
Reply to this email directly, view it on GitHub<#81516 (comment)>, or unsubscribe<https://github.com/notifications/unsubscribe-auth/AWMXKFLUG65V76W3WYMBZITWHMEC7ANCNFSM6AAAAAARWUJKVQ>.
You are receiving this because you were mentioned.Message ID: ***@***.***>
|
Glenn and Nick we can close this one. I was able to VPN in from hotel and install second instance with no issues. Thank you both |
Thanks for confirming 👍 |
The problem
I have two Elk M1 Golds. I can add one device secured and one non secured into HA with no issue. If two secured devices are to attempted to be added, the first secured device will add and the second will yield the following message “An ElkM1 with this address is already configured”
Home Assistant 2022.11.1
Supervisor 2022.10.2
Operating System 9.3
Frontend 20221102.1 - latest
What version of Home Assistant Core has the issue?
2022.11.1
What was the last working version of Home Assistant Core?
unknown
What type of installation are you running?
Home Assistant Supervised
Integration causing the issue
Elk M1
Link to integration documentation on our website
https://www.home-assistant.io/integrations/elkm1
Diagnostics information
No response
Example YAML snippet
No response
Anything in the logs that might be useful for us?
Additional information
I will be happy to provide additional information. Just not sure on this one.
The text was updated successfully, but these errors were encountered: