Smart Home

Table of Contents

Intro

My Smart Home wiki page.  

This includes links to other pages that I have made

I have been making lots smart home type  wiki pages over the years, so made this page to tie them all together, and include more info on my latest methods.

 
Some of the pages are incomplete, may try to finish them but making no promises.

I started my Smart home projects years ago, bought my first zwave switches in 2007.   Really was ahead of my time, had limited use back then.  I integrated with my harmony zwave capable remote so I could use my ht remote to control lights too, but otherwise not much I could do.

Fast forward to 2022.  I have a smart home with integration into my pool/spa, sprinklers, HVAC, many lights, outdoor lighting, garage door, washing machine monitoring, doorbell alerts, refrigerator and freezer open alerts, security cams, etc.  Always new stuff I want to add, but its pretty extensive now.  And I have an Alexa interface so I can ask Alexa to do many things around the house.  But not with the standard Alexa app, I use Node Red for my Alexa interface for more flexibility and less reliance on Amazon.

Links

ESPHome

Home Assistant


IOTstack (installs most of my smart home programs)

Docker

MQTT

Node Red (with sublinks for Sony TV, Windows, Directv, Roku and below
Alexa
NR Update

Tuya Local

Zwave

Zigbee

IR

Tasmota
LIRC (read IR into Pi) (old, using Tasmota instead)

       

ESP 

Leak Detector

Security Cams  (needs update)

Pool Automation

Misc Pi Info

disk info

df-h

lsblk -fp

sudo fdisk -l


Filesize of folders

ncdu -x <some folder>


cd ~/

ncdu -x IOTstack

cntl c to exit

Delete file

sudo rm filename


Drive Speed check

sudo apt-get install hdparm

sudo hdparm -Tt /dev/sda


Mount usb drive

Reference link

More info

EXT4 Drive

Make a directory to use as mount point

sudo mkdir /mnt/usbstick

cd /mnt/usbstick

Plug in USB drive, then get info and its UUID

df -h

sudo blkid

To manually mount

sudo mount /dev/sda1 /mnt/usbstick

Unmount

sudo umount /mnt/usbstick


For automatic mounting

Get UUID

sudo blkid


Edit fstab file

sudo nano /etc/fstab

Add this line to fstab, replace UUID with one from above

Note that my UUID was much longer than this example

This assumes usb disk is formatted as ext4:

UUID=FC05-DF26 /mnt/usbstick ext4 defaults,auto,users,rw,nofail 0 0

Test

sudo mount -a

Check

df -h

and check line, make sure you see /mnt/usbdisk at end

/dev/sda1       230G   60M  218G   1% /mnt/usbstick



Exfat drive

Not sure if reboot is necessary.  df -h doesn't list it, but fdisk -l does

sudo apt install exfat-fuse

sudo reboot

check for drive

sudo fdisk -l

manual mount command

sudo mount -t exfat /dev/sda1 /mnt/usbstick


sudo blkid

Note the uuid for your drive

Edit fstab file

sudo nano /etc/fstab

Add this line to fstab, replace UUID with one from above

UUID=1AC1-887E /mnt/usbstick exfat defaults,auto,users,rw,nofail 0 0

Test

sudo mount -a


Asus router NAS Mounting

Old Info (mostly for Netgear router)

Asus router setup

From webpage  at https://router.asus.com:8443/Main_Login.asp

login, then go to USB Application on left, then Servers Center, then top for Network Place (Samba) Share / Cloud Disk

Enable share.  

I also enable guest because I have my network locked down.

I gave it a device name of rt-86u.  This is used in mount statements

Click apply at bottom

Select Media Server on top

I added my directories with media here to make them accessible.

Click apply at bottom


There is a directory called 2gb on my usb drive I want to share

I tested in browser to make sure I could get to 

smb://rt-86u/2gb


Now make mount directory in pi

cd /mnt

sudo mkdir rt-86u

cd /mnt/rt-86u

Mount the drive now, manually

sudo mount -t cifs //rt-86u/2gb /mnt/rt-86u -o guest,vers="1.0"

Check to see if drive mounted

cd ..

ls rt-86u

If it didn't work, you could try this version.  Above worked for me

sudo mount -t cifs //rt-86u/2gb /mnt/rt-86u -o guest,vers="1.0",sec=ntlmv2


Note that I mounted 2gb directory on USB SSD attached to Asus to /mnt/rt-86u

To make it work permanently after a power cycle, you need to edit fstab

cd /etc

sudo nano fstab

Add this line to fstab:

//rt-86u/2gb /mnt/rt-86u      cifs     guest,x-systemd.automount,x-systemd.device-timeout=60,vers=1.0    0     0

Test by rebooting pi, or by this:

sudo mount -a