{"id":14962081,"url":"https://github.com/boxus-tech/boxus","last_synced_at":"2025-07-24T05:36:54.840Z","repository":{"id":37070016,"uuid":"94620807","full_name":"boxus-tech/boxus","owner":"boxus-tech","description":"High-level framework for easy control of multiple devices connected to the Raspberry Pi and Arduino via GPIO","archived":false,"fork":false,"pushed_at":"2022-11-22T04:29:20.000Z","size":105,"stargazers_count":3,"open_issues_count":11,"forks_count":2,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-07-05T01:41:21.735Z","etag":null,"topics":["arduino","arduino-nano","couchdb","diy","plant-growth","postgresql","python","raspberry-pi","raspberry-pi-3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boxus-tech.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-17T11:55:01.000Z","updated_at":"2020-10-16T21:08:19.000Z","dependencies_parsed_at":"2023-01-20T13:31:42.711Z","dependency_job_id":null,"html_url":"https://github.com/boxus-tech/boxus","commit_stats":null,"previous_names":["boxus-plants/boxus"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/boxus-tech/boxus","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxus-tech%2Fboxus","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxus-tech%2Fboxus/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxus-tech%2Fboxus/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxus-tech%2Fboxus/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boxus-tech","download_url":"https://codeload.github.com/boxus-tech/boxus/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boxus-tech%2Fboxus/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266796902,"owners_count":23985493,"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","status":"online","status_checked_at":"2025-07-24T02:00:09.469Z","response_time":99,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["arduino","arduino-nano","couchdb","diy","plant-growth","postgresql","python","raspberry-pi","raspberry-pi-3"],"created_at":"2024-09-24T13:29:04.024Z","updated_at":"2025-07-24T05:36:54.818Z","avatar_url":"https://github.com/boxus-tech.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"Boxus\n=====\n\n[![PyPI version](https://badge.fury.io/py/boxus.svg)](https://badge.fury.io/py/boxus)\n[![Build Status](https://travis-ci.org/boxus-tech/boxus.svg?branch=master)](https://travis-ci.org/boxus-tech/boxus)\n[![Maintainability](https://api.codeclimate.com/v1/badges/3770233dded42b4030ee/maintainability)](https://codeclimate.com/github/boxus-plants/boxus/maintainability)\n[![Test Coverage](https://api.codeclimate.com/v1/badges/3770233dded42b4030ee/test_coverage)](https://codeclimate.com/github/boxus-plants/boxus/test_coverage)\n[![Issue Count](https://codeclimate.com/github/boxus-plants/boxus/badges/issue_count.svg)](https://codeclimate.com/github/boxus-plants/boxus/issues)\n\n## About\nInspired by Ruby on Rails ActiveRecord and powered by [Nanpy](https://github.com/nanpy/) high-level framework for easy control of multiple devices connected to the Raspberry Pi and Arduino via GPIO. Core of the open DIY project of building automated plants grow pod.\n\nCurrently supported out of the box sensors:\n* DHT digital temperature and humidity sensor (DHT11 tested)\n* Analog soil moisture sensor (1. turn on power; 2. read analog input; 3. turn off power in order to minimize galvanic corrosion)\n* Generic (digital and analog reads from one input pin)\n\nand devices:\n* Relay (turned on – `LOW` output state; turned off – default and `HIGH` output states)\n* Generic (turned on – `HIGH` output state; turned off – default and `LOW` output states)\n\nUse declarative YAML syntax to specify how your sensors and devices are connected, e.g.:\n```yaml\nsensors:\n  -\n    _id: sensor_1\n    description: DHT11 Temperature and humidity sensor\n    type_name: dht\n    control: native\n    measurements:\n      - temperature\n      - humidity\n    pins:\n      input:\n        type: digital\n        number: 4\n        dht_version: 11\n\ndevices:\n  -\n    _id: dev_1\n    description: Main water pump\n    type_name: relay\n    control: arduino\n    arduino_port: /dev/ttyUSB0\n    pins:\n      power:\n        type: digital\n        number: 4\n```\n\nPut all seed info into the `yml` file (see e.g. [seed.example.yml](examples/db/seed.example.yml)) and use `DB` class to import it into the `CouchDB`:\n```python\nfrom boxus import DB\n\ndb = DB()\ndb.seed('/path/to/seed.yml')\n```\n\nThen easily read all your sensors and save data into the `CouchDB`\n```python\nfrom boxus import DB, Sensor\n\ndb = DB()\n\nsensors = Sensor.all(db)\n\nfor s in sensors:\n    s.read()\n```\nturn on/off your devices\n```python\nfrom boxus import DB, Device\n\ndb = DB()\n\ndev = Device.find(db, 'dev_1')\ndev.on()\ndev.off()\n```\nor create a watchdog script (see [watchdog.py example](examples/watchdog.py)) and install CRON job using `Manager`:\n```python\nfrom boxus import Manager\n\nmanager = Manager()\n# E.g. every 10 minutes\nmanager.install_cron('/path/to/python /path/to/watchdog.py', 10)\n```\n\n## Installation\n\n### Requirements\n\nMacOS\n```shell\nbrew install couchdb\n```\nor Linux\n```shell\nsudo apt-get install couchdb\n```\n\n### The latest development build\n\n```shell\ngit clone https://github.com/boxus-plants/boxus.git\ncd boxus\npip install -e .\n```\n\n### The latest stable release\n\n```shell\npip install boxus\n```\n\n## Requirements\n\n### Hardware\n\n* Raspberry Pi (Pi 3 tested)\n* Arduino (Nano v3 tested)\n\n### Software\n\n#### Required\n* [CouchDB](http://couchdb.apache.org)\n\n#### Optional\n* [Nanpy Firmware for Arduino](https://github.com/nanpy/nanpy-firmware) for easy Arduino control and analog sensors support\n* [Adafruit Python DHT library](https://github.com/adafruit/Adafruit_Python_DHT) for reading temperature and humidity data from DHT sesnors connected directly to Raspberry Pi\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxus-tech%2Fboxus","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboxus-tech%2Fboxus","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboxus-tech%2Fboxus/lists"}