Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/goto-eof/elisys-esp32-relay-client-rust
This application, developed in Rust programming language, allows to control remotely a relay controlled by an ESP32 device kit.
https://github.com/goto-eof/elisys-esp32-relay-client-rust
esp32 relay remote remotecontrol rust
Last synced: 13 days ago
JSON representation
This application, developed in Rust programming language, allows to control remotely a relay controlled by an ESP32 device kit.
- Host: GitHub
- URL: https://github.com/goto-eof/elisys-esp32-relay-client-rust
- Owner: goto-eof
- Created: 2023-12-02T17:05:04.000Z (12 months ago)
- Default Branch: master
- Last Pushed: 2023-12-21T18:00:18.000Z (11 months ago)
- Last Synced: 2023-12-21T19:58:17.530Z (11 months ago)
- Topics: esp32, relay, remote, remotecontrol, rust
- Language: Rust
- Homepage:
- Size: 93.8 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Elisys ESP32 Relay Client (Rust)
This application, developed in Rust programming language, allows to control remotely a relay controlled by an ESP32 device kit. The application communicates with [**Elisys Home Automation (Java)**](https://github.com/goto-eof/elisys-home-automation-server-java) from wich retrieves the configuration and activates or deactivates the relay. Please check the `Configuration` section to build the project.
# How it works?
The application tries to connect to the WiFi, if the connection fails, then it will retry until it succeeds. After a connection is established, the application makes a request to the server in order to register the device and then it downloads the configuration from the remote server. The configuration contains information about the status that should have the device: on or off. So that the relay is disabled or enabled in base of the configuration JSON received by the remote server. The ESP32 application will check every 2 seconds for new configuration.
| GPIO | Description |
| ---- | ----------- |
| 15 | relay pin |# Configuration
Before you proceed with building the project, you need to rename the `/src/configuration/configuration-sample.rs` to `/src/configuration/configuration.rs`. Then you shall edit the variables in the `configuration.rs` file (WiFi SSID, WiFi Password and Configuration Server Endpoint)
# Run the project on your ESP32 device
```
cargo run
```# Photo
![relay rust](/images/esp32-relay-client-rust.jpg)
I tested on ESP32-DevKitC and developed on Ubuntu. If you have environment configuration issues, take a look [here](https://dodu.it/esp32-rust-configure-environment-linux-ubuntu/).
If you found a bug, feel free to contact [me](https://andre-i.eu/#contactme).