custom-components / remote_homeassistant

Links multiple home-assistant instances together
Apache License 2.0
911 stars 81 forks source link

Main system has an IP change - How do I change on remote #265

Open petez69 opened 10 months ago

petez69 commented 10 months ago

Hi Folks

I need to change the IP address on my remote instance to connect to a different address. I cannot find any entries relating to the IP address on the remote instance.

Help please as I DO NOT want to delete and re-enter all of my entities...

Thankyou..Peter

FrankGiesecke commented 9 months ago

Hi, I have a similar problem. I started my integration using the DNS name to access the remote host. During a network crash, I realized, that all instances are disconnected without a running DNS server.

So how can I switch the configuration from DNS to IP?

fiasko commented 8 months ago

I have the same issue as petz69 has.

petez69 commented 8 months ago

Ok I worked it out. You delete the connection on the primary server….You install the remote addon again and enter the details of the remote machine…..Add your devices to the same area and you will see all of your entites as before….Ended up being simple, there is no intuiative way…..

From: Asko @.> Sent: Thursday, 15 February 2024 9:00 PM To: custom-components/remote_homeassistant @.> Cc: petez69 @.>; Author @.> Subject: Re: [custom-components/remote_homeassistant] Main system has an IP change - How do I change on remote (Issue #265)

I have the same issue as petz69 has.

— Reply to this email directly, view it on GitHub https://github.com/custom-components/remote_homeassistant/issues/265#issuecomment-1945908562 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AEDBPAJIKLAZ2QOHVMVQ3PTYTXWU3AVCNFSM6AAAAABARH6TZKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSNBVHEYDQNJWGI . You are receiving this because you authored the thread. https://github.com/notifications/beacon/AEDBPAJQAH347XKGLRLLHDDYTXWU3A5CNFSM6AAAAABARH6TZKWGG33NNVSW45C7OR4XAZNMJFZXG5LFINXW23LFNZ2KUY3PNVWWK3TUL5UWJTTT7Q2VE.gif Message ID: @. @.> >

Trolann commented 2 months ago

Adding to help:

{% for domain in states | groupby('domain') %}
  {% set entities = states[domain[0]] | selectattr('entity_id', 'search', '\.prefix_') | list %}
  {% if entities %}
{{ domain[0] }}:
{% for entity in entities %}
{{ entity.entity_id }}
{% endfor %}

  {% endif %}
{% endfor %}

Where .prefix_ is the entity prefix, if you gave it in your current config. From there, copy/paste to Notepad++, remove newlines and you can easily compare before/after you do the above reconfiguration to enusre everything is back.

jaym25 commented 2 months ago

Unfortunately, it is not intuitive in that situation. I have many hand selected remote entities and devices being monitored from my main instance and I am using a separate YAML config file for RHA for that reason. I find it easier to make changes there where I can see everything.

In my configuration.yaml

  ### Packages Folder    
  packages: !include_dir_named packages

In my packages folder remote_homeassistant.yaml. It looks like this with about 60 entities ...

homeassistant:
  customize:
    input_boolean.office_siren:
      friendly_name: Alarm Bell - Office
    input_boolean.office_email:
      friendly_name: Email All Events - Office
    input_boolean.office_guest_mode:
      friendly_name: Guest Mode - Office
    switch.office_z_wave_plug_1:
      friendly_name: Floor Lamp - Office
    sensor.office_doorbell_siren_battery_level:
      friendly_name: Office Siren-Alarm Battery
    sensor.office_ups_battery_charge:
      friendly_name: Office UPS Battery
    sensor.office_ups_status_data:
      friendly_name: Office UPS Status Data
    sensor.office_front_door_battery:
      friendly_name: Office Front Door Battery
    sensor.office_screen_door_battery:
      friendly_name: Office Screen Door Battery
   etc....

remote_homeassistant:
  # Office HomeAssistant
  instances:
  - host: !secret remote_ha_host
    port: 443
    secure: true
    verify_ssl: true
    access_token: !secret remote_ha_token
    entity_prefix: "office_"
    service_prefix: "office_"
    # entity_friendly_name_prefix: ""
    # max_message_size: 16*1024*1024
    include:
      entities:
      - entity 1
      - entity 2
      - etc....