Sunshine is a project I started to learn how someone would go about building an IoT project. My use case was to connect to my solar inverter and export the data to store where I could produce my own reporting against it.
The project is made up of 3 components:
- Downloader
- .NET Core application written in F#
- Deployed as a Docker image
- Pulls the data from the inverter and pushes it to Azure IoT Hub
- Functions
- Azure Functions for processing the data, written in F# against the v2 runtime
- Listens to a set of Event Hubs for incoming messages
- Writes to Table Storage
- Mock API
- A fake implementation of my inverter API so I can dev when I'm not at home
- Implemented using Saturn, a F# web framework
The Downloader runs in a Docker container and will either talk to the Mock API (local dev) or the inverter (production) and push the data up to Azure IoT Hub. IoT Hub will then route the data to one of several Event Hubs which the Functions are subscribed to for processing and storage in Table Storage.
Deployments are orchestrated using Azure Pipelines to build the images, push to Azure Container Registry and then use Azure IoT Edge to deploy onto either my test device or my production device.
You'll find more information on the process on my blog through the series Home Grown IoT.
Logo: solar by iconsmind.com from the Noun Project