2c86c7741d33ba2d254a06a26eaaa1fb11b0b837
This 
Core api and Esp32 code for displaying weather data and public transport information on a e-ink display.
Features
- Display current weather data
- Display public transport information
- Display time and date
Requirements
- ESP32 board
- E-ink display (e.g. Waveshare 7.5 inch)
Installation
This section provides instructions for setting up and running the HomeApi project.
Prerequisites
- .NET 9.0 SDK or later
- Docker (optional, for containerized deployment)
- Git (to clone the repository)
Option 1: Local Development Setup
-
Clone the repository:
git clone https://github.com/Myxelium/HomeScreen.git cd HomeApi -
Restore dependencies:
dotnet restore -
Build the project:
dotnet build -
Run the application:
dotnet run
The API will be available at http://localhost:5000.
Option 2: Docker Deployment
-
Build the Docker image:
docker build -t homeapi . -
Run the container:
docker run -d -p 5000 --name homeapi homeapi
The API will be accessible at http://localhost:5000.
Configuration
The application uses the standard .NET configuration system. You can modify settings in:
appsettings.json- Default configurationappsettings.Development.json- Development environment configuration
API endpoints:
- Weather data: GET
/home - Generated image: GET
/home/default.jpg - Configuration data: GET
/home/configuration - Departure board: GET
/home/departure-board
API Documentation
When running, API documentation is available through Scalar at /scalar.
flowchart TD
subgraph ESP32 Device
ESP[ESP32 E-Ink Display]
ESP -->|HTTP GET /home/configuration| API
ESP -->|HTTP GET /home/default.jpg| API
end
subgraph HomeApi
API[HomeControllerAPI]
API -->|MediatR| Handlers
Handlers -->|Service Calls| Services
Services -->|Refit Clients| Clients
Clients -->|External APIs| ExtAPIs
API -->|Returns JSON/JPEG| ESP
end
subgraph ExternalAPIs
WeatherAPI[Weather API]
AuroraAPI[Aurora API]
NominatimAPI[Nominatim API]
ResRobotAPI[ResRobot API]
end
ExtAPIs -.-> WeatherAPI
ExtAPIs -.-> AuroraAPI
ExtAPIs -.-> NominatimAPI
ExtAPIs -.-> ResRobotAPI
Description
Releases
26
Release v0.2.2
Latest
Languages
C#
51.9%
C++
25.4%
HTML
21.3%
Dockerfile
1.4%