Skip to content

Commit

Permalink
Merge pull request #229 from mycontroller-org/development
Browse files Browse the repository at this point in the history
Update MyController master to version 0.0.3.Alpha2
  • Loading branch information
jkandasa authored Jul 29, 2016
2 parents d233a4e + 6c85390 commit e8afb02
Show file tree
Hide file tree
Showing 1,066 changed files with 42,951 additions and 19,183 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,4 @@ branches:
install:
- mvn -version -B
script:
- mvn test
- mvn verify
68 changes: 10 additions & 58 deletions README.adoc
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
image::logo-mycontroller.org_full.png[MyController.org, link="http://www.mycontroller.org"]
image::extra/images/logo-mycontroller.org_full.png[MyController.org, link="http://www.mycontroller.org"]
:source-language: java, angularjs

---
Expand All @@ -14,6 +14,7 @@ Master: image:https://travis-ci.org/mycontroller-org/mycontroller.svg?branch=mas
Development: image:https://travis-ci.org/mycontroller-org/mycontroller.svg?branch=development["Build Status", link="https://travis-ci.org/mycontroller-org/mycontroller"]

====== Project website: http://www.mycontroller.org
====== Forum: http://forum.mycontroller.org
====== Want to try now? http://demo.mycontroller.org[Demo server] Authentication: demo/demo

== About
Expand All @@ -29,74 +30,25 @@ MyController.org supports multiple languages. If you have interest to add/transl
MyController.org is a very lightweight server, It required very less resource, believe me ;)

* Disk : ~30 MB (may require more space, when we store metrics data for long time)
* Memory(RAM) : 40 MB
* Memory(RAM) : 100 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 where Java support is available.

- Linux
- Windows
- Raspberry PI (Oracle Java recommend)

== Available Features

Features available in https://github.com/mycontroller-org/mycontroller/releases/tag/0.0.3-alpha1[0.0.3-alpha1] version,

- Supported networks
* http://mysensors.org[MySensors.org]
** http://www.mysensors.org/build/serial_gateway[Serial Gateway]
** http://www.mysensors.org/build/ethernet_gateway[Ethernet Gateway]
** http://www.mysensors.org/build/mqtt_gateway[MQTT Gateway]
** NRF24L01+ gateway via PiGatewaySerial (https://github.com/mysensors/Raspberry) on Raspberry PI
- Auto discover and update nodes
- Timer - Help you to schedule time based operations. You can control till the seconds. Types,
* Simple (with `repeat count` and `repeat interval`)
* Normal (daily, weekly, monthly)
* Cron expression
* Before/After Sun Rises and Sun Sets
- Alarm - based on information received from sensor, Node status or Gateway status
* An alarm can support multiple notifications
- Notifications - is a predefined action to be performed when a alarm triggered.
* Send Payload to another sensor
* Send SMS. Supports https://www.plivo.com/[Plivo] and https://www.twilio.com[Twilio]
* Send Email
* https://www.pushbullet.com[Pushbullet] note
- Graphical reports
* you can keep your sensors metrics data as long as you want.
- Forward payload from one sensor to another sensor
* supports across gateways also
- Resources logs
- Node actions
* Reboot, Erase configuration, Update Firmware for any nodes which is support
* can tag particular firmware for a node
* Display battery level of node with graphical support
- Intractive dashboard.
* can create any number of dashboards
* widgets
** Server time
** Sunrise and sunset time
** Sensors bullet graph
** a sensor graph
** group of sensors graph
** mixed sensors graph
** monitor and control sensor
- Backup and restore via GUI
- version to version auto migration support. available from 0.0.3-alpha1
- Role based authentication
* can map resources for particular user
- Inbuilt MQTT broker
- Supports multiple gateways
- and many more

== MyController and MySensors Setup

image::extra/images/MyController-MySensors-RF.png[MyController and MySensors setup.]

== Installation

====== Download(executable bundle),

* https://github.com/mycontroller-org/mycontroller/releases/download/0.0.3-alpha1/mycontroller-standalone-0.0.3-alpha1-bundle.zip[mycontroller-standalone-0.0.3-alpha1-bundle.zip]
* https://github.com/mycontroller-org/mycontroller/releases/download/0.0.3-alpha1/mycontroller-standalone-0.0.3-alpha1-bundle.tar.gz[mycontroller-standalone-0.0.3-alpha1-bundle.tar.gz]
* Visit MyController.org http://www.mycontroller.org/#/downloads[downloads page]

====== Configuration

Expand Down Expand Up @@ -174,7 +126,7 @@ Executable scripts are located in `mycontroller/bin/`
- 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.3-alpha1-single.jar
java -Xms8m -Xmx100m -Dlogback.configurationFile=../conf/logback.xml -Dmc.conf.file=../conf/mycontroller.properties -cp "../lib/*" org.mycontroller.standalone.StartApp
```
2 changes: 2 additions & 0 deletions dist/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/target/
/bin/
2 changes: 1 addition & 1 deletion .tx/config → dist/.tx/config
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ host = https://www.transifex.com
source_file = src/main/package/www/languages/mc_locale_gui_source_en.json
source_lang = en
file_filter = src/main/package/www/languages/mc_locale_gui-<lang>.json
lang_map = en_US:en_us, de_DE:de_de, ru_RU:ru_ru, ta_IN:ta_in, hi_IN:hi_in, pt_PT:pt_pt, es_AR:es_ar, ca_ES:ca_es, es_ES:es_es, nl_NL:nl_nl
lang_map = en_US:en_us, de_DE:de_de, ru_RU:ru_ru, ta_IN:ta_in, hi_IN:hi_in, pt_PT:pt_pt, es_AR:es_ar, ca_ES:ca_es, es_ES:es_es, nl_NL:nl_nl, da_DK:da_dk, pt_BR:pt_br, fr_FR:fr_fr, mk_MK:mk_mk, ro_RO:ro_ro

[multi-locale.mc_locale_java]
source_file = src/main/resources/mc_locale/mc_locale_java-source_en.properties
Expand Down
5 changes: 3 additions & 2 deletions locale_fix.sh → dist/locale_fix.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
#
# Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
# Copyright 2015-2016 Jeeva Kandasamy ([email protected])
# and other contributors as indicated by the @author tags.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand Down
102 changes: 102 additions & 0 deletions dist/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
<!--
Copyright 2015-2016 Jeeva Kandasamy ([email protected])
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.mycontroller.standalone</groupId>
<artifactId>mycontroller-standalone-parent</artifactId>
<version>0.0.3.Alpha2</version>
</parent>

<artifactId>mycontroller-dist</artifactId>
<url>https://github.com/mycontroller-org</url>
<inceptionYear>2015</inceptionYear>
<packaging>jar</packaging>

<properties>
<mc.dist.finalName>${project.artifactId}-standalone-${project.version}</mc.dist.finalName>
<mc.dist.jar.finalName>${mc.dist.finalName}-single</mc.dist.jar.finalName>
</properties>

<dependencies>
<!-- internal dependencies -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>mycontroller-core</artifactId>
<version>${project.version}</version>
</dependency>
</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-shade-plugin</artifactId>
<configuration>
<createDependencyReducedPom>true</createDependencyReducedPom>
<filters>
<filter>
<artifact>*:*</artifact>
<excludes>
<exclude>META-INF/*.SF</exclude>
<exclude>META-INF/*.DSA</exclude>
<exclude>META-INF/*.RSA</exclude>
</excludes>
</filter>
</filters>
</configuration>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>shade</goal>
</goals>
<configuration>
<finalName>${mc.dist.jar.finalName}</finalName>
<transformers>
<transformer
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
<transformer
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
<mainClass>org.mycontroller.standalone.StartApp</mainClass>
</transformer>
</transformers>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>attached</goal>
</goals>
</execution>
</executions>
<configuration>
<finalName>${mc.dist.finalName}</finalName>
<descriptor>src/main/assembly/binary-deployment.xml</descriptor>
</configuration>
</plugin>
</plugins>
</build>

</project>
Original file line number Diff line number Diff line change
@@ -1,6 +1,23 @@
<!--
Copyright 2015-2016 Jeeva Kandasamy ([email protected])
and other contributors as indicated by the @author tags.
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
<assembly>
<id>bundle</id>

<formats>
<format>zip</format>
<format>tar.gz</format>
Expand Down Expand Up @@ -32,9 +49,9 @@
<directory>${project.basedir}/target</directory>
<outputDirectory>mycontroller/lib</outputDirectory>
<includes>
<include>mycontroller-standalone-*-single.jar</include>
<include>${mc.dist.jar.finalName}.jar</include>
</includes>
<fileMode>755</fileMode>
<fileMode>664</fileMode>
<directoryMode>764</directoryMode>
</fileSet>
<fileSet>
Expand All @@ -54,4 +71,4 @@
<scope>runtime</scope>
</dependencySet>
</dependencySets>
</assembly>
</assembly>
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
@REM
@REM Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
@REM Copyright 2015-2016 Jeeva Kandasamy ([email protected])
@REM and other contributors as indicated by the @author tags.
@REM
@REM Licensed under the Apache License, Version 2.0 (the "License");
@REM you may not use this file except in compliance with the License.
@REM You may obtain a copy of the License at
@REM
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM http://www.apache.org/licenses/LICENSE-2.0
@REM
@REM Unless required by applicable law or agreed to in writing, software
@REM distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -16,12 +17,10 @@

@ECHO OFF
SET HEAP_MIN=-Xms8m
SET HEAP_MAX=-Xmx40m

SET MC_VERSION=0.0.3-alpha1
SET HEAP_MAX=-Xmx100m

SET CONF_PROPERTIES_FILE=../conf/mycontroller.properties
SET CONF_LOG_FILE=../conf/logback.xml

@ECHO ON
java %HEAP_MIN% %HEAP_MAX% -Dlogback.configurationFile=%CONF_LOG_FILE% -Dmc.conf.file=%CONF_PROPERTIES_FILE% -jar ../lib/mycontroller-standalone-%MC_VERSION%-single.jar > ../logs/mycontroller_console.log 2>&1
java %HEAP_MIN% %HEAP_MAX% -Dlogback.configurationFile=%CONF_LOG_FILE% -Dmc.conf.file=%CONF_PROPERTIES_FILE% -cp "../lib/*" org.mycontroller.standalone.StartApp > ../logs/mycontroller_console.log 2>&1
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
#!/bin/bash
#
# Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
# Copyright 2015-2016 Jeeva Kandasamy ([email protected])
# and other contributors as indicated by the @author tags.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
Expand All @@ -25,19 +26,18 @@ cd ${ACTUAL_LOCATION}

#Java Heap settings
HEAP_MIN=-Xms8m
HEAP_MAX=-Xmx40m
HEAP_MAX=-Xmx100m

JAVA_VERSION="1.7"
MC_VERSION="0.0.3-alpha1"

#configuration file location
CONF_PROPERTIES_FILE=../conf/mycontroller.properties
CONF_LOG_FILE=../conf/logback.xml

if type -p java; then
_java=java
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
_java="$JAVA_HOME/bin/java"
elif type -p java; then
_java=java
else
echo "java is not installed in our machine"
fi
Expand All @@ -46,15 +46,15 @@ if [[ "$_java" ]]; then
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
echo "java version: $version"
if [[ "$version" > "$JAVA_VERSION" ]]; then
MC_PID=`ps -ef | grep mycontroller-standalone | grep -v grep | awk '{ print $2 }'`
MC_PID=`ps -ef | grep "org.mycontroller.standalone.StartApp" | grep -v grep | awk '{ print $2 }'`
if [ ! -z "$MC_PID" ]
then
echo "Mycontroller.org server is already running on pid[${MC_PID}]"
else
java ${HEAP_MIN} ${HEAP_MAX} -Dlogback.configurationFile=${CONF_LOG_FILE} -Dmc.conf.file=${CONF_PROPERTIES_FILE} -jar ../lib/mycontroller-standalone-${MC_VERSION}-single.jar >> ../logs/mycontroller.log 2>&1 &
$_java ${HEAP_MIN} ${HEAP_MAX} -Dlogback.configurationFile=${CONF_LOG_FILE} -Dmc.conf.file=${CONF_PROPERTIES_FILE} -cp "../lib/*" org.mycontroller.standalone.StartApp >> ../logs/mycontroller.log 2>&1 &
echo 'Start issued for Mycontroller'
fi
else
else
echo "Mycontroller.org server required java version $JAVA_VERSION or later"
fi
fi
Expand Down
Loading

0 comments on commit e8afb02

Please sign in to comment.