Git Product home page Git Product logo

patrickhallek / automated-irrigation-system Goto Github PK

View Code? Open in Web Editor NEW
686.0 38.0 87.0 1.22 MB

This is the software of an open source automated irrigation system. The complete setup including hardware can be found in the README.

HTML 4.11% JavaScript 76.81% CSS 12.99% Dockerfile 0.46% C++ 5.34% Pug 0.29%
automation irrigation watering system smart-home iot gardening garden-automation raspberry-pi esp8266

automated-irrigation-system's Issues

Error when "docker-compose up"

Hi.

First off, thanks for the Project. Exactly what i was looking for. I am an absolute Coding noob and have no idea what im doing, building this. But i like the challenge.

When im trying to docker-compose up it runs through nearly all steps, except this:

eight@waterpi:~/automated-irrigation-system $ sudo docker-compose up
[+] Building 3.8s (5/5) FINISHED
=> [automated-irrigation-system_backend internal] load .dockerignore 0.7s
=> => transferring context: 2B 0.2s
=> [automated-irrigation-system_frontend internal] load build definition 0.7s
=> => transferring dockerfile: 285B 0.3s
=> [automated-irrigation-system_frontend internal] load .dockerignore 1.1s
=> => transferring context: 63B 0.2s
=> [automated-irrigation-system_backend internal] load build definition 1.4s
=> => transferring dockerfile: 367B 0.2s
=> ERROR [automated-irrigation-system_backend internal] load metadata fo 2.0s

[automated-irrigation-system_backend internal] load metadata for docker.io/library/node:10:


failed to solve: rpc error: code = Unknown desc = node:10: no match for platform in manifest sha256:59531d2835edd5161c8f9512f9e095b1836f7a1fcb0ab73e005ec46047384911: not found

From the other posts i'm guessing i have to switch to node:10-alpine, but i have absolutly no idea how.

Static URL REACT_APP_BACKEND

when i start a docker-compose services, it gets its own DNS and set of IP will be configured to all containers. I found that the REACT_APP_BACKEND_URL variable is referring to a static IP address "192.168.178.50" while node container has got different IP.
can you explain why this particular IP address is chosen ?

Linechart.js uses the host rpi IP address to fetch data from the node container.
you may have to name the container using "container_name" in docker-compose.yml

also while get calls are made to the node container through the host raspberry-pi IP means if my pi has "192.168.178.51" the call will be made to "http://192.168.178.51:5000/undefined/measurements/day/..."
is it not simple to connect the two containers by giving some name?
as they will be in same network they can ping using these names as the DNS in docker will take care of that.

Video and Pictures of your finished project/demo

I really love this project and the detail and work that you put into this. It would be even more helpful if you had time to include pictures or a video walking people through your actual setup.

Connection to database failed! Exitcode 132 MongoDB

Hi, when i run "sudo docker-compose up" i get two errors.

"automated-irrigation-system_mongodb_1 exited with code 132"
"Connection to database failed!"
database

I try to run it on a Raspberry PI Zero W with Raspberry Pi OS Lite - Kernel version: 5.4
cpuinfo

Here is my Docker-Compose.
docker-compose

I build it with these steps:

curl -sSL https://get.docker.com | sh
sudo usermod -aG docker pi
sudo apt-get install -y libffi-dev libssl-dev
sudo apt-get install -y python3 python3-pip
sudo apt-get remove python-configparser
sudo pip3 install docker-compose
sudo apt install git
git clone https://github.com/PatrickHallek/automated-irrigation-system
cd automated-irrigation-system
sudo nano docker-compose.yml  #change ip adress
sudo nano Dockerfile #change from issue https://github.com/PatrickHallek/automated-irrigation-system/issues/14#issuecomment-656077450
cd Backend 
sudo nano Dockerfile #change from issue https://github.com/PatrickHallek/automated-irrigation-system/issues/14#issuecomment-656077450
sudo docker-compose up

Thanks

can not build

When I issue the build command I have this error, following by several others:

make: Entering directory '/src/node_modules/rpio/build'
CXX(target) Release/obj.target/rpio/src/rpio.o
CC(target) Release/obj.target/rpio/src/bcm2835.o
../src/bcm2835.c: In function 'bcm2835_gpio_pad':
../src/bcm2835.c:487:3: warning: this 'if' clause does not guard... [-Wmisleading-indentation]
if (bcm2835_pads == MAP_FAILED)

ERROR: Service 'backend' failed to build

When attempting to, sudo docker-compose up
I get:
`Building backend

Step 1/6 : FROM node:10
---> 5097189edcdc
Step 2/6 : COPY . /src
---> Using cache
---> 6553134477ae
Step 3/6 : WORKDIR /src
---> Using cache
---> 8f4aaa1bbc70
Step 4/6 : RUN npm install
---> Running in 34f24dadfe6c
ERROR: Service 'backend' failed to build: The command '/bin/sh -c npm install' returned a non-zero code: 139
`

I checked to verify I had npm installed and I do.

Any ideas?

Obtain the status of Relay

Hello,

I am trying to obtain the status of the relay and I have imported the library gpio in the file Preferences.js.

When I tried to build all completed fine but when I start npm in the console is the following error.

image

You could help me?

Thanks!

Has anyone modified for MCP3008?

I would like to modify my MCP3008 setup to take advantage of this awesome UI and reporting.
However, at a bit of a loss of where to start.

Get ERROR Message with sudo docker-compose up

Hi,
I get an error message with the command "sudo docker-compose up". The message is the following:

ERROR: Top level object in './docker-compose.yml' needs to be an object not '<class 'str'>'.

Do you have an idea?
Thanks

Bring in changes

I`m opening an issue to bring up a large change I would like to create a pull request for.

I`m adding some features to the system and would like to check if it would be ok to initiate a pull request.

A summary of the new features (Its been a couple years since I forked it, so I might have missed a couple small things)

  1. Auto-discovering of sensors using mDNS (no need to hardcode server IP to Arduino, and the server doesn`t need a static IP in the network).
  2. Setting sensor "Nicknames". I now use the sensor MAC as its name, to avoid having to hardcode the sensor name in Arduino
  3. Sensor wifi auto-setup with captive portal, avoiding hardcode wifi password to Arduino.
  4. Items 1, 2 and 3 allow sensors to be flashed with the code straight out of github. The user then plugs it in, connects to its wifi, chooses the ssid and sets the password, and the sensor is good to go.
  5. Battery mode allows sensors to send data and go into a deep sleep, allowing them to run on batteries.
  6. Rewrite calls to backend to avoid having to set the server ip in the Docker-compose file. We can now publish the server straight to docker with no requirement for the user to edit any files.
  7. Set sensor preferences through the front end. they get synced when the sensor uploads data (Battery mode on/off, sending interval)
  8. Allow pumps and sensors to be on the same or different ESP devices. We can use an ESP for all the pumps, or connect the pump directly to each sensor.
  9. Modifications to allow it to run in docker in a Windows computer (in WSL) or Linux. No need for a Rasberry Pi board.
  10. Compatibility with ESP32 and ESP8266 boards. We can now use the Lilygo pre-built irrigation sensor (https://www.aliexpress.com/item/1005005767792425.html)
  11. Hability to delete a sensor from the server, or delete its previous readings.
  12. Updated the docker image and dependencies for the backend to the latest packages.

To do / WIP:

  1. Gather more data from the sensor besides soil moisture (Fertility/salt levels, Light, temperature, etc) - will probably be done in a week or so.
  2. Freeze backend dependency versions.
  3. Update frontend node and dependencies (This has proven to be a larger challenge than I thought, so I`m running the same versions as your repository).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.