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

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 #


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 -
    • 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 good site to learn more about networking, hass, and tinkering

Setup so far #


  • 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 - 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: - - setting static ip to unifi - IS THIS NECESSARY? - containers register itself as static

saving homeassistant configurations #

Network Debugging #

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

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

firewall settings #

sudo iptables -L

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

Docker compose home assistant #

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