-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
4 changed files
with
94 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,42 +1,120 @@ | ||
Settings | ||
======== | ||
|
||
The acquisition settings are given in a the python file `settings.py` that must be present in the same folder as | ||
`raspardas.py`. | ||
|
||
``IMPORTS`` | ||
----------- | ||
A typical `settings.py` will start with an import section. | ||
:: | ||
|
||
from ardas import sensor_tools as st | ||
|
||
``SENSORS`` | ||
----------- | ||
The next section is a tuple of sensors objects named SENSORS. | ||
The recommended way is to save the sensor object as a sensor####.ssr file where #### stands for the sensor id | ||
(usually a four digit number). Then the `load_sensor` method is used to create the sensor objects. | ||
|
||
:: | ||
|
||
# ArDAS sensors objects connected to the ArDAS channels | ||
SENSORS = (st.load_sensor('0001'), st.load_sensor('0002'), st.load_sensor('0003'), st.load_sensor('0004')) | ||
|
||
Then several dictionaries define the settings : | ||
|
||
``DATABASE`` | ||
------------ | ||
|
||
InfluxDB is used. :: | ||
This section gives the settings of the InfluxDB where the output of the sensors will be stored. | ||
|
||
:: | ||
|
||
# connexion to InfluxDB | ||
DATABASE = { | ||
'HOST': '127.0.0.1', | ||
'PORT': 8086, | ||
'USER': 'mydatabaseuser', | ||
'PASSWORD': 'mypassword', | ||
'NAME': 'mydatabase' | ||
'host': '*hostname.domain*', | ||
'port': 8086, | ||
'user': '*user_name*', | ||
'password': '*password*', | ||
'dbname': '*database_name*' | ||
} | ||
|
||
``ARDAS`` | ||
--------- | ||
|
||
In this section the settings of the ArDAS are given. | ||
|
||
:: | ||
|
||
# ArDAS configuration | ||
ARDAS_CONFIG = { | ||
'station': '0002', | ||
'station': '0001', | ||
'net_id': '001', | ||
'integration_period': '0001' | ||
'integration_period': '0001', | ||
'tty': '/dev/ttyACM0' | ||
} | ||
|
||
``MASTER`` | ||
---------- | ||
|
||
This section lists the settings used to setup a remote connection (i.e. over a telnet connection) | ||
|
||
:: | ||
|
||
# connection to master | ||
MASTER_CONFIG = { | ||
'local_host': '0.0.0.0', | ||
'local_port': *port_number* | ||
|
||
``MESSAGES LOGGING`` | ||
-------------------- | ||
|
||
These settings control how the messages generated by raspardas.py are logged. | ||
|
||
:: | ||
|
||
# messages logging configuration | ||
LOGGING_CONFIG ={ | ||
'debug_mode': False, | ||
'logging_to_console': False, | ||
'file_name': 'raspardas_log', | ||
'max_bytes': 262144, | ||
'backup_count': 30, | ||
'when': 'd', | ||
'interval': 1 | ||
} | ||
|
||
``DATA LOGGING`` | ||
---------------- | ||
|
||
These settings control how the data are logged locally. | ||
|
||
:: | ||
|
||
# data logging configuration | ||
DATA_LOGGING_CONFIG ={ | ||
'file_name': 'data_log', | ||
'max_bytes': 1048576, | ||
'backup_count': 1024, | ||
'when': 'd', | ||
'interval': 1, | ||
'influxdb_logging': True | ||
} | ||
|
||
``SFTP`` | ||
-------- | ||
|
||
These settings are used to define how to transfer updates of raspardas.py to the raspberry_pi (remote). | ||
|
||
:: | ||
|
||
# parameters to push code to raspberry via sftp_transfer.py | ||
SFTP = { | ||
'host': '127.0.0.1', | ||
'username': 'pi', | ||
'password': '', | ||
'local_path':'/home/username/test.txt', | ||
'remote_path': '/home/pi/remote/test.txt' | ||
'host': '*name_of_the_raspberry_pi', | ||
'username': '*username_for_raspberry_pi_login*', | ||
'password': '*password_for_raspberry_pi_login*', | ||
'local_path': '*path_to_local_file*', | ||
'remote_path': '*path_to_remote_file*' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
pyserial | ||
pandas | ||
pysftp | ||
ntplib | ||
influxdb |