REST-light is a simple microservice to control 433Mhz wireless sockets over HTTP, e.g. on a RaspberryPi. The main usage is an easy integration of 433Mhz wireless sockets in SmartHome Tools like openHAB or ioBroker.
The project is an API-Wrapper around the famous 443Utils project.
How to Use
The setup is very simple. There is nothing to configure, except running the container. For the app to be able to persist the API-Key, ensure the mounted volume is writeable for UID/GID 33.
- Install Docker on your RaspberryPi
- Attach a 433Mhz transmitter to WiringPi Pin 2 of your RaspberryPi
- Run REST-light and receive the generated API-Key from
docker logson first startup.
- Try your first request! For an example, see section "curl request example"
For the app to be able to use the Pi's GPIO-PINs, they need to be exposed to the container. There are multiple options to do this, as explained here.
From the ones available, i had the best experience using the "device-approach" as stated below.
docker run -d --device /dev/gpiomem -v <your-path>/rest-light:/etc/rest-light -p 4242:4242 uupascal/rest-light:DEV-latest
version: "3.8" services: rest-light: container_name: REST-light image: "uupascal/rest-light:latest" restart: unless-stopped volumes: - "<your-path>/rest-light:/etc/rest-light" devices: - /dev/gpiomem ports: - 4242
curl request example
curl http://127.0.0.1:4242/send \ --data-urlencode "api_key=<key from docker logs>" \ --data-urlencode "system_code=10000" \ --data-urlencode "unit_code=2" \ --data-urlencode "state=0" curl http://127.0.0.1:4242/codesend \ --data-urlencode "api_key=<key from docker logs>" \ --data-urlencode "decimalcode=500000"
Although this project was developed with current security best-practices in mind, it is still built around software which was not updated for at least 6 years. I would therefor strongly encourage you to only use this container on private & trusted networks and to never expose it to the internet. As the license implies, this software is provided without warranty of any kind.
Versioning & docker tags
Use the docker tag
latest to always get the latest stable image.
The images are also tagged with the current timestamp, so to pin to a static version, you can for example use the tag
Unstable/Development versions are prefixed with
DEV- and should only be used for testing purposes.
We love your input! For details see CONTRIBUTING.md
The project relies on 443Utils.