msjbak / Tefnut

Beaglebone based automated garden watering system with accompanying android application for monitoring and data visualization
0 stars 0 forks source link

Create database for sensor values #2

Closed msjbak closed 8 years ago

bzillins commented 8 years ago

What database are you currently considering?

msjbak commented 8 years ago

I'm going to start by simly using a csv file to capture the values, but eventually mySQL

bzillins commented 8 years ago

As you seem to have settled at sqlite can this issue be closed?

msjbak commented 8 years ago

once the branch that includes this code is merged tot he main branch, this issue will be closed

bzillins commented 8 years ago

In the interest of standardizing the columns for collaboration I would propose the following table structure

Column Type Description
sensorid Unique ID of recording station
timestamp Timestamp of the record
recordlength Amount of time before next anticipated record
ontime Amount of time system will be active (dispensing water) in this interval
airhumidity Value read from the humidity sensor at timestamp
airtemp Air temperature in *F at timestamp
soiltemp Soil temperature in *F at timestamp
soilmoisture Soil Moisture in % of sensor range at timestamp
light Optical intensity value at timestamp
state String of encoded values to record state of controller at timestamp

@MrStevenFeldman any comments?

msjbak commented 8 years ago

I have some questions:

sensorID - I thought that the timestamp was the unique ID, what would this be? a number? recordlength - why would i need this? would i not want a system that has a fixed interval? like read the sensor data every minute? ontime - this would just record the number of seconds the water valve should be open? state - what would the state indicate? that the valve is 'ready/watering/offline' or that the sensors are 'connected/disconnected'?

bzillins commented 8 years ago

sensorID - I thought that the timestamp was the unique ID, what would this be? a number? This would give you the option of having multiple systems stored in the same database

recordlength - why would i need this? would i not want a system that has a fixed interval? like read the sensor data every minute? This would allow you to determine if there were missing data points, as well as provide flexibility for different measurement intervals. You may only want to check the state once per day in a low power solar application for example.

ontime - this would just record the number of seconds the water valve should be open? either that or a % of record length, it would depend how the control system was implemented

state - what would the state indicate? that the valve is 'ready/watering/offline' or that the sensors are 'connected/disconnecte exactly, you could also store variables that contain the anticipated actions on the next control cycle

On Wed, Dec 16, 2015 at 8:08 PM, msjbak notifications@github.com wrote:

I have some questions:

sensorID - I thought that the timestamp was the unique ID, what would this be? a number? recordlength - why would i need this? would i not want a system that has a fixed interval? like read the sensor data every minute? ontime - this would just record the number of seconds the water valve should be open? state - what would the state indicate? that the valve is 'ready/watering/offline' or that the sensors are 'connected/disconnected'?

— Reply to this email directly or view it on GitHub https://github.com/msjbak/Tefnut/issues/2#issuecomment-165305549.

Brenton Zillins ME Student 754-273-6866