-
Notifications
You must be signed in to change notification settings - Fork 0
Home
- online configuration
- own update process
- calibration and setting Userinterface (WebApp)
- self test interface
- offline mode to save datasets
- debug mode
- DS18B20 (Temperature)
- DHT22 (Temperature & Humditity)
- I2S MEMS SPH0645 (Microphone)
- H30A Load cell (Weight)
0 = false
1 = true
- name: DEV (Name of the Configuration)
- timezone: Europe/Berlin (Timezone needed for Datasets)
- auto_update: 1 (Automatic Update)
- auto_shutdown: 0 (Automatic shutdown after a measurecycle)
- ignore_error: 0 (Error shown in the DWH)
- debug: 1 (Debug messages shown in the DWH)
- is_dht22: 1 (Measure DHT22 data)
- is_scale: 1 (Measure Loadcell data)
- is_microphone: 1 (Measure Microhone data)
- is_ds18b20: 1 (Measure DS18B20 data)
- app_median: 3 (Number of measurements for the sensors to calculate the median)
- app_attempts_before_restart: 2 (Number of errors before restarting)
- app_wait_seconds: 60 (Seconds that the system waits before starting new cycle)
- dht22_pin: 23 (GPIO Pin for DHT22)
- audio_duration: 10 (Seconds that the system collects audio data)
- audio_fs: 8000 (Samplerate for the Microphone)
Failed to initialize [SENSOR]
: Sensor is broken or the wiring is not correct
Cannot get Scale data: [ERROR MESSAGE]
: Something is wrong with the wiring of the scale or the load cell is broken
Failed to insert log files: [ERROR MESSAGE]
: Writing the log file failed
Failed to read log files: [ERROR MESSAGE]
: Reading the log file failed
Failed to post log files: [ERROR MESSAGE]
: Exception while posting the Log file. Broken pipe or something like that
[SENSOR] failed
: Sensor is broken or sends no valid data (Similar to "Failed to initialize [SENSOR]"
Too many errors: reboot system!
: Failed attempts of the System is >= "attempts_before_restart" in the config. This happen, if a Sensor failed. The system remembers the sensor and excludes it at the next restart
- if debug is on: send following debug information:
- Config version
- Config Name
- Signal strength
- Voltage (vOut and vIn from wittyPi if installed)
- check if system has valid access token
- write online status (true or false)
- if online: synchronise configuration with online config if exists
- check if ignore_error
- append sensors from config list
- start get sensor data
- if sensor data valid, try to send this data
- if status code 200: (data accepeted) then the system jump to step 9)
- if status code 400: delete the dataset
- if status code not 200 or 400, the system save the dataset (refer to save feature) and switch to offline mode
- if sensor data is courrupt, send error message to DWH ([SENSOR] failed!) and delete the dataset
- try to post log files to DWH
- if response 200: delete the dataset
- if response 400: delete dataset (redundant to point 7.)
- if not repsonse: return false
- if repsonse from logfiles are false: add one failed attempt
- if failed attempts > app_attempts_before_restart (in config): send error message to DWH (Too many errors: reboot system!)
- check for update and if auto_update true:
- pull the new update.py
- write update file to recnognize the new update after restart
- restart
- the system will recocnize the new update and execute the new update.py
- restart
- if auto_shutdown: shutdown the system
- wait app_wait_seconds before begin the new cycle