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

Gateway address parsing #312

Open
artemovechkin opened this issue Oct 23, 2023 · 5 comments
Open

Gateway address parsing #312

artemovechkin opened this issue Oct 23, 2023 · 5 comments

Comments

@artemovechkin
Copy link

Hi,
thanks for the functionality of the library, but is it possible to add information about gateway addresses applicable to each tag in the resulting json file?

@farmio
Copy link
Member

farmio commented Oct 23, 2023

Hi 👋!
What gateway addresses and tags do you mean? Can you give an example?

@artemovechkin
Copy link
Author

artemovechkin commented Oct 23, 2023

Here is an example of an xml part from knxproj

<DeviceInstance Id="P-0354-0_DI-13" Address="0" Name="" ProductRefId="M-0002_H-2CDG.20110.20175.20R0011-2_P-2CDG.20110.20175.20R0011" Hardware2ProgramRefId="M-0002_H-2CDG.20110.20175.20R0011-2_HP-A0A9-10-5056" Comment="" Description="5A2" SerialNumber="AALwjf9S" ApplicationProgramLoaded="true" CommunicationPartLoaded="true" IndividualAddressLoaded="true" MediumConfigLoaded="true" ParametersLoaded="true" IsActivityCalculated="true" LastModified="2023-09-13T12:41:58.3234284Z" LastDownload="2023-09-15T08:02:15.3102938Z" LastUsedAPDULength="15" ReadMaxRoutingAPDULength="56" Puid="74">
<ParameterInstanceRefs>
<ParameterInstanceRef RefId="M-0002_A-A0A9-10-5056_UP-19_R-19" Value="1"/>
<ParameterInstanceRef RefId="M-0002_A-A0A9-10-5056_UP-4_R-4" Value="1"/>
<ParameterInstanceRef RefId="M-0002_A-A0A9-10-5056_UP-5_R-5" Value="1"/>
<ParameterInstanceRef RefId="M-0002_A-A0A9-10-5056_UP-20_R-20" Value="1"/>
</ParameterInstanceRefs>
<AdditionalAddresses>
<Address Address="5" Name=""/>
<Address Address="6" Name=""/>
<Address Address="7" Name=""/>
<Address Address="8" Name=""/>
<Address Address="9" Name=""/>
</AdditionalAddresses>
<IPConfig Assign="Fixed" IPAddress="10.2.155.72" SubnetMask="255.255.255.224" DefaultGateway="10.2.155.65" MACAddress="00:0C:DE:98:82:50"/>
<Security SequenceNumber="0" SequenceNumberTimestamp="2023-09-15T08:02:15.3153012Z"/>
</DeviceInstance>

<IPConfig Assign="Fixed" IPAddress="10.2.155.72" – it would be great to get information about this and other IP addresses in the json upload

For example, as a suggestion, somewhere an additional field in this structure:

"group_addresses": {
        "3/0/0": {
            "name": "MFB_L05_4o5o24_M1_Position",
            "identifier": "GA-1",
            "raw_address": 6144,
            "address": "3/0/0",
            "project_uid": 632,
            "dpt": {
                "main": 5,
                "sub": 1
            },
            "communication_object_ids": [
                "6.0.1/O-12_R-61"
            ],
            "description": "",
            "comment": ""
        },

@farmio
Copy link
Member

farmio commented Oct 23, 2023

🤔 I guess many interfaces will not have a fixed IP address, but use DHCP. But parsing the security infos along with the IP infos may come handy.

You can always use Knx IP discovery to find current interface information in a live installation.

The second part I don't understand. What would group addresses have to do with interfaces in that context?

@artemovechkin
Copy link
Author

🤔 I guess many interfaces will not have a fixed IP address, but use DHCP. But parsing the security infos along with the IP infos may come handy.

You can always use Knx IP discovery to find current interface information in a live installation.

The second part I don't understand. What would group addresses have to do with interfaces in that context?

In the second part, I mean that through the interfaces we get access to certain group addresses. And each interface corresponds to n number of such addresses.
How do I find out through which of the interfaces available in the project we get access to specific group addresses of the project?

For example , we have several interfaces with IP addresses in our project (more than one): 10.0.5.65, 10.0.5.68, 10.1.5.70, 10.1.5.71. And let's assume 1000 group addresses in total.
How do I map these group addresses to interfaces?

@farmio
Copy link
Member

farmio commented Oct 24, 2023

Ah I see. So you can always look up the devices in the same line as the interface in the topology tree. Then look up their used communication objects and linked GAs. That will yield GAs that the interface can see for sure. But it wouldn't take couplers / routers into account.
So if you want a comprehensive list of all GAs an interface can communicate with, you'd essentially need to create coupler filter tables.
This however goes beyond the current scope of this project (which is residential building projects for use in Home Assistant). If you like to explore that by yourself, contributions are of course welcome 😃

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

No branches or pull requests

2 participants