Skip to content

Commit bbbb614

Browse files
authored
Merge pull request #35 from theyosh/feature/power_dimmer
Feature/power dimmer
2 parents c4ed2d9 + ed1817e commit bbbb614

24 files changed

+1187
-732
lines changed

CHANGELOG.md

Lines changed: 59 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,64 @@ Changelog
22
=========
33

44

5-
2.8.2 (2017-10-21)
5+
(unreleased)
66
------------
77

8+
**New**
9+
- Add sqlite3 dependency for manual database manupilation. [TheYOSH]
10+
- Added webcam update timeout. Webcams are now only updated once a
11+
minute. Should reduce the load and makes the enginge a bit faster.
12+
[TheYOSH]
13+
- Add extra dimming timing for small changes. [TheYOSH]
14+
- Add PI power user to total power usage. [TheYOSH]
15+
- Added missing translation fields. [TheYOSH]
16+
- Add dimmer settings processing and saving to config file. [TheYOSH]
17+
- Add dimmer support part 1. [TheYOSH]
18+
19+
**Fixes**
20+
- Fix empty graphs. [TheYOSH]
21+
- Fixed missing translation in home dashboard. [#33](https://github.com/theyosh/TerrariumPI/issues/33). [TheYOSH]
22+
- Fix timer issues [#34](https://github.com/theyosh/TerrariumPI/issues/34). [TheYOSH]
23+
- Fix graphing empty graphs and smaller dimmer knob. [TheYOSH]
24+
- Fixed total duration calculation in total power usage. [TheYOSH]
25+
- Fix switch loading without dimmer settings. [TheYOSH]
26+
- Fix switch toggle to support dimmers. [TheYOSH]
27+
- Fix switch toggle to support dimmers. [TheYOSH]
28+
- Fix devision by zero. [TheYOSH]
29+
- Fix SQL duplicate key error. [TheYOSH]
30+
31+
**Updates**
32+
- Update version number. [TheYOSH]
33+
- Update engine loop to make sure at least one run per minute is
34+
possible. Should prevent spicky graphs. [TheYOSH]
35+
- Update environment dashboard modus names [#34](https://github.com/theyosh/TerrariumPI/issues/34). [TheYOSH]
36+
- Update translations. [TheYOSH]
37+
- Update readme. [TheYOSH]
38+
- Update readme. [TheYOSH]
39+
- Update power duration calculation. [TheYOSH]
40+
- Updated installation so it works faster and handles upgrades better.
41+
[TheYOSH]
42+
- Updated data logging and graphing. Reduced load on the client side.
43+
[TheYOSH]
44+
- Update gentelella. [TheYOSH]
45+
- Updated dimmer settings in switch settings page. [TheYOSH]
46+
- Updated supported hardware page. [TheYOSH]
47+
48+
**Other**
49+
- Collector code clean up and better data storage and retrieval.
50+
[TheYOSH]
51+
- Merge branch 'master' into feature/power_dimmer. [TheYOSH]
52+
- Trying to add more stability for dimming hardware. [TheYOSH]
53+
- Remove unused settings for non dimmer switches. [TheYOSH]
54+
- Make PI user restart PiGPIOd process. [TheYOSH]
55+
- Enable pigpiod service at reboot. [TheYOSH]
56+
- Better on and off detection for dimmers. [TheYOSH]
57+
- Merge branch 'master' into feature/power_dimmer. [TheYOSH]
58+
59+
60+
2.8.2 (2017-10-21)
61+
------------------
62+
863
**New**
964
- Add sync command. [TheYOSH]
1065

@@ -15,6 +70,7 @@ Changelog
1570
- Fix HTML code in Dutch translation. Was broke in usage page. [TheYOSH]
1671

1772
**Updates**
73+
- Update changelog. [TheYOSH]
1874
- Update version number. [TheYOSH]
1975
- Update README.md. [TheYOSH]
2076
- Update README.md. [TheYOSH]
@@ -453,3 +509,5 @@ Changelog
453509
- Typo. [TheYOSH]
454510
- Moved door status to own page. [TheYOSH]
455511
- Use system default pip. [TheYOSH]
512+
513+

README.md

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,33 @@
1-
# TerrariumPI 2.8.2
2-
Software for cheap home automation of your reptile terrarium or any other enclosed environment. With this software you are able to control an enclosed environment so that the temperature and humidity is of a constant value. This is done by using temperature and humidity sensors and realy switches to activate external devices.
1+
# TerrariumPI 3.0.0
2+
Software for cheap home automation of your reptile terrarium or any other enclosed environment. With this software you are able to control for example a terrarium so that the temperature and humidity is of a constant value. Controlling the temperature can be done with heat lights, external heating or cooling system. As long as there is one temperature sensor available the software is able to keep a constant temperature.
33

4-
It has support for lights, sprayer, heater and cooler equipment. The amount of devices that can be controlled depends on the used relay boards.
4+
For humidity control there is support for a spraying system. The sprayer can be configured to spray for an X amount of seconds and there is a minumal period between two spray actions. Use at least one humitidy sensors to get a constant humidity value.
5+
6+
The software is that flexible that there is no limit in amount of sensors, relay boards or door sensors. The usage can be endless.
57

68
Think off:
7-
- Terrarium
9+
- Terrarium (wet of dry)
810
- Aquarium
11+
- Tanks with animals or plants
912
- Growhouse
1013

1114
And all this is controlled with a nice webinterface based on [Gentelella a Bootstrap 3 template](https://github.com/puikinsh/gentelella/).
1215
## Features
1316
- Controlling electronic devices like lights, sprayers, heating and cooling equipment
14-
- Reading out temperature and humidity sensors
15-
- Open door detection (sprayer will not spray when a door is open)
17+
- Support for dimming electronic devices
18+
- Manual dimming through web interface
19+
- Predefined on and off durations
20+
- Predefined on and off dimming percentages
21+
- Reading out multiple temperature and humidity sensors
1622
- Support for native Raspberry Pi cam out of the box
1723
- Support for USB and remote webcams
24+
- Open door detection (sprayer will not spray when a door is open)
1825
- Total power and water usage for costs calculation
1926
- Lights control based on sun rise and sun set or timers
20-
- Rain control based on measured humidity
27+
- Rain control based on humidity sensors and timers
2128
- Heater control based on temperature sensors or timers
2229
- Cooling control based on temperature sensors or timers
23-
- Weather forecast from external source
30+
- Weather forecast from external source for lighting schema
2431
- Temperatures in Celsius or Fahrenheit
2532
- Alarm detections
2633

@@ -61,18 +68,21 @@ This updating is based on that the software is installed with the steps in the I
6168
`cd TerrariumPI`
6269
3. Update the new code with git
6370
`git pull`
71+
4. Re-run the installation script in order to update software dependencies
72+
`sudo ./install.sh`
6473
4. Restart TerrariumPI according to: https://github.com/theyosh/TerrariumPI/wiki/FAQ#how-to-restart-terrariumpi
6574

6675
Now clear your browser cache and reload the webinterface. A brand new version should be running.
6776

6877
## Hardware
69-
This software requires a Raspberry Pi and some extra hardware in order to run and work. The bare minimun is
78+
This software requires a Raspberry Pi and some extra hardware in order to run and work. The bare minimun and tested hardware is
7079
- Raspberry PI
7180
- Pi 2
7281
- Pi 3
7382
- Power relay board
7483
- USB versions (Serial and Bitbang)
7584
- GPIO versions
85+
- PWM Dimmer versions
7686
- Temperature/humdity sensors DHT11, DHT22, AM2303, DS1820, HIH4000, etc through
7787
- OWFS
7888
- GPIO

defaults.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[terrariumpi]
22
host = ::
33
port = 8090
4-
version = 2.8.2
4+
version = 3.0.0
55
title = TerrariumPI %(version)s
66
power_usage = 5
77
owfs_port = 4304

install.sh

Lines changed: 24 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -15,38 +15,44 @@ apt-get -y autoremove
1515
# Install required packages to get the terrarium software running
1616
aptitude -y update
1717
aptitude -y safe-upgrade
18-
aptitude -y install libftdi1 screen python-imaging python-dateutil python-ow python-rpi.gpio python-psutil git subversion watchdog build-essential python-dev python-picamera python-opencv python-pip
19-
20-
if [ `ls -l gentelella | grep -v ^t | wc -l` -eq 0 ]; then
21-
# Manual get Gentelella bootstrap 3 template
22-
git clone https://github.com/puikinsh/gentelella.git gentelella
23-
fi
24-
25-
cd ..
18+
aptitude -y install libftdi1 screen python-imaging python-dateutil python-ow python-rpi.gpio python-psutil git subversion watchdog build-essential python-dev python-picamera python-opencv python-pip python-pigpio i2c-tools owfs ow-shell sqlite3
2619

2720
# Basic config:
2821
raspi-config
2922

3023
# Set the timezone
3124
dpkg-reconfigure tzdata
3225

26+
if [ `ls -l gentelella | grep -v ^t | wc -l` -eq 0 ]; then
27+
# Manual get Gentelella bootstrap 3 template
28+
git clone https://github.com/puikinsh/gentelella.git gentelella
29+
fi
30+
31+
cd gentelella
32+
git pull
33+
cd "${BASEDIR}/.."
34+
3335
# Install multiple python modules
34-
pip install --upgrade gevent untangle uptime bottle bottle_websocket
36+
pip install --upgrade gevent untangle uptime bottle bottle_websocket pylibftdi
3537

3638
# Install https://pypi.python.org/pypi/pylibftdi
3739
# Docu https://pylibftdi.readthedocs.io/
38-
pip install --upgrade pylibftdi
3940
# Make sure that the normal Pi user can read and write to the usb driver
4041
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6001", GROUP="dialout", MODE="0660"' > /etc/udev/rules.d/99-libftdi.rules
4142
echo 'SUBSYSTEMS=="usb", ATTRS{idVendor}=="0403", ATTRS{idProduct}=="6014", GROUP="dialout", MODE="0660"' >> /etc/udev/rules.d/99-libftdi.rules
4243

4344
# Install 1 Wire stuff
44-
aptitude -y install i2c-tools owfs ow-shell
4545
sed -i.bak 's/^server: FAKE = DS18S20,DS2405/#server: FAKE = DS18S20,DS2405/' /etc/owfs.conf
46-
echo "server: device=/dev/i2c-1" >> /etc/owfs.conf
46+
47+
if [ `grep -ic "server: device=/dev/i2c-1" /etc/owfs.conf` -eq 0 ]; then
48+
echo "server: device=/dev/i2c-1" >> /etc/owfs.conf
49+
fi
4750

4851
sed -i.bak 's/^blacklist i2c-bcm2708/#blacklist i2c-bcm2708/' /etc/modprobe.d/raspi-blacklist.conf
49-
echo "i2c-dev" >> /etc/modules
52+
if [ `grep -ic "i2c-dev" /etc/modules` -eq 0 ]; then
53+
echo "i2c-dev" >> /etc/modules
54+
fi
55+
5056
modprobe i2c-bcm2708
5157
modprobe i2c-dev
5258

@@ -58,6 +64,7 @@ fi
5864
cd Adafruit_Python_DHT
5965
git pull
6066
sudo python setup.py install
67+
cd "${BASEDIR}/.."
6168

6269
# Remove unneeded OWS services
6370
update-rc.d -f owftpd remove
@@ -71,7 +78,10 @@ fi
7178
groupadd gpio 2> /dev/null
7279
usermod -a -G gpio pi 2> /dev/null
7380

74-
sync
81+
# Make sure pigpiod is started at boot, and that user PI can restart it with sudo command
82+
echo "pi ALL=(ALL) NOPASSWD: /usr/sbin/service pigpiod restart" > /etc/sudoers.d/terrariumpi
83+
systemctl enable pigpiod
7584

7685
# We are done!
86+
sync
7787
echo "Instaltion is done. Please reboot once to get the I2C and Adafruit DHT libary working correctly"
1.5 KB
Binary file not shown.

0 commit comments

Comments
 (0)