From f0432c4df4944d8eec198ed7999829c07a6abfc9 Mon Sep 17 00:00:00 2001 From: Fabien Crespel Date: Thu, 9 May 2024 15:39:59 +0000 Subject: [PATCH] chore: rename to rf433-api --- .github/workflows/build.yml | 2 +- README.md | 12 ++++++------ app/server.py | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index e99e2d6..c4958b0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -5,7 +5,7 @@ on: [push, workflow_dispatch] env: DOCKER_REGISTRY: ghcr.io DOCKER_REPO: ${{ github.repository_owner }} - DOCKER_IMAGE: rc-server + DOCKER_IMAGE: rf433-api DOCKER_TAG: ${{ github.ref_name }} DOCKER_PLATFORM: linux/arm64 diff --git a/README.md b/README.md index 7cd681f..b8140d1 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# Remote Control REST API +# RF433 REST API REST API to use an RF 433 MHz transmitter as a remote control. It currently only supports the Chacon DIO 1.0 and Chacon 54662 protocols. @@ -43,23 +43,23 @@ Optional arguments: A Docker image is also available for the arm64 architecture: ``` -docker run -it --rm --privileged -p 8001:8001 ghcr.io/fcrespel/rc-server:master [-h] [-a ADDRESS] [-p PORT] [-g GPIO] [-l LOG_LEVEL] +docker run -it --rm --privileged -p 8001:8001 ghcr.io/fcrespel/rf433-api:master [-h] [-a ADDRESS] [-p PORT] [-g GPIO] [-l LOG_LEVEL] ``` You may want to run it in the background using commands such as the following: ``` # Create and start container -docker run -d --name rc-server --privileged -p 127.0.0.1:8001:8001 ghcr.io/fcrespel/rc-server:master +docker run -d --name rf433-api --privileged -p 127.0.0.1:8001:8001 ghcr.io/fcrespel/rf433-api:master # Stop server -docker stop rc-server +docker stop rf433-api # Start server -docker start rc-server +docker start rf433-api # Show live logs -docker logs -f rc-server +docker logs -f rf433-api ``` NOTE: the API port is not secured, make sure to only expose it locally or to trusted clients. diff --git a/app/server.py b/app/server.py index f5288cf..b9f5c82 100755 --- a/app/server.py +++ b/app/server.py @@ -22,7 +22,7 @@ async def lifespan(app: FastAPI): wiringpi.pinMode(app.state.gpio, wiringpi.OUTPUT) yield -app = FastAPI(title="Remote Control REST API", description="REST API to use an RF 433 MHz transmitter as a remote control", version="1.0", lifespan=lifespan) +app = FastAPI(title="RF433 REST API", description="REST API to use an RF 433 MHz transmitter as a remote control", version="1.0", lifespan=lifespan) app.include_router(chacon54662_router) app.include_router(chacondio10_router) app.state.gpio = 0