Skip to content

arturmon/mycontroller

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MyController.org

About

MyController.org is a controller for the MySensors project. Considered system resources in mind. Even we can run it on Raspberry PI (256 MB) very first model.

System Requirement

MyController.org server is very lightweight, It required very less resource, believe me ;)

  • Disk : ~30 MB

  • Memory(RAM) : 40 MB

  • Java : 1.8 or later

    NOTE: Test done up to 5 nodes and 30 sensors with the above configuration.
Supported Platforms (tested)

MyController.org is java based application server. We can run it in any platform which supports Java.

  • Linux

  • Windows

  • Raspberry PI (Oracle Java recommend)

Available Features

Features available in 0.0.2-alpha5 version,

  • Supports Serial Gateway, Ethernet Gateway, MQTT Gateway and NRF24L01+ gateway via PiGatewaySerial (https://github.com/mysensors/Raspberry) on Raspberry PI

  • Auto discover and update nodes(upon nodes restart or receive any data)

  • Timer - Help you schedule time based operations. You can control till the seconds. Types,

    • Normal (daily, weekly, monthly)

    • Cron

    • Before/After Sun Rises and Sun Sets

  • Alarm - based on information received from sensor

    • Notifications: Send Payload to another sensor, Sens SMS, Send Email

  • Graphical reports (Last one hour, 24 hours, 30 days, years)

  • Forward payload from one sensor to another sensor

  • Logs report

  • Send Payload to sensor

  • Reboot, Erase EEPROM, Update Firmware for any nodes which is running with MYSBootloader

  • Maintain firmware for all the nodes

  • Display battery level of node

  • Unique Identification number for each sensor

  • MyController.org server health status

Installation

Configuration

Extract downloaded bundle where exactly do you want to run. Configuration files located in mycontroller/conf

File: mycontroller.properties

Select your gateway

mcc.ethernet.gateway.type=ethernet
  • mcc.ethernet.gateway.type: Available gateway types: serial, ethernet, mqtt

Serial Port Gateway Configuration

mcc.serialport.driver.type=auto
mcc.serialport.name=/dev/ttyUSB0
mcc.serialport.baud.rate=115200
  • mcc.serialport.driver.type: Available driver types: pi4j, jssc, jserialcomm, auto. It is recommended to keep in auto. For now jssc driver is not stable with MyController.org

  • mcc.serialport.name : will vary based on platform and number of ports. Find it on your computer and update

  • mcc.serialport.baud.rate : by default Serial Gateway uses 115200. If you changed on your setup you have to update your custom value here.

Ethernet Gateway Configuration

mcc.ethernet.gateway.host=192.168.178.6
mcc.ethernet.gateway.port=5003
mcc.ethernet.gateway.keep.alive.frequency=60
  • mcc.ethernet.gateway.host: Host name/ip of your Ethernet Gateway

  • mcc.ethernet.gateway.port: Ethernet Gateway port

  • mcc.ethernet.gateway.keep.alive.frequency: This field is used to monitor Ethernet Gateway. If Connection goes try to reconnect automatically. Value in seconds.

MQTT Gateway

mcc.mqtt.gateway.broker.host=192.168.178.6
mcc.mqtt.gateway.broker.port=1883
mcc.mqtt.gateway.broker.root.topic=MyMQTT
  • mcc.mqtt.gateway.broker.host: MQTT Gateway Hostname/IP

  • mcc.mqtt.gateway.broker.port: MQTT Gateway port

  • mcc.mqtt.gateway.broker.root.topic: Topic name, Should be same name that we used in MQTT Gateway(MQTT_BROKER_PREFIX)

Database Configuration

mcc.h2db.location=../conf/mycontroller

You can change default location and file name. File will be stored with the file extension .h2.db. Do not add file extenstion.

Web server configuration

enable.https=true
http.port=8443
ssl.keystore.file=../conf/keystore.jks
ssl.keystore.password=password
ssl.keystore.type=JKS
  • enable.https : Enable/disable https. Only one protocol supported at a time.

  • http.port : Port number you want to access MyController.org server

  • ssl.keystore.file, ssl.keystore.password, ssl.keystore.type : If https is enabled these fields are mandatory.

Default username/password: admin/admin

Important
Change default ssl.keystore.file and ssl.keystore.password and https protocol is recommended

Logger configuration

Configuration File Name: logback.xml

Default log file location: logs/mycontroller.log

Start/Stop Server

Executable scripts are located in mycontroller/bin/

  • Linux

    • Start : ./start.sh

    • Stop : ./stop.sh

  • Windows

    • Start : Double click on start.bat

    • Stop : Ctrl+C

  • Other Platforms

java -Xms8m -Xmx40m -Dlogback.configurationFile=../conf/logback.xml -Dmc.conf.file=../conf/mycontroller.properties -jar ../lib/mycontroller-standalone-0.0.1-single.jar

Packages

No packages published

Languages

  • Java 52.3%
  • JavaScript 21.2%
  • CSS 13.6%
  • HTML 12.6%
  • Other 0.3%