{"id":16024460,"url":"https://github.com/ricco386/rpi.mc","last_synced_at":"2026-05-03T02:35:25.210Z","repository":{"id":57462914,"uuid":"282665455","full_name":"ricco386/RPi.MC","owner":"ricco386","description":"Magnetic contact state monitor, completely written in Python. RPi.MC is using magnetic contact switch (door/window sensor) with Raspberry Pi GPIO.","archived":false,"fork":false,"pushed_at":"2020-08-11T20:28:30.000Z","size":478,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-02-10T12:21:16.072Z","etag":null,"topics":["gpio","magnetic-contact","raspberrypi","rpi","sensor"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ricco386.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}},"created_at":"2020-07-26T14:22:09.000Z","updated_at":"2020-08-11T20:28:05.000Z","dependencies_parsed_at":"2022-09-05T17:22:25.876Z","dependency_job_id":null,"html_url":"https://github.com/ricco386/RPi.MC","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricco386%2FRPi.MC","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricco386%2FRPi.MC/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricco386%2FRPi.MC/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ricco386%2FRPi.MC/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ricco386","download_url":"https://codeload.github.com/ricco386/RPi.MC/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247285889,"owners_count":20913893,"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":["gpio","magnetic-contact","raspberrypi","rpi","sensor"],"created_at":"2024-10-08T19:20:48.380Z","updated_at":"2026-05-03T02:35:25.151Z","avatar_url":"https://github.com/ricco386.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"RPi.MC\n######\n\nMagnetic contact state monitor, completely written in Python.\n\nRPi.MC is using magnetic contact switch (door/window sensor) with Raspberry Pi GPIO.\n\nTo connect to Raspberry Pi plug into `GPIO PIN 17 \u003chttps://pinout.xyz/pinout/pin11_gpio17#\u003e`_ (Physical pin 11) and\nPOWER PIN. Install and execute raspi-mc and it should work. Alternatively you can user different PIN and execute\nraspi-mc with parameter: ``raspi-mc --pin pin_number``.\n\n.. image:: doc/RPi.MC.png\n\nRPi.MC supports number of parameters and also configuration file. For more details see ``raspi-mc --help`` or sample\nconfig.\n\nSensor is based on `RPi.Sensor \u003chttps://github.com/ricco386/RPi.Sensor/\u003e`_ library, which make base for implementing\ndifferent types of sensors in Python.\n\n\nPre-Installation requirements\n-----------------------------\n\n- Update system and install required dependencies::\n\n    sudo apt-get update\n\n- Update system and install required dependencies::\n\n    sudo apt-get install build-essential python3-dev python3-pip\n\n\nInstallation\n------------\n\n- Install the latest released version using pip::\n\n    pip install https://github.com/ricco386/RPi.MC/zipball/master\n\n- Alternatively install latest released version from pypi::\n\n    pip install --upgrade RPi.MC\n\n\nIntegration as a systemd service\n--------------------------------\n\n- Make sure all dependencies (listed below) are installed (done automatically when installing via pip)\n- The ``raspi-mc`` command should be installed somewhere in your ``PATH`` (done automatically when installing via pip), make sure `raspi-mc.service` has corect path in `ExecStart` set to `raspi-mc` executable.\n- Systemd scripts are available: https://github.com/ricco386/RPi.MC/tree/master/init.d to install them you will need root privileges, so we execute them as sudo::\n\n    sudo cp init.d/raspi-mc.conf /etc/tmpfiles.d/\n    sudo cp init.d/raspi-mc.service /etc/systemd/system/\n    sudo systemd-tmpfiles --create /etc/tmpfiles.d/raspi-mc.conf\n    sudo systemctl enable raspi-mc.service  # Enable service to start at system boot\n    sudo systemctl start raspi-mc.service  # Start\n\nSystemd scripts should be run under **default Raspberry Pi user** (pi), scripts have to be able access GPIO.\n\n**Dependencies:**\n\n- `RPi.Sensor \u003chttps://pypi.python.org/pypi/RPi.Sensor\u003e`_ (0.5.3+)\n\n\nUsage\n-----\n\nYou have to create a `.sensor.cfg` file and place into `/home/pi/.sensor.cfg` you can find example file in RPi.Sensor repo: https://github.com/ricco386/RPi.Sensor/blob/master/raspi_sensor/sensor.cfg.example and create section `[Magnetic_Contact]` where you can override default values.\n\n`raspi-mc` also support multiple parameters to overwrite config parameters. For more info run::\n\n    raspi-mc --help\n\n\nZabbix support\n--------------\n\nIn directory `zabbix_template` there is a Zabbix template that can be imported to Zabbix and monitor systemd process if it is running and how much memorry it consumes. It also supports Zabbix trapper `rpi.mc-state` that can receive a sensor state changes.\n\n\nLicense\n-------\n\nFor more information see the `LICENSE \u003chttps://github.com/ricco386/RPi.MC/blob/master/LICENSE\u003e`_ file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricco386%2Frpi.mc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fricco386%2Frpi.mc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fricco386%2Frpi.mc/lists"}