InEnduringGrowStrong@sh.itjust.works

For anything important, use matrix instead of lemmy DMs.

  • 0 Posts
  • 170 Comments
Joined 1 year ago
cake
Cake day: June 22nd, 2023

help-circle

  • Some subjects you might wanna look into.

    1. NAT hairpin, also called NAT loopback If you’re sending packets to your ISP’s public IP from inside your LAN and it fails, your ISP modem (or whichever device does the NAT, probably doesn’t support NAT hairpin.

    2. Split-horizon DNS That’s when you configure your own DNS for your hosted services, but with a different config on your LAN (which would point towards your services LAN IP) and another config with your public DNS provider (which would point to your public IP)

    3. Carrier NAT This could break your chances of having a reachable service as they likely won’t make a port forwarding rule for you in their stuff.

    4. IPv6 address types Link-local addresses are within fe80::/10 (kinda similar to how 169.254.0.0/24 is used in ipv4). This IP wouldn’t be reachable from the outside.
      Global unicast addresses are all in 2000::/3, this would be reachable from the outside.

    5.IPv6 DNS Make sure to configure both A (ipv4) and AAAA (ipv6) records with the right info. Although if your LAN devices only have ipv4 addresses and you’re doing Split-horizon, you could theoretically omit the AAAA on your LAN

    1. Phone DNS shenanigans.
      Some recent phones ignore the DNS they receive through DHCP and instead use something like Google’s which breaks split-horizon and can confuse troubleshooting. This wasn’t in the SSID settings, but in a global “private DNS” setting.

    As for your problems, it depends.
    There might be a way to make this work without the VPS, but I don’t have all the info.
    That said, a VPS or something like a cloudflare tunnel could come in handy. I usually prefer to host directly but still, that’s an option if port forwarding doesn’t work with your ISP.
    You’d configure the DNS for your services to the VPS IP and configure the VPS to reach your stuff.
    Using the VPS kinda also gets rid of NAT hairpin problems although it is inefficient to go through the VPS from the LAN with the downside of not working when your Internet is down.
    You can still use the VPS and Split-horizon DNS if you wanna have local availability from your LAN when your Internet is down.

    Good luck











  • Oh… I think you also need double quotes around template brackets when used as the value in a service call…? Which conflicts with the quotes around the entity and attribute so just use single quotes there.

    brightness_pct: "{{state_attr('light.kitchen_sink_ceiling', 'brightness')}}"
    

    Just whipped up a partial example with my living room lights. It is missing a trigger and an else butI focused on theactionyou had trouble with.
    Using brightness instead of brightness_pct seemed simpler. (Or at least if both can usethe same attribute…)

    alias: Example
    description: ""
    trigger: []
    condition:
      - condition: state
        entity_id: light.living_room_floor_lamp_1
        state: "on"
    action:
      - action: light.turn_on
        metadata: {}
        data_template:
          brightness: "{{state_attr('light.living_room_floor_lamp_1', 'brightness')}}"
        target:
          entity_id: light.living_room_floor_lamp_2
    mode: single
    








  • The router polling integration is probably a bit superfluous for devices that have the companion app installed.
    Although, it’s still helpful for other devices like guests’ phones, or non android/ios devices.

    Not sure how helpfully to your use case these will be, but a few ideas…

    It’s been a while since I tinkered, but I think you can also assign multiple devices to a person and track the person’s presence instead of a specific device.
    You can also create a group of persons, which is handy for some use cases.

    As an example, I have a group.us which contains person.me and person.mypartner. The group’s status is home if either of us are home and only changes to away if neither of us are home.

    Similarly, I have a group.guests which contains guests who sometimes spend the night.
    If any guests are home, my goodnight automation ignores the bathroom and the guest bedroom lights.

    group.guests:

    entity_id:
      - input_text.manual_guest_tracker
      - person.guest
      - person.fren
      - person.otherfren
      - person.olefren
      - person.stepbro
      - person.nephew
      - person.cousin
      - person.niece
    order: 3
    icon: mdi:bag-carry-on
    friendly_name: Guests
    

    I have an input boolean that changes input_text.manual_guest_tracker to home/not_home if we wanna enable “guests mode” without having to track a device.

    Single person with multiple trackers:
    person.fren:

    editable: true
    id: fren
    device_trackers:
      - device_tracker.applewafren
      - device_tracker.iphonefren
    friendly_name: Fren