Menu

Tree [r458] /
 History

HTTPS access


File Date Author Commit
 ESPHome 2023-11-28 psfales [r439] Cleanup yaml file
 docs 2022-12-17 psfales [r408]
 ha 2025-02-08 psfales [r455]
 html 2017-06-08 psfales [r194] add php directory
 net 2017-01-26 psfales [r127] Update host name
 tcc 2023-08-02 psfales [r421] Update
 ub 2016-04-30 psfales [r27] Add ding.ub
 watchdog 2022-10-17 psfales [r399] Add /etc/watchdog.conf
 zwavejs2mqtt 2022-10-16 psfales [r398] Add zwavejs2mqtt config directory
 01-local.rules 2022-10-18 psfales [r404] Fix rules
 Makefile 2023-10-11 psfales [r426] Update for bookworm
 README 2024-10-08 psfales [r448] Add rust build info
 README-hass 2025-05-09 psfales [r458]
 README-octoprint 2025-05-09 psfales [r456]
 analog_test.c 2018-01-19 psfales [r248] Add comments
 blinker.c 2016-05-10 psfales [r63] indent
 blinker.sh 2016-05-22 psfales [r100] Make files executable
 checkdst.c 2016-05-10 psfales [r63] indent
 checkmqtt.c 2022-10-17 psfales [r399] Add /etc/watchdog.conf
 checknet.c 2020-04-13 psfales [r335] Update debug message
 checkrooms.c 2023-11-28 psfales [r436] Add more info on status screen
 config.txt 2016-11-01 psfales [r117] Add config.txt
 cron.script 2024-11-04 psfales [r452] Retry reading temp if first attemps fail
 data.c 2016-05-10 psfales [r64] porting
 docker-compose.yml 2022-04-22 psfales [r372] Initial version
 flash.sh 2016-05-22 psfales [r100] Make files executable
 flashloop.sh 2016-05-22 psfales [r100] Make files executable
 func.c 2024-11-04 psfales [r453] Add function to recalculate sunset times and ad...
 funcs.h 2024-11-04 psfales [r453] Add function to recalculate sunset times and ad...
 hc-init-script 2024-01-16 psfales [r441] Debugging why speaker doesn't work after reboot
 hc.c 2024-11-04 psfales [r453] Add function to recalculate sunset times and ad...
 hc.h 2022-04-11 psfales [r366] Compile fixes for stretch
 hc.service 2018-04-12 psfales [r270] updates to start hc service
 hc_shot.jpg 2016-05-02 psfales [r48] add
 hcnet.h 2020-04-09 psfales [r331] change cmd_timer
 homeassistant.service 2023-10-16 psfales [r428] Update 3.10 to 3.11
 i2ctest.c 2016-05-10 psfales [r63] indent
 intruder.c 2019-08-19 psfales [r312] Disable intruder detection for now, at least un...
 led_test.c 2018-01-19 psfales [r246] Speed up blink rate
 life360.sh 2017-12-01 psfales [r236] Add life360 support scripts
 life360d.sh 2017-12-01 psfales [r236] Add life360 support scripts
 light.sh 2017-08-12 psfales [r213] Save light tools
 lightloop.sh 2017-08-12 psfales [r213] Save light tools
 log.c 2017-04-05 psfales [r165] Publish all log messages
 message.c 2016-05-11 psfales [r70] Handle messages when curses not started yet
 mqtt_test.c 2017-04-04 psfales [r164] Remove leading / from topics per MQTT best prac...
 mysql_test.c 2022-10-18 psfales [r402] Fix bullseye compile
 mywrite.c 2022-04-11 psfales [r365] Fixes for buster (should be backward compatible?)
 p011_test.c 2016-05-17 psfales [r93] Performance benchmark
 parallel_test.c 2018-04-19 psfales [r272] Fix warning message
 pi-flash.sh 2016-05-22 psfales [r100] Make files executable
 pi-test.sh 2016-05-22 psfales [r100] Make files executable
 plix_test.c 2017-06-23 psfales [r200] Flag 14 as well as 13
 plot.sh 2016-10-20 psfales [r115] Update hallwy lockout time calculation
 protos.h 2018-01-19 psfales [r247] Fix compile warnings
 psfx10.h 2017-06-24 psfales [r202] Change front porch light from A13 to A14
 route.script 2024-11-04 psfales [r451] Add script to reset default route
 save-yaml.sh 2020-03-24 psfales [r327] Add storage directory
 say.c 2022-04-11 psfales [r365] Fixes for buster (should be backward compatible?)
 saytime.c 2016-05-10 psfales [r63] indent
 start_hass.sh 2019-11-22 psfales [r322] Add stop script
 stop_hass.sh 2019-11-22 psfales [r322] Add stop script
 sunsets.c 2016-05-10 psfales [r63] indent
 thermo.c 2018-01-01 psfales [r243] Fix bug that was preventing the reporting of te...
 trap.c 2016-05-01 psfales [r38] Fix indents
 usleep.c 2016-05-10 psfales [r63] indent
 watch.sh 2016-05-22 psfales [r100] Make files executable
 wpi.c 2016-05-10 psfales [r63] indent
 x10.h 2016-04-30 psfales [r35] Update house/key codes

Read Me

# This is the working copy of the code to control the Raspberry Pi
# based home control system.   Feel free to contact 
# pi-hc@fales-lorenz.net for information, but it's not likely to 
# be directly useful to most folks due the dependence on custom
# hardware.   (But if you need to have a Raspberry Pi controlling
# X-10 modules through a PL-513/TW-523, let's talk!)

# raspi-config
# System Options -> Boot/Auto Login -> Desktop Autologin
# Interface Options - ssh (if not already enabled), i2c, spi, vnc
# Localisation Options -> Locale en_US.UTF8, timezone, WiFi country
# enable ssh, i2c, spi

# Install these packages on the pi
apt-get -y update
apt-get -y upgrade
apt-get -y install libglib2.0 libglib2.0-dev libi2c-dev i2c-tools
apt-get -y install indent subversion git libncurses5-dev ksh
apt-get -y install mosquitto mosquitto-dev mosquitto-clients libmosquitto1 libmosquitto-dev
# pre-stretch
apt-get -y install libmysqlclient-dev
# stretch through buster
apt-get -y install libmariadbclient-dev
# buster and later
apt-get -y install libmariadb-dev-compat

apt-get -y install gnuplot imagemagick chkconfig screen digitemp cython3
# If available..?
apt-get -y install  cython
sudo apt-get -y  purge libreoffice wolfram-engine sonic-pi scratch
# These were needed for av (around HA 0.101.3)
apt-get -y install libavcodec-dev libavdevice-dev libavfilter-dev \
	libavformat-dev libavresample-dev libavutil-dev libswscale-dev \
	libffi6
apt-get -y install chkconfig digitemp screen libatlas3-base watchdog
apt-get -y install  docker.io docker-compose jq jshon
# Buster 
apt-get -y install libjpeg62-turbo-devel

sudo apt-get -y autoremove

# Install pi-code-hc software
svn checkout --username=psfales svn+ssh://psfales@svn.code.sf.net/p/pi-hc/code/ pi-hc-code

# In /etc/rc.local, add "touch /forcefsck:

	sudo sed -i -e 's/^exit 0/touch forcefsck; exit 0;/' /etc/rc.local
# This seems to break the latest kernel build
#/usr/local/bin/watchdog-simple

# Install wiringPi
 git clone https://github.com/WiringPi/WiringPi.git
 cd WiringPi
 ./build

# Install hc-init-script in /etc/init.d/hc
 cp hc-init-script /etc/init.d/hc
 cp hc.service /etc/systemd/system
 chkconfig hc on
 service hc start

# After upgrade to buster "chkconfig hc on" does not work. But, this did:
 systemctl enable hc 

# Compare saved config.txt with system

# Add 01-local.rules to /etc/udev/rules.d
cp 01-local.rules /etc/udev/rules.d/

# Configure /etc/hostname

# Configure ssh keys for users root and pi

# Run this command to create .digitemprc and put it in /root
digitemp_DS9097U -s /dev/temp -i

# Add this line to "crontab -e" to read the temperatures once per minute
# and store the results in the /root/curtemp file
* * * * * /root/pi-hc-code/cron.script

useradd -m -s /bin/ksh homeassistant

# Add systemd service
cp homeassistant.service /etc/systemd/system/home-assistant@homeassistant.service


# Install rust (required starting around October 2021)
# Run as "homeassistant" user (not root)

curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
(Errors on reinstall until I first did "rustup self uninstall")

# Install rpi-clone for command line cloning
# From https://github.com/billw2/rpi-clone

# This is broken for bookworm:
#$ git clone https://github.com/billw2/rpi-clone.git 
# But the fork works:
$ git clone https://github.com/framps/rpi-clone.git

$ cd rpi-clone
$ sudo cp rpi-clone rpi-clone-setup /usr/local/sbin
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.