Skip to content
MailiLoh edited this page Jan 15, 2016 · 6 revisions

General Information

The database could be arranged with 'database_tabel.sql'.


Table Constraction

  • ID INT primary key Auto_increment, -- ID-No to find newist Value
  • Zeitstempel TIMESTAMP unique not null, -- Time of the Value
  • Wert BOOL/FLOAT/INT -- Value as boolean or float

Bool Tables

  • AutoModus -- 0:Manuel 1:Automatic
  • ManOpen -- Manuel opening 0:Deaktivated 1:Activated
  • ManClose -- Manuel closing 0:Deaktivated 1:Activated
  • Win_Open -- 0:closed 1:opend

Float Tables

Sensor Values

  • Temp_IN -- Inside Temperature
  • Temp_OUT -- Outside Temperature
  • Humidity_IN -- Inside Humidity
  • Humidity_OUT -- Outside Humidity
  • AirQuality_IN -- Inside Air Quality
  • AirQuality_OUT -- Outside Air Quality
  • AirPressure_IN -- Inside Air Pressure
  • AirPressure_OUT -- Outside Air Pressure
  • Volume_IN -- Inside Noise
  • Volume_OUT -- Outside Noise
  • Wind_OUT -- Outside Wind Strength

Int Tables

Limit Values

  • Temp_MIN -- Minimum Temperature
  • Temp_MAX -- Maximum Temperature
  • Humidity_MIN -- Minimum Humidity
  • Humidity_MAX -- Maximum Humidity
  • AirQuality_MAX -- Maximum Air Quality
  • AirPressure_MAX -- Maximum Air Pressure
  • Volume_MAX -- Maximum Noise
  • Wind_MAX -- Maximum Wind Strength

Alarms and Priority

  • Priority -- 0: Humidity, 1: Temperature 2: Quality 3: All
  • Air_Quality_AlarmState -- 0: OK 1: Warning 2:Alarm
  • Humidity_AlarmState -- 0: OK 1: Warning 2:Alarm
  • Temp_AlarmState -- 0: OK 1: Warning 2:Alarm
  • Noise_AlarmState -- 0: OK 1: Warning 2:Alarm
  • Wind_AlarmState -- 0: OK 1: Warning 2:Alarm

Improvement

In place of one table for every sensor, you could use one table for each Phytec Board. In this table each row contains a timestampe and every sensortyps. This way each sensor has one column.

Also all values for the limits could be gathered in one table. In this table no timestampe is needed. Every limit value could be in one row. In the same way one table for the alarms could be used.