Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Explanation about optional configuration lines

...

Code Block
languagebash
titleOffline data storage and USB export relevant settings in the SiteController.cfg
[ExternalBroker]
# left empty to guarantee the offline storage
host=
port=1883
# not required with no connection
user_id=
password=
# an organizationShortName is still required
organizationShortName=my_org
tls_enable=False
 
[data_store]
# this password must be equal to the password at the USB flash drive
L2_export_password=P@s$w0rd!
# required for the USB data export
export_status_representation=sensor
export_status_sensor_id=usb_export_state
# -1 means no limitation by the table based size limits
L2_max_imgdata=-1
L2_max_sys_msg=-1
L2_max_events=-1
L2_max_HD=-1
# limitations to the offline storage
L2_max_age_days=183
L2_max_total_size_MiB=1024
L2_time_of_day_to_cleanup=02:00
# Optimization to have permanently more data in L2.
# !!! Following 2 lines should be deleted if the SiteController is going to operate online !!!
max_items_L1 = 500
L1_max_sys_msg = 50
 
[SiteController.conf]
# required for the USB export
start_usb_exporter=Yes

[remote_exec_calls]
# required for the export process visualization using the LED
led_on=/usr/local/bin/led.on
led_off=/usr/local/bin/led.off


Info

Following configuration lines in the SiteController.cfg are optional:

Code Block
languagebash
# Optimization to have permanently more data in L2. 
# !!! Following 2 lines should be deleted if the SiteController is going to operate online !!! 
max_items_L1 = 500
L1_max_sys_msg = 50

With these settings new data are moved much earlier to the L2 database file and available for USB storage. More latest data are available to get copied. On the other hand these settings are not sufficient for the online mode, when the SiteController is connected to cloud. In this case the L2 database should be accessed as less as possible.  With more L1 cache space the data can be better combined and uploaded.

If the lines are not present in the SiteController.cfg, the default is used (15000,5000).


Site template

The control of the LED for the visualization of the USB export process is completely realized by configuration of the SiteController. For this purpose, the site template of the SiteController should (also) inherit a component template like the following one:

...