{"id":19665315,"url":"https://github.com/alttch/eva-demo-farm","last_synced_at":"2026-05-15T02:43:57.655Z","repository":{"id":103748283,"uuid":"178021989","full_name":"alttch/eva-demo-farm","owner":"alttch","description":"EVA ICS virtual farm demo","archived":false,"fork":false,"pushed_at":"2023-07-24T13:45:25.000Z","size":4700,"stargazers_count":1,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-10T02:32:34.281Z","etag":null,"topics":["automation","cloud","iiot","iot","mqtt"],"latest_commit_sha":null,"homepage":"https://www.eva-ics.com/","language":"CSS","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alttch.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-03-27T15:22:50.000Z","updated_at":"2021-12-19T23:37:00.000Z","dependencies_parsed_at":null,"dependency_job_id":"b1aa4b64-38db-44bc-b16f-ad495c359158","html_url":"https://github.com/alttch/eva-demo-farm","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Feva-demo-farm","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Feva-demo-farm/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Feva-demo-farm/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alttch%2Feva-demo-farm/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alttch","download_url":"https://codeload.github.com/alttch/eva-demo-farm/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240974609,"owners_count":19887324,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["automation","cloud","iiot","iot","mqtt"],"created_at":"2024-11-11T16:22:14.426Z","updated_at":"2026-05-15T02:43:57.584Z","avatar_url":"https://github.com/alttch.png","language":"CSS","funding_links":[],"categories":[],"sub_categories":[],"readme":"EVA ICS demo: Farm management\n*****************************\n\nThis is a legacy demo for EVA ICS v3. Visit https://www.eva-ics.com/ about\nmore information.\n\nLayout\n======\n\nThis demo deploys `EVA ICS \u003chttps://www.eva-ics.com/\u003e`_ cluster to control\nvirtual farm with two greenhouses.\n\nEach greenhouse has own Universal Controller instance, which collects data from\nsensors:\n\n* greenhouseX/env/temp - temperature\n* greenhouseX/env/hum - humidity\n* greenhouseX/env/soilm - soil moisture\n* greenhouseX/env/ldr - light sensor (1 - ok, 0 - low)\n\nAlso, greenhouses are equipped with units:\n\n* greenhouseX/pump - water pump\n* greenhouseX/lamp - lighting lamps circuit\n\nwhich can be turned on/off by operator or PLC.\n\nIn this setup, units use virtual relay drivers, port 1 for pump, port 2 for\nlamps. Sensors don't use any driver, user can set their values manually and\nsimulate different events.\n\nLogic\n=====\n\nLM PLC has the following rules:\n\n* If ldr sensor in greenhouse becomes 0 - turn the light on, otherwise turn the\n  light off\n\n* If soil becomes too dry ( \u003c 85) - turn the pump on, if too wet ( \u003e 110) -\n  turn the pump off\n\n* If the pump is turned on by operator, it should be automatically turned off\n  in 30 seconds for greenhouse 1, in 45 seconds for greenhouse 2\n\n* The pump should not be automatically turned off if it was turned on by\n  operator but then measure monitoring detected that soil is dry\n\n* macro **start_manual_watering** is called by operator, other macros are\n  called by decision rules.\n\n* Rules and automatic macros are programmed in universal way to use item props\n  and **_source** object (in macros) to determine the event-related items. This\n  allows the cluster to be extended with more greenhouses without creating any\n  new macros.\n\nNetwork and containers\n======================\n\n* Both UCs are set up on dedicated nodes and dynamically discovered by LM/SFA\n  and exchange data via MQTT server\n\n* SFA and LM PLC are set up on the same node and statically connected via HTTP\n  and exchange data via P2P connection\n\n* **eva_farm_mqtt** local MQTT server (mosquitto), *10.27.12.200*\n* **eva_farm_uc1** UC in greenhouse 1, *10.27.12.101*\n* **eva_farm_uc2** UC in greenhouse 2, *10.27.12.102*\n* **eva_farm_scada** *10.27.12.199*\n * LM PLC (logic controller)\n * SFA (aggregator, UI)\n\nDeployment\n==========\n\nLocal\n-----\n\n.. code:: bash\n\n    eva sfa cloud deploy -ys -c srv=$(hostname) \\\n        https://raw.githubusercontent.com/alttch/eva-demo-farm/master/deploy/farm-demo-single.yml\n\nDocker\n------\n\nRequirements: `Docker \u003chttps://www.docker.com/\u003e`_, `docker-compose\n\u003chttps://docs.docker.com/compose/\u003e`_.\n\n* Execute *docker-compose up* to deploy containers and demo configuration\n\nManagement\n==========\n\nAPI\n---\n\nDefault master key is: *demo123*\n\nhttp://10.27.12.199:8828 - SFA API/primary operator interface\n\nComponents:\n\n* http://10.27.12.101:8812 - UC in greenhouse 1 API/EI\n* http://10.27.12.102:8812 - UC in greenhouse 2 API/EI\n* http://10.27.12.199:8817 - LM PLC API/EI\n\nThe port **8828** is also mapped to main host.\n\nUI\n--\n\nhttp://10.27.12.199:8828\n\nSFA user credentials:\n\n* **login** *operator*\n* **password** *123*\n\nCLI\n---\n\nCLI management:\n    \n    *docker exec -it \u003ccontainer_name\u003e eva-shell*\n\ne.g. enter **eva_farm_scada** node shell:\n\n    *docker exec -it eva_farm_scada eva-shell*\n\nEvent simulation\n----------------\n\nSensor events can be simulated with:\n\n    *./sensor-set.sh \u003cgreenhouse_number\u003e \u003ctemp|hum|soilm|ldr\u003e \u003cvalue\u003e*\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttch%2Feva-demo-farm","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falttch%2Feva-demo-farm","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falttch%2Feva-demo-farm/lists"}