This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

Overview

MyController is an IoT automation controller for home, office or any place.
There is no internet requirement for the MyController. You can run the complete setup on your private environment
MyController is designed to run with a limited resources. It can run on the first generation of the Raspberry PI.

MyController 2.x is completely redesigned. You can not upgrade from MyController 1.x

Technologies Used

Architecture Guide

MyController Services and Bundles

MyController has many services and all communicates via Message Bus.
Based on the services and use cases, MyController bundled as follows,

Server Setup

server setup

  • This package contains MyController Server + Gateway + Handler services
  • All the services combined and bundled as single binary
  • As it has all the services in a single binary, It is possible to use embedded Bus, which cannot be accessible outside of the MyController server (Options #1)
  • If you have plan to use external gateway, or handler you have to go with external bus service (natsio) (Option #2)

Gateway Setup

gateway setup

  • There is a gateway only bundle
  • This service can be connected to a MyController server via the external message bus.
  • You can have many number of gateway services on different hosts

Handler Setup

handler setup

  • There is a handler only bundle
  • This service can be connected to a MyController server via the external message bus.
  • You can have many number of handler services on different hosts

Supported Providers

What next?

1 - Architecture

architecture

Message bus

  • All services rely on centralized message bus. Which leads we can have micro service for each block shown above.
  • Most of the components based on a plugin approach. Other services can be included easily

Gateway

  • Gateway is a service that collects data from different networks. Also can do changes on the target network.
  • Gateway is as plugin component, we can implement gateway for any provider
  • Supported providers list

Gateway Message Processor

  • Collects data from a gateway and updates in storage and metrics database
  • Sends received data as events, will be used in other services (Task, Forward Payload, etc.,)

Forward Payload

  • Forwards a payload from a Field to another Field
  • Fields can be on a different gateways

Task Service

  • User defined tasks will be executed by Task Service
  • Two types of tasks are available
  1. Event based
    • Tasks can listen to specific events.
  2. Execute on an interval
    • executes tasks based on the interval defined
  • If task meets the defined criteria, posts the given parameters to the Handler Service

Scheduler Service

  • User defined schedules are executed by Scheduler Service
  • outcome of the schedule execution handover the defined parameters to the Handler Service

Handler Service

  • Receives requests from Task Service and Scheduler Service
  • Submits the parameters to a specific handler
  • new handlers can be implemented easily as it is a plugin component

API and Websocket Service

  • Exposes set of APIs to consume and operate resources
  • Websocket notifies the changes on the resources, helps to sync the dashboard realtime
  • Web UI is client consumes query service APIs
    • User can add/modify most of the data here
    • Update Gateway details
    • Create a dashboard with different widgets
    • Add a schedule, task, handler, firmware
    • Run a backup, restore
    • etc…

Storage Database

  • Stores all the data other than metrics
    • gateways, Node, Source, Fields, Dashboard, Task, Scheduler, Handler, etc.,
  • storage is a plugin type
  • Currently there are two type of supported storage plugin
    • in-memory
      • Keeps all the configurations on the memory/RAM
      • Dumps into disk with defined intervals
      • On startup loads from the disk
    • MongoDB

Metric Database

  • Stores only the metrics data
  • Metric is a plugin type
  • Currently supports InfluxDB