KNX connection

Is it possible to use two KNX networks (two home + common service) each equipped with its own IP-router connected on the same LAN network?
Thank you

When you say “common service” I think they are connected and the routers use the same mcast group so just treat ha as another common service. You can use routing to communicate with the 2 routers directly or tunneling if you have an extra knx interface on the common line/area.

If you want to set a specific physical address for HA you will have to use xknx config file .

Good morning Matthias
I set the xknx.yaml configuration file as you indicated: HA activates the following entities: light, sensor, switch but the entity climate is not generated (it is not available in the states menu)
I used the following string:


climate:
96_veranda_int: {group_address_temperature: ‘6/3/0’, group_address_target_temperature: ‘1/6/0’, group_address_temperature_state: ‘6/0/0’}

HA does not report configuration errors.
How can I solve it?
Thank you

I have not tried this, but I think you can set the devices as usual in the HA configuration.yaml even when you are setting connection parameters in xknx.yaml .
Have you tried to load your xknx.yaml in a local python interpreter with xknx imported? you should get at least a error message.
Maybe it helps to lower the log-level of knx in HA to find out what is wrong in the config.

Hi Matthias
I have never used the python interpreter to interact with HA libraries: can you give me directions or links to tutorials that explain how to do this?
Also how to lower the log-level of knx in HA?
Thank you

Log level: Activate debug log for KNX

To check your configuration locally with xknx (the underlying library that HA uses for knx) have a look at https://xknx.io (especially https://xknx.io/configuration ). No HA is needed for this - so you can do it on any pc with python3 installed:

# install xknx
pip3 install xknx
# then start a python interpreter by 
python3
# import xknx 
>>> from xknx import XKNX
# load your configuration
>>> xknx = XKNX(config='xknx.yaml')
# if you like you can test the connectoin as well
>>> xknx.start()
# and stop it again
>>> xknx.stop()

If you are willing to share your xknx.yaml I can test it for you to see if there are any errors while parsing.

Hi Matthias
I thank you for your availability and I am attaching xknx.yaml files and image of the results to the test with python interpreter.
Thank you!

general:
  own_address: '15.15.241'

connection:
#  auto:
#  tunneling:
#    gateway_ip: '192.168.10.96'
#    gateway_port: 3671
#    local_ip: '192.168.10.240'
  tunneling:
    gateway_ip: '192.168.10.96'
    gateway_port: 3671
    local_ip: '192.168.10.240

groups:
  switch:
    com_testina_risc_C1_veranda_int: {group_address: '1/2/0'}
    com_testina_risc_C1_veranda_est: {group_address: '1/2/1'}
    com_testina_risc_C2_cucina: {group_address: '1/2/2'}
    com_testina_risc_C2_sala_ingr: {group_address: '1/2/3'}
    com_testina_risc_C2_studio: {group_address: '1/2/4'}
    com_testina_risc_C2_lavanderia: {group_address: '1/2/5'}
    com_testina_risc_C2_bagnoPT: {group_address: '1/2/6'}
    com_testina_risc_C3_camera_sopp: {group_address: '1/2/7'}
    com_testina_risc_C3_camera_matr: {group_address: '1/2/8'}
    com_testina_risc_C3_camera_LE: {group_address: '1/2/9'}
    com_testina_risc_C3_camera_bagnoPP: {group_address: '1/2/10'}

    com_aspiratoreWC96: {group_address: '1/3/1'}
    apertura_porta_ingresso96: {group_address: '1/3/2'}

    com_testina_risc_C1_veranda: {group_address: '2/2/0'}
    com_testina_risc_C1_cucina: {group_address: '2/2/1'}
    com_testina_risc_C2_bagnoPT: {group_address: '2/2/2'}
    com_testina_risc_C2_lavanderia: {group_address: '2/2/3'}
    com_testina_risc_C2_studio: {group_address: '2/2/4'}
    com_testina_risc_C2_ingresso: {group_address: '2/2/5'}
    com_testina_risc_C2_saletta: {group_address: '2/2/6'}
    com_testina_risc_C3_camera_ospiti: {group_address: '2/2/7'}
    com_testina_risc_C3_camera_matr: {group_address: '2/2/8'}
    com_testina_risc_C3_camera_da_div2: {group_address: '2/2/9'}
    com_testina_risc_C3_camera_da_div3: {group_address: '2/2/10'}
    com_testina_risc_C3_bagnoPP: {group_address: '2/2/11'}

    com_aspiratoreWC98: {group_address: '2/3/1'}
    apertura_porta_ingresso98: {group_address: '2/3/2'}

#--------------------

    VMC96_L1: {group_address: '3/3/1'}
    VMC96_L2: {group_address: '3/3/2'}
    VMC96_L3: {group_address: '3/3/3'}
    VMC98_L1: {group_address: '3/3/4'}
    VMC98_L2: {group_address: '3/3/5'}
    VMC98_L3: {group_address: '3/3/6'}
    apri_cancello_mot96: {group_address: '3/3/7'}
    blocca_cancello_mot96: {group_address: '3/3/8'}
    apri_cancello_ped96: {group_address: '3/3/9'}
    apri_cancello_mot98: {group_address: '3/3/10'}
    blocca_cancello_mot98: {group_address: '3/3/11'}
    apri_cancello_ped98: {group_address: '3/3/12'}
    pompa_vasca98: {group_address: '3/3/13'}
    pompa_vasca96: {group_address: '3/3/14'}
    pompa_pozzo: {group_address: '3/3/15'}
    EV_riep_acq_vasca96: {group_address: '3/3/16'}
    EV_riep_acq_vasca98: {group_address: '3/3/17'}
    EV_riep_pozzo_vasca96: {group_address: '3/3/18'}
    EV_riep_pozzo_vasca98: {group_address: '3/3/19'}
    consenso_riemp_vasca96: {group_address: '3/3/20'}
    consenso_riemp_vasca98: {group_address: '3/3/21'}
    apri_canc_mot98_pulsanti: {group_address: '3/3/22'}
    96_irr_z1: {group_address: '3/3/23'}
    96_irr_z2: {group_address: '3/3/24'}
    96_irr_z3: {group_address: '3/3/25'}
    96_irr_z4: {group_address: '3/3/26'}
    98_irr_z1: {group_address: '3/3/27'}
    98_irr_z2: {group_address: '3/3/28'}
    98_irr_z3: {group_address: '3/3/29'}
    98_irr_z4: {group_address: '3/3/30'}

#    switch 2:
#   _pompa_vasca98: {group_address: '3/3/14'}
  light:
    96_L01_porta_ingresso: {group_address_switch: '1/1/1', group_address_switch_state: '6/5/1'}
    96_L02_studio: {group_address_switch: '1/1/2', group_address_switch_state: '6/5/2'}
    96_L03_studio_scrivania: {group_address_switch: '1/1/3', group_address_switch_state: '6/5/3'}
    96_L04_studio_scrivania: {group_address_switch: '1/1/4', group_address_switch_state: '6/5/4'}
    96_L05_sala_ingresso_pareti: {group_address_switch: '1/1/5', group_address_switch_state: '6/5/5'}
    96_L06_sala_ingresso: {group_address_switch: '1/1/6', group_address_switch_state: '6/5/6'}
    96_L07_dis_bagnoPT: {group_address_switch: '1/1/7', group_address_switch_state: '6/5/7'}
    96_L08_bagnoPT: {group_address_switch: '1/1/8', group_address_switch_state: '6/5/8'}
    96_L09_bagnoPT_specchio: {group_address_switch: '1/1/9', group_address_switch_state: '6/5/9'}
    96_L10_lavanderia: {group_address_switch: '1/1/10', group_address_switch_state: '6/5/10'}
    96_L11_vano_tecnico: {group_address_switch: '1/1/11', group_address_switch_state: '6/5/11'}
    96_L12_cucina: {group_address_switch: '1/1/12', group_address_switch_state: '6/5/12'}
    96_L13_veranda_interno: {group_address_switch: '1/1/13', group_address_switch_state: '6/5/13'}
    96_L14_veranda2_esterno: {group_address_switch: '1/1/14', group_address_switch_state: '6/5/14'}
    96_L15_esterna_lato_int: {group_address_switch: '1/1/15', group_address_switch_state: '6/5/15'}
    96_L16_esterna_lato_FAE: {group_address_switch: '1/1/16', group_address_switch_state: '6/5/16'}
    96_L17_Portico: {group_address_switch: '1/1/17', group_address_switch_state: '6/5/17'}
    96_L18_disPP_parete: {group_address_switch: '1/1/18', group_address_switch_state: '6/5/18'}
    96_L19_bagnoPP: {group_address_switch: '1/1/19', group_address_switch_state: '6/5/19'}
    96_L20_bagnoPP_specchio: {group_address_switch: '1/1/20', group_address_switch_state: '6/5/20'}
    96_L21_camera_soppalcata: {group_address_switch: '1/1/21', group_address_switch_state: '6/5/21'}
    96_L22_camera_sopp_testataSN: {group_address_switch: '1/1/22', group_address_switch_state: '6/5/22'}
    96_L23_camera_sopp_testataDX: {group_address_switch: '1/1/23', group_address_switch_state: '6/5/23'}
    96_L24_camera_LE: {group_address_switch: '1/1/24', group_address_switch_state: '6/5/24'}
    96_L25_camera_LE_testataSN: {group_address_switch: '1/1/25', group_address_switch_state: '6/5/25'}
    96_L26_camera_LE_testataDX: {group_address_switch: '1/1/26', group_address_switch_state: '6/5/26'}
    96_L27_camera_matrimoniale: {group_address_switch: '1/1/27', group_address_switch_state: '6/5/27'}
    96_L28_camera_matr_soppalco: {group_address_switch: '1/1/28', group_address_switch_state: '6/5/28'}
    96_L29_vano_scala: {group_address_switch: '1/1/29', group_address_switch_state: '6/5/29'}
    96_L30_camera_matr_testataSN: {group_address_switch: '1/1/30', group_address_switch_state: '6/5/30'}
    96_L31_camera_LE_scrivania: {group_address_switch: '1/1/31', group_address_switch_state: '6/5/31'}
    96_L32_soppalco: {group_address_switch: '1/1/32', group_address_switch_state: '6/5/32'}
    96_L33_soppalco_testata: {group_address_switch: '1/1/33', group_address_switch_state: '6/5/33'}
    96_L34_camera_matr_armadi: {group_address_switch: '1/1/34', group_address_switch_state: '6/5/34'}
    96_L35_camera_matr_testataDX: {group_address_switch: '1/1/35', group_address_switch_state: '6/5/35'}
    96_L36_camera_matr_scrivania: {group_address_switch: '1/1/36', group_address_switch_state: '6/5/36'}
    96_L37_sala_ingresso_scrivania: {group_address_switch: '1/1/37', group_address_switch_state: '6/5/37'}
#--------------------------------
    98_L01_porta_ingresso: {group_address_switch: '2/1/1', group_address_switch_state: '8/5/1'}
    98_L02_corridoioPT: {group_address_switch: '2/1/2', group_address_switch_state: '8/5/2'}
    98_L03_vano_tecnico: {group_address_switch: '2/1/3', group_address_switch_state: '8/5/3'}
    98_L04_studio: {group_address_switch: '2/1/4', group_address_switch_state: '8/5/4'}
    98_L05_studio_scrivania: {group_address_switch: '2/1/5', group_address_switch_state: '8/5/5'}
    98_L06_studio_scrivania: {group_address_switch: '2/1/6', group_address_switch_state: '8/5/6'}
    98_L07_saletta: {group_address_switch: '2/1/7', group_address_switch_state: '8/5/7'}
    98_L08_cucina: {group_address_switch: '2/1/8', group_address_switch_state: '8/5/8'}
    98_L09_veranda: {group_address_switch: '2/1/9', group_address_switch_state: '8/5/9'}
    98_L10_bagnoPT: {group_address_switch: '2/1/10', group_address_switch_state: '8/5/10'}
    98_L11_bagnoPT_specchio: {group_address_switch: '2/1/11', group_address_switch_state: '8/5/11'}
    98_L12_lavanderia: {group_address_switch: '2/1/12', group_address_switch_state: '8/5/12'}
    98_L13_esterna_lato_int: {group_address_switch: '2/1/13', group_address_switch_state: '8/5/13'}
    98_L14_portico: {group_address_switch: '2/1/14', group_address_switch_state: '8/5/14'}
    98_L15_saletta_scrivania: {group_address_switch: '2/1/15', group_address_switch_state: '8/5/15'}
    98_L16_vano_scala_centrale: {group_address_switch: '2/1/16', group_address_switch_state: '8/5/16'}
    98_L17_bagnoPP: {group_address_switch: '2/1/17', group_address_switch_state: '8/5/17'}
    98_L18_bagnoPP_specchio: {group_address_switch: '2/1/18', group_address_switch_state: '8/5/18'}
    98_L19_camera_da_dividere: {group_address_switch: '2/1/19', group_address_switch_state: '8/5/19'}
    98_L20_camera_da_dividere_non_usata: {group_address_switch: '2/1/20', group_address_switch_state: '8/5/20'}
    98_L21_disPP: {group_address_switch: '2/1/21', group_address_switch_state: '8/5/21'}
    98_L22_camera_matrimoniale: {group_address_switch: '2/1/22', group_address_switch_state: '8/5/22'}
    98_L23_camera_matrimoniale_testataSN: {group_address_switch: '2/1/23', group_address_switch_state: '8/5/23'}
    98_L24_camera_matrimoniale_testataDX: {group_address_switch: '2/1/24', group_address_switch_state: '8/5/24'}
    98_L25_camera_ospiti: {group_address_switch: '2/1/25', group_address_switch_state: '8/5/25'}
    98_L26_camera_ospiti_testataDX: {group_address_switch: '2/1/26', group_address_switch_state: '8/5/26'}
    98_L27_camera_ospiti_testataSN: {group_address_switch: '2/1/27', group_address_switch_state: '8/5/27'}
    98_L28_camera_da_div_testataDX: {group_address_switch: '2/1/28', group_address_switch_state: '8/5/28'}
    98_L29_camera_da_div_testataSN: {group_address_switch: '2/1/29', group_address_switch_state: '8/5/29'}
    98_L30_camera_matr_cabina: {group_address_switch: '2/1/30', group_address_switch_state: '8/5/30'}
    98_L31_camera_ospiti_scrivania: {group_address_switch: '2/1/31', group_address_switch_state: '8/5/31'}
 
#--------------------------------
    Li1_fila_latoFAE: {group_address_switch: '3/1/1', group_address_switch_state: '9/5/1'}
    Li2_fila_lato_chiesa: {group_address_switch: '3/1/2', group_address_switch_state: '9/5/2'}
    Li3_esterno: {group_address_switch: '3/1/3', group_address_switch_state: '9/5/3'}
    Li4_zona_macchine: {group_address_switch: '3/1/4', group_address_switch_state: '9/5/4'}
    LA_esterna_lato_strada: {group_address_switch: '3/1/5', group_address_switch_state: '9/5/5'}
    LB_esterna_latoFAE: {group_address_switch: '3/1/6', group_address_switch_state: '9/5/6'}
    LC_esterna_lato_torre: {group_address_switch: '3/1/7', group_address_switch_state: '9/5/7'}
    LD_esterna_lato_chiesa: {group_address_switch: '3/1/8', group_address_switch_state: '9/5/8'}
    LE_esterna_strada_capannone: {group_address_switch: '3/1/9', group_address_switch_state: '9/5/9'}
    LF_esterna_parcheggio_latoFAE: {group_address_switch: '3/1/10', group_address_switch_state: '9/5/10'}
    LG_esterna_parcheggio_lato_chiesa: {group_address_switch: '3/1/11', group_address_switch_state: '9/5/11'}
 


  climate:
    #96_Veranda_int: {temperature_address: '6/3/0', target_temperature_address: '1/6/0', target_temperature_state_address: '6/0/0'}
     96_Veranda_int: {group_address_temperature: '6/3/0',group_address_target_temperature: '1/6/0', group_address_target_temperature_state: '6/0/0'}
     98_Veranda: {group_address_temperature: '8/3/0',group_address_target_temperature: '2/6/0', group_address_target_temperature_state: '8/0/0'}

  sensor:
    SAN96_calda: {group_address_state: '3/4/1', value_type: '2byte_unsigned'}
    SAN96_fredda: {group_address_state: '3/4/2', value_type: '2byte_unsigned'}
    SAN96_ricircolo: {group_address_state: '3/4/3', value_type: '2byte_unsigned'}
    SAN98_calda: {group_address_state: '3/4/5', value_type: '2byte_unsigned'}
    SAN98_fredda: {group_address_state: '3/4/6', value_type: '2byte_unsigned'}
    SAN98_ricircolo: {group_address_state: '3/4/7', value_type: '2byte_unsigned'}
    96_cisterna: {group_address_state: '3/4/9', value_type: '2byte_unsigned'}
    98_cisterna: {group_address_state: '3/4/10', value_type: '2byte_unsigned'}
    96_riscaldamento: {group_address_state: '3/4/11', value_type: '2byte_unsigned'}
    98_riscaldamento: {group_address_state: '3/4/12', value_type: '2byte_unsigned'}
    FV_produzione_L1: {group_address_state: '3/4/13', value_type: 'power'}
    FV_produzione_L2: {group_address_state: '3/4/14', value_type: 'power'}
    FV_produzione_L3: {group_address_state: '3/4/15', value_type: 'power'}
    prelievo_servizi_L1: {group_address_state: '3/4/16', value_type: 'power'}
    prelievo_servizi_L2: {group_address_state: '3/4/17', value_type: 'power'}
    prelievo_servizi_L3: {group_address_state: '3/4/18', value_type: 'power'}
    96_ordinaria: {group_address_state: '3/4/19', value_type: 'power'}
    96_privilegiata: {group_address_state: '3/4/20', value_type: 'power'}
    98_ordinaria: {group_address_state: '3/4/21', value_type: 'power'}
    98_privilegiata: {group_address_state: '3/4/22', value_type: 'power'}
    potenza_PDC: {group_address_state: '3/4/23', value_type: 'power'}
    potenza_pompe_irrigazione: {group_address_state: '3/4/24', value_type: 'power'}
    potenza_imp_riscaldamento: {group_address_state: '3/4/25', value_type: 'power'}

Oh im sorry. It should be from xknx import XKNX instead of just import xknx To avoid colliding names.
The other error is some windows related encoding of your file path - I can’t really help out here. Maybe start python from the path where your yaml is and omit the full path.

I have now tested your yaml.
After adding a 'to local_ip: '192.168.10.240 I got no errors. Both climate devices are loaded to xknx. They should be availabe in HA as well :thinking:

Hi Matthias
I tried to access it using the config file xknx.yaml: now it sees the entity climate but does not communicate with them (they always remain in the “off” state). Then in the configuration.yaml file I simply put the instance knx: then to access the entity I put

platform knx:
name: --------
address: ---------
etc.
So everything seems to work (lights, switches, climate)
Thank you for your directions
See you soon
Thank you!