{"id":26742761,"url":"https://github.com/fescron/dfrobot-rly8-python3","last_synced_at":"2026-05-01T01:31:24.906Z","repository":{"id":231989001,"uuid":"783187034","full_name":"Fescron/DFRobot-RLY8-python3","owner":"Fescron","description":"DFRobot RLY-8 8 channel PoE ethernet controller Python 3 Control Class and Example Code","archived":false,"fork":false,"pushed_at":"2024-07-20T09:16:46.000Z","size":7,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-28T06:20:37.239Z","etag":null,"topics":["controller","dfrobot","ethernet","json","poe","python","python3","relay","rly-8","rly8","usb"],"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/Fescron.png","metadata":{"files":{"readme":"README.md","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":"2024-04-07T07:10:59.000Z","updated_at":"2024-07-20T09:16:49.000Z","dependencies_parsed_at":"2024-04-07T08:27:02.008Z","dependency_job_id":"63f0e03c-5780-41be-b394-ac692d6c0526","html_url":"https://github.com/Fescron/DFRobot-RLY8-python3","commit_stats":null,"previous_names":["fescron/dfrobot-rly8-python3"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Fescron/DFRobot-RLY8-python3","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fescron%2FDFRobot-RLY8-python3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fescron%2FDFRobot-RLY8-python3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fescron%2FDFRobot-RLY8-python3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fescron%2FDFRobot-RLY8-python3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Fescron","download_url":"https://codeload.github.com/Fescron/DFRobot-RLY8-python3/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Fescron%2FDFRobot-RLY8-python3/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32482460,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-30T13:12:12.517Z","status":"ssl_error","status_checked_at":"2026-04-30T13:12:06.837Z","response_time":57,"last_error":"SSL_read: 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":["controller","dfrobot","ethernet","json","poe","python","python3","relay","rly-8","rly8","usb"],"created_at":"2025-03-28T06:20:00.074Z","updated_at":"2026-05-01T01:31:24.884Z","avatar_url":"https://github.com/Fescron.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# DFRobot RLY-8 Python 3 Control Class and Example Code\n\nThis repository contains a control class and other example code for the [RLY-8](https://www.dfrobot.com/product-1218.html) 8 channel PoE ethernet (and USB) relay controller by [DFRobot](https://www.dfrobot.com). See [this](https://wiki.dfrobot.com/RLY-8-POE_Relay_Controller_DFR0289) link to their wiki-page for more information about the device.\n\nThe code on this repository was originally written by Geréb Róbert in Python 2 (see [this](https://github.com/uponai/dfrobot-RLY-8-python) repository). I've ported it to Python 3 and added slightly more functionality and documentation.\n\n\u003cbr\u003e\n\n## Repository Files\n\n- `RLY8Class.py`: Control class for the relay\n- `main.py`: A basic Python-file which uses the `RLY8Class.py` file to control the relay\n- `rly-8.py`: Stand-alone example to control the relay\n- `rly-8_simple.py`: Stand-alone file to turn on/off relays by arguments (ex.: `python rly-8_simple.py 1=on 2=off`)\n\n\u003cbr\u003e\n\n## `RLY8Class.py` usage\n\n```python\nfrom RLY8Class import RLY8\n\n# Define the IP and port to connect to\n# (DHCP is enabled by default, unfortunately the device doesn't have a hostname)\nADDR = (\"192.168.0.202\", 2000)\n\n# Instantiate the RLY-8 object\nrly8 = RLY8(ADDR)\n\n# Print some information\nprint(rly8.name)\nprint(rly8.netconf)\nprint(rly8.version)\nprint(rly8.baudrate)\n\n# Change some basic settings\nrly8.setName(\"DFRobot2\") # Default: \"DFRobot\"\nrly8.setBaudrate(9600)   # Default: 115200\n\n# Enable a relay (relays are numbered 1 to 8, states are \"on\" or \"off\")\nrly8.setRelayStatus(1, \"on\")\n\n# Print the status of a relay\nprint(rly8.relay1)\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffescron%2Fdfrobot-rly8-python3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffescron%2Fdfrobot-rly8-python3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffescron%2Fdfrobot-rly8-python3/lists"}