{"id":18688471,"url":"https://github.com/mycontroller-org/mcagent-rpi-v1","last_synced_at":"2026-04-22T16:34:08.259Z","repository":{"id":107577686,"uuid":"65316309","full_name":"mycontroller-org/mcagent-rpi-v1","owner":"mycontroller-org","description":"MyController agent for Embedded boards","archived":false,"fork":false,"pushed_at":"2017-08-30T06:59:17.000Z","size":243,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-06-06T20:09:02.698Z","etag":null,"topics":["agent","banana-pi","gpio","iot","mycontroller","mysensors","orangepi","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mycontroller-org.png","metadata":{"files":{"readme":"README.adoc","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2016-08-09T17:51:40.000Z","updated_at":"2021-05-08T20:58:52.000Z","dependencies_parsed_at":"2023-06-08T13:15:08.549Z","dependency_job_id":null,"html_url":"https://github.com/mycontroller-org/mcagent-rpi-v1","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/mycontroller-org/mcagent-rpi-v1","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2Fmcagent-rpi-v1","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2Fmcagent-rpi-v1/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2Fmcagent-rpi-v1/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2Fmcagent-rpi-v1/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mycontroller-org","download_url":"https://codeload.github.com/mycontroller-org/mcagent-rpi-v1/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mycontroller-org%2Fmcagent-rpi-v1/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32145824,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-22T15:33:03.595Z","status":"ssl_error","status_checked_at":"2026-04-22T15:30:42.712Z","response_time":58,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["agent","banana-pi","gpio","iot","mycontroller","mysensors","orangepi","raspberry-pi"],"created_at":"2024-11-07T10:36:57.491Z","updated_at":"2026-04-22T16:34:03.244Z","avatar_url":"https://github.com/mycontroller-org.png","language":"Java","funding_links":[],"categories":[],"sub_categories":[],"readme":"### MyController agent for embedded boards\n\nMcAgent to control GPIO pins of the embedded boards via MyController server. This agent is using http://pi4j.com/[PI4J] to control GPIO's.\n\n[link=https://travis-ci.org/mycontroller-org/mcagent-rpi]\nMaster: image:https://travis-ci.org/mycontroller-org/mcagent-rpi.svg?branch=master[\"Build Status\", link=\"https://travis-ci.org/mycontroller-org/mcagent-rpi\"]\n\nhttps://drive.google.com/drive/u/0/folders/0BzuumrtRA7p6OGM1UEdGY2RwUDA[**SNAPSHOT version**]\n\n#### Supported embedded boards\n* Raspberry Pi\n* BananaPi\n* BananaPro\n* Synovoip BPI\n* Odroid\n* OrangePi\n* NanoPi\n\n**IMPORTANT:** PI4J controls IO pins via WiringPi. For some platforms we may need to install specific **WiringPi** library on the system. In that case you can change `static` to `dynamic` on the option `PI4J_LINKING` in `mcagent/bin/start.sh`. Refer https://github.com/Pi4J/pi4j/issues/333[this issue] for more details.\n\n### How to setup this agent on embedded boards(example: Raspberry PI)?\n##### Steps on MyController\n* You need to enable MQTT broker service on MyController server.\n\nimage::extra/images/mqtt-broker-settings.png[MQTT broker settings]\n\n* Create a MQTT gateway as shown here,\n\nimage::extra/images/mqtt-rpi-gateway.png[MQTT gateway settings]\n\n##### Steps on MCagent\n* Do login in to your RPI as a root user\n* Download recent version from https://drive.google.com/drive/u/0/folders/0BzuumrtRA7p6OGM1UEdGY2RwUDA[here]\n* Extract downloaded file `tar xzf mcagent-rpi-0.0.1-SNAPSHOT-bundle.tar.gz`\n* `cd mcagent`\n* Start the agent `bin/start.sh`\n* You can see the log file on `logs/mcagent.log`\n\nNow you can see the list of internal sensors on MyController server.\n\nimage::extra/images/rpi-internal-sensors.png[RPI internal sensors]\n\n#### MCagent properties:\n\n* File location: `conf/mcagent.properties`\n* Default `mcac.platform`: `RASPBERRYPI`. Supported options: `RASPBERRYPI`, `BANANAPI`, `BANANAPRO`, `BPI`, `ODROID`, `ORANGEPI` and `NANOPI`\n* Default `pin.numbering.scheme`: `DEFAULT_PIN_NUMBERING`. Supported options: `DEFAULT_PIN_NUMBERING`, `BROADCOM_PIN_NUMBERING `\n* To know more about `pin.numbering.scheme` http://pi4j.com/pin-numbering-scheme.html[click here] **NOTE:** Pin numbering option supports only on Raspberry Pi platform.\n* when you are running this agent on remote RPI, configure MQTT settings on this file,\n```\n#========================================================================\n# MQTT client settings\n# Add MQTT client configurations here.\n# All communications must happens via on MQTT only!\n#========================================================================\nmcac.mqtt.broker.host=tcp://localhost:1883\nmcac.mqtt.clientid=mc-rpi-client\nmcac.mqtt.username=\nmcac.mqtt.password=\nmcac.mqtt.feed=rpiagent\n```\n\n**Important:** When you change anything on mcagent file. MCagent restart is required to update your changes.\n\n#### How to control GPIO pins\nYou can control any GPIO from MyController. However, you have to do one-time setup on `MCagent` as follows.\n\n##### Steps:\n* Add GPIO entry on the file `conf/devices.yaml` **Note:** you should follow YAML syntax.\n* GPIO pins should be added under `gpio_devices:`\n\nFew examples,\n\n#### Input (switch, push button, etc)\n```yaml\n- id: sample_digital_in\n  name: Sample digital input switch\n  type: DIGITAL_IN\n  enabled: true\n  properties:\n    pin: gpio 0\n    pull_resistance: pull_up\n    debounce_interval: 100\n```\n* `id` - is the id used as MyController sensor id\n* `name` - is the name used as MyController sensor name\n* `type` - What the type of this sensor. Supported types: `DIGITAL_OUT`, `DIGITAL_IN`, `SOFT_PWM_OUT`, `PWM_OUT`, `TEMPERATURE_DS18B20`\n* `enabled`: We can enable or disable this sensor\n* `properties`: This properties based on `type of sensor`. here it supports for the following properties,\n   * `pin`: pin number on RPI\n   * `pull_resistance`: supported types: `pull_up`, `pull_down` and `off`\n   * `debounce_interval`: debounce_interval in milliseconds\n\n\n#### Output (on/off switch)\n```yaml\n- id: sample_digital_out\n  name: Sample on/off relay control\n  type: DIGITAL_OUT\n  enabled: true\n  properties:\n    pin: gpio 2\n```\n\n#### PWM output\n```yaml\n- id: sample_pwm_out\n  name: Sample PWM out\n  type: PWM_OUT\n  enabled: true\n  properties:\n    # All Raspberry Pi models support a hardware PWM pin on GPIO_01.\n    # models A+, B+, 2B, 3B also support hardware PWM pins: GPIO_23, GPIO_24, GPIO_26\n    # for other platforms(example: orange Pi), kindly refer their specifications.\n    pin: gpio 23\n    range: 1024\n    # supported modes: balanced, mark:space\n    # for detail refer http://wiringpi.com/reference/raspberry-pi-specifics/\n    mode: balanced\n    clock: 500\n```\n\n#### Soft PWM\n```yaml\n- id: sample_soft_pwm_out\n  name: Sample Soft PWM out\n  type: SOFT_PWM_OUT\n  enabled: false\n  properties:\n    pin: gpio 3\n    range: 100\n```\n\n#### Temperature sensor (ds18b20)\n```yaml\n- id: temperature_ds18b20\n  name: Temperature sensor\n  type: TEMPERATURE_DS18B20\n  enabled: true\n  properties:\n    device_address: 28-011615318bee\n    # scale can be either CELSIUS, FARENHEIT, KELVIN or RANKINE\n    scale: CELSIUS\n    cron: 0,30 * * * * ?\n```\n* `device_address`: Manually you have to find device address and update\n* `scale`: scale can be either `CELSIUS`, `FARENHEIT`, `KELVIN` or `RANKINE`\n* `cron`: When using the temperature sensor. you have to mention how long once you want to report the temperature value to MyController via Cron expression. `0,30 * * * * ?` - reports on 0th second and 30th second.\n\n#### How to control internal\nThese are all the default sensors to monitor RPI internals, However, can change reporting frequency and/or enable/disable\n```yaml\ninternal_devices:\n- id: cpu_temperature\n  enabled: true\n  properties:\n    cron: 0 0/2 * * * ?\n\n- id: cpu_voltage\n  enabled: true\n  properties:\n    cron: 0 0/10 * * * ?\n\n- id: memory_usage\n  enabled: true\n  properties:\n    cron: 0 0/5 * * * ?\n    unit: MB\n\n- id: cpu_usage\n  enabled: true\n  properties:\n    cron: 0/30 * * * * ?\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycontroller-org%2Fmcagent-rpi-v1","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmycontroller-org%2Fmcagent-rpi-v1","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmycontroller-org%2Fmcagent-rpi-v1/lists"}