Giter Club home page Giter Club logo

eva-demo-farm's Introduction

EVA ICS demo: Farm management

This is a legacy demo for EVA ICS v3. Visit https://www.eva-ics.com/ about more information.

Layout

This demo deploys EVA ICS cluster to control virtual farm with two greenhouses.

Each greenhouse has own Universal Controller instance, which collects data from sensors:

  • greenhouseX/env/temp - temperature
  • greenhouseX/env/hum - humidity
  • greenhouseX/env/soilm - soil moisture
  • greenhouseX/env/ldr - light sensor (1 - ok, 0 - low)

Also, greenhouses are equipped with units:

  • greenhouseX/pump - water pump
  • greenhouseX/lamp - lighting lamps circuit

which can be turned on/off by operator or PLC.

In this setup, units use virtual relay drivers, port 1 for pump, port 2 for lamps. Sensors don't use any driver, user can set their values manually and simulate different events.

Logic

LM PLC has the following rules:

  • If ldr sensor in greenhouse becomes 0 - turn the light on, otherwise turn the light off
  • If soil becomes too dry ( < 85) - turn the pump on, if too wet ( > 110) -turn the pump off
  • If the pump is turned on by operator, it should be automatically turned off in 30 seconds for greenhouse 1, in 45 seconds for greenhouse 2
  • The pump should not be automatically turned off if it was turned on by operator but then measure monitoring detected that soil is dry
  • macro start_manual_watering is called by operator, other macros are called by decision rules.
  • Rules and automatic macros are programmed in universal way to use item props and _source object (in macros) to determine the event-related items. This allows the cluster to be extended with more greenhouses without creating any new macros.

Network and containers

  • Both UCs are set up on dedicated nodes and dynamically discovered by LM/SFA and exchange data via MQTT server
  • SFA and LM PLC are set up on the same node and statically connected via HTTP and exchange data via P2P connection
  • eva_farm_mqtt local MQTT server (mosquitto), 10.27.12.200
  • eva_farm_uc1 UC in greenhouse 1, 10.27.12.101
  • eva_farm_uc2 UC in greenhouse 2, 10.27.12.102
* eva_farm_scada 10.27.12.199
  • LM PLC (logic controller)
  • SFA (aggregator, UI)

Deployment

Local

eva sfa cloud deploy -ys -c srv=$(hostname) \
    https://raw.githubusercontent.com/alttch/eva-demo-farm/master/deploy/farm-demo-single.yml

Docker

Requirements: Docker, docker-compose.

  • Execute docker-compose up to deploy containers and demo configuration

Management

API

Default master key is: demo123

http://10.27.12.199:8828 - SFA API/primary operator interface

Components:

The port 8828 is also mapped to main host.

UI

http://10.27.12.199:8828

SFA user credentials:

  • login operator
  • password 123

CLI

CLI management:

docker exec -it <container_name> eva-shell

e.g. enter eva_farm_scada node shell:

docker exec -it eva_farm_scada eva-shell

Event simulation

Sensor events can be simulated with:

./sensor-set.sh <greenhouse_number> <temp|hum|soilm|ldr> <value>

eva-demo-farm's People

Contributors

ddyachenko39 avatar divi255 avatar

Stargazers

 avatar

Watchers

 avatar  avatar

Forkers

ddai00bit

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.