Welcome to MAKO IoT
MAKO IoT is a platform for building IoT applications based on .NET. It leverages the power of C# language and software best practices. It is based on .NET nanoFramework
The goal of MAKO IoT is to provide:
- across-the-board development experience with highest software industry standard best practices
- building blocks for common tasks / functionalities
- templates and boilerplate which make doing right things easy and doing wrong things hard
- tools & practices
Build your app with MAKO IoT
Pre-requisites
Code your project
Create two nanoFramework projects. For example: MyProject.Device (Class Library) and MyProject.Device.App (nanoFramework Application).
MyProject.Device
Implement your logic here. You will be able to unit test this project (without hardware!). Place everything your software needs to do here, abstracting hardware-specific operations with interfaces. For example, if you want to blink a LED - create IBlinker interface here with void Blink(bool isOn); method.
MyProject.Device.App
This is the entry point to your software. Use DeviceBuilder to link all components together (MAKO IoT and your code) in the Main() method of Program class. Also, implement your hardware-specific logic here. For example, concrete blinker class for the interface above: LedBlinker : IBlinker. Link the interface with the class in ConfigureDI section of DeviceBuilder.
Test your code
Create nanoFramework test project and implement unit tests for your logic from MyProject.Device (Class Library).
Give it a go!
Connect your device, Set Startup Project to MyProject.Device.App (nanoFramework Application) and run it.
Take a look at Samples.
MAKO IoT components
Composition & Abstractions
- Interface - Interfaces for most of MAKO IoT components. Start building your app here :)
- Device - This brings all your MAKO IoT components together, configures your solution and runs your app.
Configuration
External Configuration
With those componentes you can read & write configuration through REST API. This is particularly useful when setting up a device i.e. entering WiFi credentials.
- Configuration Manager - Controls device's modes: normal operation or configuration mode. When device enters configuration mode, WiFi goes into Access Point mode and configuration API is served.
- Configuration API - The REST API for configuring your device's settings.
- Configration Metadata - Metadata provide a way to publish extra details about your settings, such as labels, data types etc. through the API. Decorate your configuration classes with attributes, build and run Metadata Generator.
- Metadata Generator - This tool generates metadata from config attributes. Attributes are not fully supported in nanoFramework, so this can't be done on device.
- Configuration App - Configuration API client with UI (Blazor WebAssembly app).
- Configuration API Model - Model for the configuration & metadata objects.
Networking
- WiFi - Provides basic WiFi network operations.
- WiFi AP - Handles WiFi in Access Point mode.
- API/Web Server - Simple on-device web server.
Messaging
Message Bus - device
- Message Bus - Message bus with strongly-typed contracts and automatic (type & convention based) routing.
- MQTT - MQTT transport for the Message Bus.
- AzureIoT - AzureIoT transport for the Message Bus.
Message Bus - .NET Core
- Interfaces - .NET Core interfaces for Message Bus
- Message Bus - .NET Core implementation of Message Bus
- MQTT - MQTT transport for Message Bus
Other
- Data Providers - If you need to periodically read a sensor or submit data of an event, this is where you start :)
- ESP32 DeepSleep Data Provider - If you need to periodically read a sensor or submit data of an event and go to sleep, this is where you start :)
In-process communication
- Mediator - Mediator pattern implementation. An easy-to-use publisher-subscriber bus.
Storage
System Utilities
Hardware Specific
- LED - Blinks a LED in a multiple ways ("soft" PWM blinks, RBG color transitions etc.)
Various Utilities
- String - Useful String operations.
- Time Zones - The way to get local time on your device instead just UTC :)
- iCalendar - Parses calendar events.
- Messaging - Two-way communication across device and .NET application through Message Bus and MQTT. Also demonstrates how to share code between nanoFramework and "big" .NET.
- Configuration API - Shows how to configure your settings from external.
- Log Storage - Example usage of logging to local storage and sending out the logs to Elasticsearch server.
- Mediator - Example of Mediator usage.
- Waste Bins Calendar - Project of a device, which indicates bins for collection on a given day. It demonstrates how to compose multiple MAKO IoT building blocks into a useful product :)