Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

Thoughts:
1. Use netcat to transfer config fies quickly to from Branch to Root boxes and vice versa Left for posterity. Info will be passed via API now.


Expand
titleVideos

Widget Connector
urlhttps://www.youtube.com/watch?v=eSyloLOebXA
 
Widget Connector
urlhttps://www.youtube.com/watch?v=EoQ5jVP0e9o
 
Widget Connector
urlhttps://www.youtube.com/watch?v=LBay6o-6S1g
 
Widget Connector
urlhttps://www.youtube.com/watch?v=eUnt7lTt_4E
 
Widget Connector
urlhttps://www.youtube.com/watch?v=KI_DM781a38
 
Widget Connector
urlhttps://www.youtube.com/watch?v=TcRQ3FIzr0I
 
Widget Connector
urlhttps://www.youtube.com/watch?v=tEA8SRQ7u70
 
Widget Connector
urlhttps://www.youtube.com/watch?v=MlCSc6pvJ2I
 
Widget Connector
urlhttps://www.youtube.com/watch?v=azvlttSjsb0
 



Expand
titlePictures

Gallery


Database Planning:

Expand


Code Block
titleCollection: System
{
	"_id" : <auto gen>

}


Code Block
titleCollection: Container
/*
Notes:
- Do I want to see the overall temp for each container? This could be stored 
somewhere else and this collection is only for reading. I can calculate this 
based on sensor data from all the branches in that container. 
- All calculations will be done using the metric system. 

*/
{
  "creationDate" : "stored in time since epoch",
  "containerId" : "container-<random string>",
  "name" : "",
  "description" : "",
  "notes" : "<may store HTML code that will be displayed when queried>",
  "log" : "<a list of events that have been entered....should this be an array
          or a huge glob of data?>" <--array would be cleaner,
  "dimensions" : "container/box/shed/etc in cubic ft/meters",
  "physicalLocation" : "",
  "size" : "<text entry (40ft container/customer box 5ftx5ftx2ft/etc)>",
  "cropType" : ["kale", "sprouts", "lemon grass"],
  "devices" : {
    "branch" : [branchId-<random>, branchId-<random>],
    "stem" : [stemId-<random>, stemId-<random>],
    "flower" : [flowerId-<random>]
  } 
}


Code Block
titleCollection: Branch
/*
Notes:
- Sensors all should have their own unique ID that is hard coded in them. Also
one will be applied to them as well. 
- under db.branch.sensors.leaf-id - The leaf id will be its UID because I dont
trust that the sensors will always have a different hardwareId....we will see.

*/
{
  "creationDate" : "stored in time since epoch",
  "branchId" : "branch-<random string>",
  "containerId" : "container-<random string>",
  "networkSwitch" : "container-xSw0",
  "networkSwitchPort" : "Gi0/1",
  "ipAddressV4" : "",
  "ipAddressV6" : "",
  "operatingSystem" : "",
  "hardware" : "raspberry pi/etc",
  "status" : "<active/inactive>" maybe based this off last data collection may
              not even use it and just use last check in then the UI"s logic
              determines if it is an issue...ehhh a later improvement. ,
  "lastWrite" : "time in epoch",
  "name" : "",
  "description" : "",
  "notes" : "<may store HTML code that will be displayed when queried>",
  "log" : "<a list of events that have been entered....should this be an array
          or a huge glob of data?>" <--array would be cleaner and easier to 
          query using pagination.,
  "physicalLocation" : "",
  "sensors" : {
    "leaf-<random string>" : {
      "hardwareId" : "28-011830a09cf2",
      "type" : <temperature/moisture/humidity>,
      "model" : "DHT22",
      "notes" : "? might not need. but we will see."
  },
  "powerSource" : "PoE/Power Adapter",
  "battery" : "true/false",
  "speaker" : "true/false",
  "fans" : "true/false"
}


Code Block
titleCollection: Stem
/*
Notes:
- How to count the amount of subdocuments. Might be the $size operator.
https://docs.mongodb.com/manual/reference/operator/aggregation/size/index.html

*/
{
  "creation_date" : "stored in time since epoch",
  "stemId" : "stem-<random string>",
  "containerId" : "container-<random string>",
  "networkSwitch" : "container-xSw0",
  "networkSwitch_port" : "Gi0/1",
  "ipAddressV4" : "",
  "ipAddressV6" : "",
  "operatingSystem" : "",
  "hardware" : "raspberry pi/etc",
  "status" : "<active/inactive> maybe based this off last data collection may not even use it and just use last check in then the UIs logic determines if it is an issue...ehhh a later improvement.",
  "lastWrite" : "time in epoch",
  "name" : "",
  "description" : "",
  "notes" : "<may store HTML code that will be displayed when queried>",
  "log" : "<a list of events that have been entered....should this be an array or a huge glob of data?> <--array would be cleaner and easier to query using pagination.",
  "physicalLocation" : "",
  "sensors" : {
    "leaf-<random string>" : {
      "hardwareId" : "28-011830a09cf2",
      "type" : "<temperature/moisture/humidity>",
      "model" : "DHT22",
      "notes" : "? might not need. but we will see."
	 }
 },
  "relay" : {
    "1" : {
      "gpioNumber" : 5,
      "gpioPin" : 29,
      "connected_device" : "<intake fan>"
    },
    "2" : {
      "gpioNumber" : 6,
      "gpioPin" : 31,
      "connected_device" : "<exhaust fan>"
    },
    "3" : {
      "gpioNumber" : 12,
      "gpioPin" : 32,
      "connected_device" : "<light column1_row0_etc/water pump 2/heater 3>"
    }
  },
  "powerSource" : "PoE/Power Adapter",
  "battery" : "true/false",
  "speaker" : "true/false",
  "fans" : "true/false"
}


Code Block
titleCollection: Flower
{
	"_id" : "<auto gen>"
}


Code Block
titleCollection: Tasks
{
	"_id" : <auto gen>
}


Code Block
titleCollection: Sensor Data
{
	"_id" : "<auto gen>"
    "deviceId" : "from device config file",
    "containerId" : "from device config file",
	"sensorId" : "<sensor unique serial or ID>",
	"sensorDesc" : "Name or short description of sensor - PlanTray 1A Soil Temp"
    "readingType" : "<temperature/humidity/moisture/waterlevel/gas/airpressur/rain/motion/waterflow>",
    "readingRaw" : "parsed from /sys/bus/w1/devices/<sensor serial or ID>",
	"timeStamp" : "generated by the server upon entry in epoch"
}

Sensors: https://tutorials-raspberrypi.com/raspberry-pi-sensors-overview-50-important-components/


Code Block
titleCollection: Notifications
{
	"_id" : <auto gen>
}



Login Flow:

Drawio
contentId805896220
simple0
zoom1
pageId732495880
diagramDisplayNamelogin-flow.xml
lbox1
contentVer7
revision7
baseUrlhttps://mjnshosting.atlassian.net/wiki
diagramNameUntitled Diagram.xml
width810.25
links
tbstyle
height1007


Task Flow:

Drawio
contentId1256521817
simple0
zoom1
pageId732495880
diagramDisplayNameGrowBox Overview
lbox1
contentVer4
revision4
baseUrlhttps://mjnshosting.atlassian.net/wiki
diagramNameUntitled Diagram.drawio
width808
links
tbstyle
height1002.5


Flower:

Expand
titleImages