-
-
Notifications
You must be signed in to change notification settings - Fork 100
FAQ
This FAQ is for TerrariumPI version 3.X only! For TerrariumPI version 4.x go https://theyosh.github.io/TerrariumPI/faq/
The default login name is admin with password password. Make sure you change it after installation at the system setting page.
- Login with the user pi.
- sudo service terriumpi start
The software is running in a screen session
- Login with the user pi.
- Go to the installation directory
cd ~/TerrariumPi
- Start with
sudo ./start.sh
- Login with the user pi.
- sudo service terriumpi stop
The software is running in a screen session
- Login with the user pi.
- Run the command
screen -r
. This will give a new terminal. - Press
Ctrl+c
twice within 10 seconds.
- Login with the user pi.
- sudo service terriumpi restart
The software is running in a screen session
- Login with the user pi.
- Run the command
screen -r
. This will give a new terminal. - Press
Ctrl+c
and wait 10 seconds. - Use
Ctrl+a
and then a singled'
to close the screen session and logout of your Pi
- Login with the user pi.
- sudo service terriumpi stop
- Go to the installation directory
cd ~/TerrariumPi
- Start with
sudo ./start.sh
The software is running in a screen session
- Login with the user pi.
- Run the command
screen -r
. This will give a new terminal. - Here there could be errors. Mail them or make an issue with the contents of the error.
- Use
Ctrl+a
and then a singled
to close the screen session and logout of your Pi
It is also possible to use Systemd for starting and stopping TerrariumPI. In order to use Systemd follow the steps below. This is for Python3 only.
- sudo ln -s /home/pi/TerrariumPI/contrib/terrariumpi.service /lib/systemd/system/terrariumpi.service
- sudo systemctl daemon-reload
- sudo systemctl enable terrariumpi
- Add a '#' for the line '/home/pi/TerrariumPI/start.sh' in /etc/rc.local (do not remove the line!)
If you are running the software for a while, it is handy to backup some files in case of SD card corruption or any other reason that you have to reinstall the software. So here is a list of files that should be saved at a regular basis:
- settings.cfg
- notifications.cfg
- history.db
- description.txt
- logging.custom.cfg (optional)
In order to run the software on Python 3.5 or higher, the installer has to be run with an extra parameter. This is needed in order to install all the needed Pytho 3.5+ modules.
After that, the start up command in the file /etc/rc.local
needs to be adjusted. By default the installer is using Python 2.7. During the installation the used Python version is in the left upper corner.
cd /home/pi/TerrariumPI
sudo ./install.sh 3
sudo ./start.sh 3
And change the command in /etc/rc.local
from
/home/pi/TerrariumPI/start.sh
to
/home/pi/TerrariumPI/start.sh 3
In order to run the webinterface on port 80 in stead of 8090, you can install nginx and use the vhost configuration in the contrib folder. Execute the following commands:
sudo apt install -y nginx
cd /etc/nginx/sites-enabled
sudo rm default
sudo ln -s /home/pi/TerrariumPI/contrib/nginx.conf terrariumpi
sudo service nginx reload
This should make the web interface be accessible on http://[terrariumpi_IP]. Either use port forwarding on your router, or register your pi at dataplicity and use their wormhole feature to make your Pi accessible on the internet.
If you see the following errors during startup of the software after a reboot, that is somewhat normal. The OS random number generator is not yet ready in order to create secure connections. This will become normal working again after 30 seconds till 1 minute. Just leave the software running and it will become steady.
HTTPSConnectionPool(host='www.yr.no', port=443): Max retries exceeded with url: /place/Netherlands/Provence/City/forecast_hour_by_hour.xml (Caused by SSLError(SSLError("bad handshake: Error([('', 'osrandom_rand_bytes', 'getrandom() initialization failed.')],)",),))
SMTP AUTH extension not supported by server.
2018-07-26 22:59:54,260 - ERROR - terrariumNotificatio - Mailserver login credentials are invalid. Cannot sent mail!
Connection unexpectedly closed: [Errno 104] Connection reset by peer
HTTPSConnectionPool(host='api.pushover.net', port=443): Max retries exceeded with url: /1/users/validate.json?token=[TOKEN] (Caused by SSLError(SSLError("bad handshake: Error([('', 'osrandom_rand_bytes', 'getrandom() initialization failed.')],)",),))
2018-07-27 11:16:57,780 - ERROR - terrariumNotificatio - TelegramBot has issues: Did not receive valid JSON data
It is possible to add an overview page for all sensors in with gauges. As this is a manual setting, there is some manual work needed to get it activated.
So edit the file settings.cfg
and look at the terrariumpi
section and look for the variable sensor_gauge_overview
. If that variable is not there, just add it with the value true
. If the variable is already there, change the value to true
. Then restart TerrariumPI and reload your browser. Make sure you have cleared your browser cache. Open the sensors menu and there will be a new menu option named 'All'.
Example:
[terrariumpi]
host = ::
port = 8090
version = 3.9.3
title = TerrariumPI %(version)s
power_usage = 5
owfs_port = 4304
admin = admin
password = password
language = en_US
temperature_indicator = C
distance_indicator = cm
power_price = 0
water_price = 0
soundcard = bcm2835 ALSA
always_authenticate = false
windspeed_indicator = kmh
volume_indicator = L
sensor_gauge_overview = true
If you want to exclude a sensor from the average calculation for X reason, this can be done by manual editing the configuration in the settings.cfg
file.
So edit the file settings.cfg
and look for your sensor that needs to be excluded. Every sensor configuration starts with [sensor_SOME_ID]
line. Below that line you can than add a new line with: exclude_avg = True
and save the settings file.
Then the final step is to restart TerrariumPI and the sensor will be excluded from the average calculation. This can be checked by looking at the sensor graph. A small blue badge will indicate that it is in exclude average mode.
Example:
[sensordcd784579ab801750421dd3634d69fd5]
address = 28-0315b2966fff
alarm = True
alarm_max = 0.0
alarm_min = 0.0
error = False
hardwaretype = w1
id = dcd784579ab801750421dd3634d69fd5
limit_max = 100.0
limit_min = 0.0
max_diff = 25.0
name = Temp2
type = temperature
exclude_avg = True
Some power switches can be found by scanning. And that could cause power switches added to TerrariumPI that are not part of the terrarium system. There is an option to exclude a power switch. The only rule is, that the unwanted switch is first ADDED to the software by saving the power switch settings once.
Then edit the settings.cfg
file manually and add the following line to the unwanted power switch configuration: exclude = True
. Then you have to restart once and the power switch will be excluded in TerrariumPI.
Example:
[switch52bf5188168c87f6a2389c35a7a189b7]
address = 192.168.5.55
hardwaretype = wemo
id = 52bf5188168c87f6a2389c35a7a189b7
name = wemotest
power_wattage = 33.0
timer_enabled = False
timer_off_duration = 0
timer_on_duration = 0
timer_start = 00:00
timer_stop = 00:00
water_flow = 0.1
exclude = True
By default all logging is done in the folder log
where the actual log files are written to a temporary memory share. This is done to reduce the write wear on the SD card. A downside is that when the Pi reboots, all log info of that day is gone. During the night, the log file will be archived and that is stored on the SD card. So archived log files will survive reboots.
In order to change the default logging of TerrariumPI you only need to create your own custom logging configuration file with the name logging.custom.cfg
. So start with:
cp logging.cfg logging.custom.cfg
And start editing the logging.custom.cfg
file with an editor. After editing restart TerrariumPI and the new logging will be loaded.
In order to enable debug messages add the fileHandlerDebug
handler to the handlers
in section [logger_root]
In order to enable (remote) syslog logging add the syslogHandler
handler to the handlers
in section [logger_root]
. Then you have to configure to use either the local syslog server or a remote syslog server. By default it uses the local syslog. To use remote change:
'/dev/log'
to ('hostip',portnr)
Local: args=('/dev/log','local6')
Remote: args=(('192.168.1.1',514),'local6')
Next you need to tell Syslog which facility it is using. The default is LOCAL6
. To enable this, create a file in the folder /etc/rsyslog.d
for example:
/etc/rsyslog.d/terrariumpi.conf
And add then:
local6.* /var/log/terrariumpi.log
Finally restart rsyslog and you should receive log messages from TerrariumPI
See the Translation page for creating a new translation