{"id":28288410,"url":"https://github.com/shchoholiev/sis-shelves-controller","last_synced_at":"2026-05-01T04:35:40.559Z","repository":{"id":291441127,"uuid":"720631948","full_name":"Shchoholiev/sis-shelves-controller","owner":"Shchoholiev","description":"A Python-based controller for managing shelves with laser motion sensors and lights, integrated with Azure IoT Hub for remote operations.","archived":false,"fork":false,"pushed_at":"2025-05-04T16:43:10.000Z","size":22,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-05-22T00:12:39.927Z","etag":null,"topics":["azure-iothub","iot","motion-sensor","python","raspberry-pi"],"latest_commit_sha":null,"homepage":"","language":"Python","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/Shchoholiev.png","metadata":{"files":{"readme":"README.md","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,"zenodo":null}},"created_at":"2023-11-19T04:31:36.000Z","updated_at":"2025-05-04T16:44:09.000Z","dependencies_parsed_at":"2025-05-04T17:36:56.256Z","dependency_job_id":"2bf0f371-a08a-4828-ba8f-b02d951aaa5e","html_url":"https://github.com/Shchoholiev/sis-shelves-controller","commit_stats":null,"previous_names":["shchoholiev/sis-shelves-controller"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Shchoholiev/sis-shelves-controller","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fsis-shelves-controller","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fsis-shelves-controller/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fsis-shelves-controller/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fsis-shelves-controller/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shchoholiev","download_url":"https://codeload.github.com/Shchoholiev/sis-shelves-controller/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shchoholiev%2Fsis-shelves-controller/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":260570198,"owners_count":23029644,"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":["azure-iothub","iot","motion-sensor","python","raspberry-pi"],"created_at":"2025-05-22T00:11:53.632Z","updated_at":"2026-05-01T04:35:40.554Z","avatar_url":"https://github.com/Shchoholiev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# sis-shelves-controller\nA Python-based controller for managing shelves with laser motion sensors and lights, integrated with Azure IoT Hub for remote operations.\n\n## Table of Contents\n- [Features](#features)\n- [Stack](#stack)\n- [Installation](#installation)\n  - [Prerequisites](#prerequisites)\n  - [Setup Instructions](#setup-instructions)\n- [Configuration](#configuration)\n\n## Features\n- Real-time monitoring of laser motion sensors on shelves.\n- Control of shelf lights via GPIO pins on Raspberry Pi.\n- Azure IoT Hub integration for remote control and direct method handling.\n- Logging with rotating file handler for operational insights.\n- Configurable through JSON files for easy deployment changes.\n\n## Stack\n- Python 3.9+\n- Azure IoT Device SDK (`azure-iot-device==2.12.0`)\n- Raspberry Pi GPIO (`RPi.GPIO`)\n- Asyncio for asynchronous sensor monitoring and Azure IoT communication\n- Requests for backend API integration\n- Logging with Python standard library\n\n## Installation\n\n### Prerequisites\n- Raspberry Pi with GPIO pins (or compatible device)\n- Python 3.9 or higher installed\n- Internet connection for installing dependencies and Azure IoT Hub access\n- Access to Azure IoT Hub with device connection string credentials\n\n### Setup Instructions\n\n1. Clone the repository or download the source code:\n   ```bash\n   git clone https://github.com/Shchoholiev/sis-shelves-controller.git\n   cd sis-shelves-controller\n   ```\n\n2. Create and activate a Python virtual environment (recommended):\n   ```bash\n   python3 -m venv venv\n   source venv/bin/activate\n   ```\n\n3. Install required dependencies:\n   ```bash\n   pip install -r requirements.txt\n   ```\n\n4. (Optional) Install the package locally:\n   ```bash\n   python setup.py install\n   ```\n\n5. Configure the application by editing the `shelves_controller/app/appconfig.json` and creating/modifying `deviceconfig.json` with your device-specific settings (see Configuration section).\n\n6. Run the controller:\n   ```bash\n   shelvescontroller\n   ```\n   Or run directly via Python:\n   ```bash\n   python -m shelves_controller.app.app\n   ```\n\n## Configuration\nThe application relies on two JSON configuration files located in `shelves_controller/app/`:\n\n- `appconfig.json`: Contains general configuration such as backend API URLs and Azure IoT Hub host name.\n  \n  Example snippet:\n  ```json\n  {\n      \"apiUrl\": \"https://smart-inventory-system.azurewebsites.net\",\n      \"azureIoTHub\": {\n          \"hostName\": \"smart-inventory-system.azure-devices.net\"\n      }\n  }\n  ```\n\n- `deviceconfig.json` (must be created): Contains device-specific credentials for Azure IoT Hub connectivity.\n\n  Required fields:\n  ```json\n  {\n      \"deviceId\": \"your-device-id\",\n      \"accessKey\": \"your-device-access-key\"\n  }\n  ```\n\nEnsure both files are present for the system to connect to Azure IoT Hub and the backend API properly.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchoholiev%2Fsis-shelves-controller","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshchoholiev%2Fsis-shelves-controller","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshchoholiev%2Fsis-shelves-controller/lists"}