Home Cory{dot}tech Logo

Complete • Feb 2024 – Mar 2024

C#

UDP

Temperature and Humidity Sensor Server on GitHub →

Project History and Development

This project is the counterpart to the ESP32 temperature/humidity sensor project. This app is a C# (specifically, .NET 8) service worker app. It listens for UDP messages, and when one is received, it decodes the data (which is in CBOR format) and sends it to a REST API endpoint that is hosted in this website. This project makes use of C#'s dependency injection and HttpClient features.

This app is hosted locally on my home network on a Raspberry Pi 5 running Ubuntu 22.04, where it runs as a systemd background service.

Future Plans

Like the ESP32 sensor project, this app is well-designed to receive messages that are encoded using CBOR, but a good future expansion would be to incorporate some method of detecting incoming message formats and decoding them as appropriate. In addition, another expansion that I'd like to make is to add multiple data handlers—this way, the app would be able to offer multiple ways to deal with data, such as saving locally to a database, sending data to a REST API endpoint, or some other method.