Skip to content
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

Documentation for LCN integration is unclear about specifying the "LCN address" #36573

Open
MartinH-open opened this issue Dec 27, 2024 · 5 comments

Comments

@MartinH-open
Copy link

Feedback

Documentation for LCN integration ist referecing "LCN address" at multiple location but the specification of such LCN address is unclear. The attached link https://www.home-assistant.io/integrations/lcn#lcn-addresses goes nowhere.
Examples often use the address value: myhome.0.7
Is this the format to use ?
The dev tools present examples like this : myhome.s0.m7
Elsewhere the address of a LCN module is displayed as m000007
What is the correct way to specify the "LCN address" or how can I define such a value as a variable?

URL

https://www.home-assistant.io/integrations/lcn/

Version

2024.12.5

Additional information

Any hint would be helpful - thanks.

@home-assistant
Copy link

Hey there @alengwenus, mind taking a look at this feedback as it has been labeled with an integration (lcn) you are listed as a code owner for? Thanks!

Code owner commands

Code owners of lcn can trigger bot actions by commenting:

  • @home-assistant close Closes the feedback.
  • @home-assistant rename Awesome new title Renames the feedback.
  • @home-assistant reopen Reopen the feedback.
  • @home-assistant unassign lcn Removes the current integration label and assignees on the feedback, add the integration domain after the command.
  • @home-assistant add-label needs-more-information Add a label (needs-more-information) to the feedback.
  • @home-assistant remove-label needs-more-information Remove a label (needs-more-information) on the feedback.

@MartinH-open
Copy link
Author

From the code I see some logic how the "LCN address" syntax is defined.
It appears to have 3 parts seperated by "." (dot):

  1. the connection id which is the name of the LCN integration instance. If you name it "myhome" (instead of "pchk") then this configuration name "myhome" is considered as the first part.
  2. the LCN segment id number (id is up to 3 digit integer number). This can be prefixed with "s" for better readability.
  3. the LCN module or group id number (id is up to 3 digit integer number). This has to be prefixed with "g" if a group ist meant; else a module id number is considered per default or indicated by an "m" prefix.

This example "myhome.s0.m7" ist a valid "LCN address" for the LCN integration named "myhome". This addresses the LCN modul (m) with id 007 in the LCN segment 0.

@alengwenus
Copy link
Contributor

The syntax is exactly as you described: IntegrationTilte.sS.mM where S is the segment id and M is the module id. If a group should be adressed, the mM has to be replaced by gG.
Regarding the addresses, the documentation is currently a bit flaky. The reason for this is that the address syntax described above will be marked as deprecated with the next HA version and will be removed in a few months.
Addressing LCN modules in automations via YAML will then be done via the HA internal device id. The device id is a unique string given by HA to each hardware device independent of the manufacturer.
Personally I am not a big fan of this way of addressing the module, but it's HA's intended way of addressing hardware devices. Unfortunately, all my efforts to keep the old addressing method were rejected by the core developers.

Well, the major advantage of the device id is that it makes creating automations from the UI very convenient. And in fact you will never see the device id itself, when just working with the UI.

If you still do need the device id for an automation written in YAML, you can find it out by selecting the LCN device in the automation editor and then switching the editing mode to YAML.

@MartinH-open
Copy link
Author

Thanks for explaining! (And MANY thanks for this great LCN integration !!!)
In principle I like the above referencing schema - once I understand the syntax now.
Actually - my longer term wish is to derived the whole HA YAML file from the LCN PRO file (perhaps with a bit of extra configuration file). Well - I will see ..
How will the transition work to the future (when?) addressing schema? How can I prepare for it or already use it by when?

@alengwenus
Copy link
Contributor

Just a comment to the YAML configuration: In recent versions the LCN integration is not configured via YAML anymore (but solely using the UI). I already wrote an import for the LCN PRO XMLs but realized that the information stored in those XMLs is not "feature complete" to restore the whole setup. That's why I put it on hold.

Btw.: In the LCN forum I saw that you have several problems using the integration (especially using the send keys command and setting up climate entities...). I'd like to help you with that. Could you perhaps write me an email (the address is in my GitHub profile - German is fine!) so I can ask you a few questions about that in private? As an alternative you could also write me a DM in the HomeAssistant forum: https://community.home-assistant.io/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants