MKOZAQ Engineer's Log

Mensa's apps. Pi-hole in Docker and Home Assistant

Mensa's apps

Last week, I was obsessed with Mensa’s app IQ Check. For some questions, it was pretty difficult to find the pattern. No, I'm not a genius, so I cheated by taking screenshots for the hardest questions, and then staring at them until the solution was obvious to me.

Check also Mensa Brain Training app. It's pretty amazing and has no ads.


Pi-hole in Docker

I upgraded my Raspberry Pi to "Bullseye", and I couldn't get Pi-hole running anymore because of some conflict with port 53 and DNS resolver.

I erased everything and flashed a new image. Now I run Pi-hole from docker. I'll just put here - more for me not losing it - the docker-compose.yml config file. Thanks, Brain Wilson.

My own tweaks.

version: "3.7"
services:
  pihole:
    # Runs a DNS server to blackhole advertising
    # It has a management interface running on port 80,
    # so we want to proxy it.
    # We are NOT running DHCP so port 67 is not exposed.
    container_name: pihole
    image: pihole/pihole:latest
    networks:
      - proxy_net
    expose:
      - "80"
    ports:
      - "53:53/tcp"
      - "53:53/udp"
      - "443:443/tcp"
      - "80:80/tcp"
    # Recommended but not required (DHCP needs NET_ADMIN)
    #   https://github.com/pi-hole/docker-pi-hole#note-on-capabilities
    cap_add:
      - NET_ADMIN
    env_file: .env
    environment:
      VIRTUAL_HOST: "pi.hole"
      TZ: 'Europe/Bucharest'
      WEBPASSWORD: 'xxxx'
      ServerIP: "192.168.1.2"
      # Quad9
      DNS1: "9.9.9.9"
      DNS2: "149.112.112.112"
      NETWORK_ACCESS: internal
    dns:
      - "1.1.1.1"
      - "1.0.0.1"
    volumes:
       - type: volume
         source: pihole_etc
         target: /etc/pihole/
         read_only: false
       - type: volume
         source: pihole_dnsmasq
         target: /etc/dnsmasq.d/
         read_only: false
    restart: unless-stopped

volumes:
    pihole_etc:
      name: pihole_etc

    pihole_dnsmasq:
      name: pihole_dnsmasq

    static_content:
      name: proxy_static_content
    
networks:
  proxy_net:
    name: proxy_net

Home Assistant

Also, this weekend, I switched my home automation platform from OpenHAB to Home Assistant. It’s more intuitive and easy to use. The phone app offers me the possibility to check if that person is in the home area. If we are not home, I created an automation that puts the heating in Away mode and turns off all the lights.

← BACK NEXT →