Scratchpad for Homelab
Apr 17, 2020
Huy Le
4 minute read
PROJECT LAYOUT

Initial setup #

  • hassio running on VM
    • esphome installed

Network info #

iw dev - will show you all the wireless interface names

Flashing using Tuya Convert #

  • pulled image and build as Tuya-convert instructions

  • after pull did docker-compose exec tuya bash

    • will enable interaction to the container
    • run it the container and see the screen
      • do screen -ls to see all the screen running
      • do screen -r to attach to the screen to see the info
        • all of this is sitting in the base /usr/bin/tuya-convert/script/*.log file too
  • Connect phone to vflash network

  • you can leave the power on, and the devices connected

    • put the switch into connecting mode, press and hold
      • i turned off the load/light after if it does come on
  • once tasmota web server has been started

    • log in to it, provide it your SSid to your network so you can log on on the computer to upload the ESP firmware

      • special notes - becare if your devices are on different subnet and vlans
    • and upload compiled binary from ESPhome to get the switch to convert over to ESPHome firmware

Flash esphome #

Setting up Unifi Network #

  • reset all devices

Home lab setup #

https://mtlynch.io/building-a-vm-homelab/ https://computingforgeeks.com/complete-installation-of-kvmqemu-and-virt-manager-on-arch-linux-and-manjaro/ https://medium.com/@calerogers/gpu-virtualization-with-kvm-qemu-63ca98a6a172 https://davidyat.es/2016/09/08/gpu-passthrough/#part-0-what-you-ll-need

QNAP #

QNAP will always be running to support the network

  • OpenVPN

    • Users are able to log into network
    • Use LDAP server for domain users
  • data storage for network

  • Container apps

    • Unifi Controler - Bridge Mode Interface - 10.1.10.3
    • NodeRed
  • VM

    • pfSense

      • PiHole also?
    • HASSIO - Manjaro

      • user: hassio
      • password: hassio

IoT #

TODO Don’t know what this ia #

  • ☐ get a overlay network between all the docker hosts

    • this would be between hass and guardian
    • for an overlay network we need docker swarm
  • ☐ convert dimmer to using tuya convert

for guacamole https://gist.github.com/nicoulaj/cbf475ea34f227fb650083c711ec8f14 good site to learn more about networking, hass, and tinkering

Setup so far #

Mananger:

  • overlay net named traefik-public - run traefik2 - run postgres - run

guacamole Woker1 - hass:

  • trying to get to the overlay net - might need to look up multi-hostn

networking - https://docs.docker.com/swarm/multi-host-networking/ solution to swarm-overlay-network with docker-compose

getting traerfik to work on overlay network how to get docker and swarm

getting swarm up and running: - https://docs.docker.com/network/network-tutorial-overlay/ - https://docs.traefik.io/v1.7/user-guide/swarm/ setting static ip to unifi - IS THIS NECESSARY? - containers register itself as static

saving homeassistant configurations #

https://github.com/doismellburning/homeassistant-config

Network Debugging #

traceroute google.com or tracepath google.com: - gives us the path - traceroute is more powerful than tracepath get network map using nmap - not a standard tool on linux nmap -sP 10.1.10.0/24 will get a mapping of the 10.1.10.0-255 network get network map and operating system - it’ll tell you the hostname, and all the open ports nmap -sT -O 10.1.10.0/24

mtr: another good tool ## interfaces ip addr will get you the ip address of your interfaces sudo ifdown <interface name> - bring down your interface sudo ifup <interface name>- bring up your interface ## DNS you can specify the DNS for each interface

  auto eth0
  iface eth0 inet dhcp
  dns-nameservers 94.237.127.9

firewall settings #

sudo iptables -L

# References gerneral linux server checks
- docker compose stack all together

Docker compose home assistant #

https://github.com/dmpanch/hassio-rpi4-docker-compose

Adding USB remember to add into “dialout” group #

Moving HASSIO from amd64 to Arm-aarch64 #

had to remove all the old add one and install new one (looks like update does it too)

  • aarch64 did not work, had to go with armv7
  • lights keep turning on and off, due to wrong ip address for MQTT server

Troubleshooting HASS #

Resetting user password #

since we are running in docker with HASSIO to change the password require us to be in the “Operating system terminal” this means direct access to hassio_cli

  • docker exec -it hassio_cli /bin/bash
  • ha authentication reset --username "user" --password "password"

Network Wired connection running at slow speed #

  • path laptop –> usb hub –> cat5e connector –> cat6 cable –> cat5e connector –> wall plate –> cat6 –> patch panel –> switch
  • problem comes in with the cat6 cable and two cat5e connectors


comments powered by Disqus