Skip to content
TheYOSH edited this page Feb 9, 2019 · 34 revisions

What is the default login

The default login name is admin with password password. Make sure you change it after installation at the system setting page.

How to stop TerrariumPI

The software is running in a screen session

  1. Login with the user pi.
  2. Run the command screen -r. This will give a new terminal.
  3. Press Ctrl+c twice within 10 seconds.

How to start TerrariumPI

The software is running in a screen session

  1. Login with the user pi.
  2. Go to the installation directory cd ~/TerrariumPi
  3. Start with sudo ./start.sh

How to restart TerrariumPI

The software is running in a screen session

  1. Login with the user pi.
  2. Run the command screen -r. This will give a new terminal.
  3. Press Ctrl+c and wait 10 seconds.
  4. Use Ctrl+a and then a single d' to close the screen session and logout of your Pi

How to debug TerrariumPI

The software is running in a screen session

  1. Login with the user pi.
  2. Run the command screen -r. This will give a new terminal.
  3. Here there could be errors. Mail them or make an issue with the contents of the error.
  4. Use Ctrl+a and then a single d to close the screen session and logout of your Pi

How to use Python 3.5+

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.

  1. cd /home/pi/TerrariumPI
  2. sudo ./install.sh 3
  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

Use and enable NGINX server on port 80

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:

  1. sudo apt install -y nginx
  2. cd /etc/nginx/sites-enabled
  3. sudo rm default
  4. sudo ln -s /home/pi/TerrariumPI/contrib/nginx.conf terrariumpi
  5. 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.

SMTP and/or SSL errors during startup.

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

How to exclude a sensor from average calculation

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

Increase logging

TerrariumPI log all actions in a log file at log/terrariumpi.log. By default it logs INFO, WARNING and ERROR messages. In order to get debug messages change the file: logging.conf and change

[handler_fileHandler]
class=logging.handlers.TimedRotatingFileHandler
level=INFO

to

[handler_fileHandler]
class=logging.handlers.TimedRotatingFileHandler
level=DEBUG

And restart TerrariumPI

How to translate

See the Translation page for creating a new translation

Clone this wiki locally