Automated Indoor/Outdoor Farming
This project is frozen and currently being ported to go-trusted-platform.
Standalone | Cluster | |
---|---|---|
x86_64 | x | x |
ARM | x | - |
ARM-64 | x | x |
- packer-builder-arm-image
- Screen
- AVRDUDE
- [Ansible] (https://docs.ansible.com/ansible/latest/installation_guide/intro_installation.html)
sudo apt-get install gcc-multilib-arm-linux-gnueabihf
sudo apt-get kpartx qemu-user-static git clone https://github.com/solo-io/packer-builder-arm-image cd packer-builder-arm-image go mod download go build go build cmd/flasher/main.go
Use the provided Makefile to build the binary.
# Build binaries for x64 and ARMv6
make
Cross compiling for the Raspberry PI / ARM architecture on Linux x64 requires the following toolchain:
- gcc-6-arm-linux-gnueabihf
uint64 not supported: golang/go#9373
# Default MAC and IP
MAC: 0x04 0x02 0x00 0x00 0x01
IP: 192.168.0.91
# Set new MAC and IP
CONTROLLER=192.168.0.91
curl http://$CONTROLLER/eeprom/0/04
curl http://$CONTROLLER/eeprom/1/02
curl http://$CONTROLLER/eeprom/2/00
curl http://$CONTROLLER/eeprom/3/00
curl http://$CONTROLLER/eeprom/4/01
curl http://$CONTROLLER/eeprom/5/01
curl http://$CONTROLLER/eeprom/6/192
curl http://$CONTROLLER/eeprom/7/168
curl http://$CONTROLLER/eeprom/8/0
curl http://$CONTROLLER/eeprom/9/51
curl http://$CONTROLLER/reboot
- Lighting (120 VAC)
- Dehumidifier (120 VAC)
- Ventilation (120 VAC)
- A/C (120 VAC)
- Heater (120 VAC)
- CO2 (120 VAC)
- Auxiliary (120 VAC)
- Auxiliary (120 VAC)
- Pod0 upper float
- Pod0 water temp (DS18B20)
- Pod1 upper float
- Pod1 water temp (DS18B20)
- Analog water sensors (floor)
- DHT22 (x3)(ceiling, floor, canopy)
- CO2
- Photo (light)
- Smoke
# Default MAC and IP
MAC: 0x04 0x02 0x00 0x00 0x02
IP: 192.168.0.92
# Set new MAC and IP
CONTROLLER=192.168.0.92
curl http://$CONTROLLER/eeprom/0/04
curl http://$CONTROLLER/eeprom/1/02
curl http://$CONTROLLER/eeprom/2/00
curl http://$CONTROLLER/eeprom/3/00
curl http://$CONTROLLER/eeprom/4/01
curl http://$CONTROLLER/eeprom/5/01
curl http://$CONTROLLER/eeprom/6/192
curl http://$CONTROLLER/eeprom/7/168
curl http://$CONTROLLER/eeprom/8/0
curl http://$CONTROLLER/eeprom/9/52
curl http://$CONTROLLER/reboot
- Pod0 pump (120 VAC)
- Pod1 pump (120 VAC)
- Heater (120 VAC)
- Chiller (120 VAC)
- Drain (12 VDC)
- Fill (12 VDC)
- Top-Off (12 VDC)
- Upper float
- Lower float
- Water Temp (DS18B20)
- DHT22
- PH
- EC
- DO
- ORP
# Default MAC and IP
MAC: 0x04 0x02 0x00 0x00 0x03
IP: 192.168.0.93
# Set new MAC and IP
CONTROLLER=192.168.0.93
curl http://$CONTROLLER/eeprom/0/04
curl http://$CONTROLLER/eeprom/1/02
curl http://$CONTROLLER/eeprom/2/00
curl http://$CONTROLLER/eeprom/3/00
curl http://$CONTROLLER/eeprom/4/01
curl http://$CONTROLLER/eeprom/5/01
curl http://$CONTROLLER/eeprom/6/192
curl http://$CONTROLLER/eeprom/7/168
curl http://$CONTROLLER/eeprom/8/0
curl http://$CONTROLLER/eeprom/9/53
curl http://$CONTROLLER/reboot
As a summary, when -
- starting a brand new Raft cluster, set join to false and specify all initial
member node details in the initialMembers map.
- joining a new node to an existing Raft cluster, set join to true and leave
the initialMembers map empty. This requires the joining node to have already
been added as a member node of the Raft cluster.
- restarting an crashed or stopped node, set join to false and leave the
initialMembers map to be empty. This applies to both initial member nodes
and those joined later.
- IPC-2221 Voltage and Spacing Standards
- IEC-60950-1 (2nd edition)
https://www.amazon.com/gp/product/B07NRYPZM1 http://www.lcdwiki.com/5inch_HDMI_Display
The config store is responsible for storing desired device configurations and/or settings.
The state store is responsible for keeping a single "record" for a device that indicates it's current metric and channel values.
The device store is responsible for keeping historical data for a device - that is, many metric and channel values over time, used for analytics and reporting.
The following golang channels are created for each farm
- Farm state gc ticker
- Device state gc ticker
- farm.WatchFarmStateChange
- farm.WatchFarmConfigChange
- farm.WatchDeviceStateChange
- Not getting push notifications
- Enable/disable toggles wrong sensor
- Conditions not ordered by time
- Workflow steps out of order
- Roles not loading
Please consider supporting this project for ongoing success and sustainability. I'm a passionate open source contributor making a professional living creating free, secure, scalable, robust, enterprise grade, distributed systems and cloud native solutions.
I'm also available for international consulting opportunities. Please let me know how I can assist you or your organization in achieving your desired security posture and technology goals.