Skip to content

Commit e8afb02

Browse files
authored
Merge pull request #229 from mycontroller-org/development
Update MyController master to version 0.0.3.Alpha2
2 parents d233a4e + 6c85390 commit e8afb02

File tree

1,066 files changed

+42951
-19183
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,066 files changed

+42951
-19183
lines changed

.travis.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ branches:
88
install:
99
- mvn -version -B
1010
script:
11-
- mvn test
11+
- mvn verify

README.adoc

+10-58
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
image::logo-mycontroller.org_full.png[MyController.org, link="http://www.mycontroller.org"]
1+
image::extra/images/logo-mycontroller.org_full.png[MyController.org, link="http://www.mycontroller.org"]
22
:source-language: java, angularjs
33

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

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

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

3132
* Disk : ~30 MB (may require more space, when we store metrics data for long time)
32-
* Memory(RAM) : 40 MB
33+
* Memory(RAM) : 100 MB
3334
* Java : 1.8 or later
3435

35-
NOTE: Test done up to 5 nodes and 30 sensors with the above configuration.
36-
3736
===== Supported Platforms (tested)
3837
MyController.org is java based application server. We can run it in any platform where Java support is available.
3938

4039
- Linux
4140
- Windows
4241
- Raspberry PI (Oracle Java recommend)
4342

44-
== Available Features
45-
46-
Features available in https://github.com/mycontroller-org/mycontroller/releases/tag/0.0.3-alpha1[0.0.3-alpha1] version,
47-
48-
- Supported networks
49-
* http://mysensors.org[MySensors.org]
50-
** http://www.mysensors.org/build/serial_gateway[Serial Gateway]
51-
** http://www.mysensors.org/build/ethernet_gateway[Ethernet Gateway]
52-
** http://www.mysensors.org/build/mqtt_gateway[MQTT Gateway]
53-
** NRF24L01+ gateway via PiGatewaySerial (https://github.com/mysensors/Raspberry) on Raspberry PI
54-
- Auto discover and update nodes
55-
- Timer - Help you to schedule time based operations. You can control till the seconds. Types,
56-
* Simple (with `repeat count` and `repeat interval`)
57-
* Normal (daily, weekly, monthly)
58-
* Cron expression
59-
* Before/After Sun Rises and Sun Sets
60-
- Alarm - based on information received from sensor, Node status or Gateway status
61-
* An alarm can support multiple notifications
62-
- Notifications - is a predefined action to be performed when a alarm triggered.
63-
* Send Payload to another sensor
64-
* Send SMS. Supports https://www.plivo.com/[Plivo] and https://www.twilio.com[Twilio]
65-
* Send Email
66-
* https://www.pushbullet.com[Pushbullet] note
67-
- Graphical reports
68-
* you can keep your sensors metrics data as long as you want.
69-
- Forward payload from one sensor to another sensor
70-
* supports across gateways also
71-
- Resources logs
72-
- Node actions
73-
* Reboot, Erase configuration, Update Firmware for any nodes which is support
74-
* can tag particular firmware for a node
75-
* Display battery level of node with graphical support
76-
- Intractive dashboard.
77-
* can create any number of dashboards
78-
* widgets
79-
** Server time
80-
** Sunrise and sunset time
81-
** Sensors bullet graph
82-
** a sensor graph
83-
** group of sensors graph
84-
** mixed sensors graph
85-
** monitor and control sensor
86-
- Backup and restore via GUI
87-
- version to version auto migration support. available from 0.0.3-alpha1
88-
- Role based authentication
89-
* can map resources for particular user
90-
- Inbuilt MQTT broker
91-
- Supports multiple gateways
92-
- and many more
93-
43+
== MyController and MySensors Setup
44+
45+
image::extra/images/MyController-MySensors-RF.png[MyController and MySensors setup.]
46+
9447
== Installation
9548

9649
====== Download(executable bundle),
9750

98-
* 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]
99-
* 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]
51+
* Visit MyController.org http://www.mycontroller.org/#/downloads[downloads page]
10052

10153
====== Configuration
10254

@@ -174,7 +126,7 @@ Executable scripts are located in `mycontroller/bin/`
174126
- Stop : `Ctrl+C`
175127

176128
* Other Platforms
177-
129+
178130
```
179-
java -Xms8m -Xmx40m -Dlogback.configurationFile=../conf/logback.xml -Dmc.conf.file=../conf/mycontroller.properties -jar ../lib/mycontroller-standalone-0.0.3-alpha1-single.jar
131+
java -Xms8m -Xmx100m -Dlogback.configurationFile=../conf/logback.xml -Dmc.conf.file=../conf/mycontroller.properties -cp "../lib/*" org.mycontroller.standalone.StartApp
180132
```

dist/.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
/target/
2+
/bin/

.tx/config renamed to dist/.tx/config

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ host = https://www.transifex.com
55
source_file = src/main/package/www/languages/mc_locale_gui_source_en.json
66
source_lang = en
77
file_filter = src/main/package/www/languages/mc_locale_gui-<lang>.json
8-
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
8+
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
99

1010
[multi-locale.mc_locale_java]
1111
source_file = src/main/resources/mc_locale/mc_locale_java-source_en.properties

locale_fix.sh renamed to dist/locale_fix.sh

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22
#
3-
# Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
3+
# Copyright 2015-2016 Jeeva Kandasamy ([email protected])
4+
# and other contributors as indicated by the @author tags.
45
#
56
# Licensed under the Apache License, Version 2.0 (the "License");
67
# you may not use this file except in compliance with the License.
78
# You may obtain a copy of the License at
89
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1011
#
1112
# Unless required by applicable law or agreed to in writing, software
1213
# distributed under the License is distributed on an "AS IS" BASIS,

dist/pom.xml

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
<!--
2+
3+
Copyright 2015-2016 Jeeva Kandasamy ([email protected])
4+
and other contributors as indicated by the @author tags.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
19+
<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">
20+
<modelVersion>4.0.0</modelVersion>
21+
<parent>
22+
<groupId>org.mycontroller.standalone</groupId>
23+
<artifactId>mycontroller-standalone-parent</artifactId>
24+
<version>0.0.3.Alpha2</version>
25+
</parent>
26+
27+
<artifactId>mycontroller-dist</artifactId>
28+
<url>https://github.com/mycontroller-org</url>
29+
<inceptionYear>2015</inceptionYear>
30+
<packaging>jar</packaging>
31+
32+
<properties>
33+
<mc.dist.finalName>${project.artifactId}-standalone-${project.version}</mc.dist.finalName>
34+
<mc.dist.jar.finalName>${mc.dist.finalName}-single</mc.dist.jar.finalName>
35+
</properties>
36+
37+
<dependencies>
38+
<!-- internal dependencies -->
39+
<dependency>
40+
<groupId>${project.groupId}</groupId>
41+
<artifactId>mycontroller-core</artifactId>
42+
<version>${project.version}</version>
43+
</dependency>
44+
</dependencies>
45+
46+
<build>
47+
<plugins>
48+
<plugin>
49+
<groupId>org.apache.maven.plugins</groupId>
50+
<artifactId>maven-shade-plugin</artifactId>
51+
<configuration>
52+
<createDependencyReducedPom>true</createDependencyReducedPom>
53+
<filters>
54+
<filter>
55+
<artifact>*:*</artifact>
56+
<excludes>
57+
<exclude>META-INF/*.SF</exclude>
58+
<exclude>META-INF/*.DSA</exclude>
59+
<exclude>META-INF/*.RSA</exclude>
60+
</excludes>
61+
</filter>
62+
</filters>
63+
</configuration>
64+
<executions>
65+
<execution>
66+
<phase>package</phase>
67+
<goals>
68+
<goal>shade</goal>
69+
</goals>
70+
<configuration>
71+
<finalName>${mc.dist.jar.finalName}</finalName>
72+
<transformers>
73+
<transformer
74+
implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer" />
75+
<transformer
76+
implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
77+
<mainClass>org.mycontroller.standalone.StartApp</mainClass>
78+
</transformer>
79+
</transformers>
80+
</configuration>
81+
</execution>
82+
</executions>
83+
</plugin>
84+
<plugin>
85+
<artifactId>maven-assembly-plugin</artifactId>
86+
<executions>
87+
<execution>
88+
<phase>package</phase>
89+
<goals>
90+
<goal>attached</goal>
91+
</goals>
92+
</execution>
93+
</executions>
94+
<configuration>
95+
<finalName>${mc.dist.finalName}</finalName>
96+
<descriptor>src/main/assembly/binary-deployment.xml</descriptor>
97+
</configuration>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
102+
</project>

src/main/assembly/binary-deployment.xml renamed to dist/src/main/assembly/binary-deployment.xml

+21-4
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,23 @@
1+
<!--
2+
3+
Copyright 2015-2016 Jeeva Kandasamy ([email protected])
4+
and other contributors as indicated by the @author tags.
5+
6+
Licensed under the Apache License, Version 2.0 (the "License");
7+
you may not use this file except in compliance with the License.
8+
You may obtain a copy of the License at
9+
10+
http://www.apache.org/licenses/LICENSE-2.0
11+
12+
Unless required by applicable law or agreed to in writing, software
13+
distributed under the License is distributed on an "AS IS" BASIS,
14+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15+
See the License for the specific language governing permissions and
16+
limitations under the License.
17+
18+
-->
119
<assembly>
220
<id>bundle</id>
3-
421
<formats>
522
<format>zip</format>
623
<format>tar.gz</format>
@@ -32,9 +49,9 @@
3249
<directory>${project.basedir}/target</directory>
3350
<outputDirectory>mycontroller/lib</outputDirectory>
3451
<includes>
35-
<include>mycontroller-standalone-*-single.jar</include>
52+
<include>${mc.dist.jar.finalName}.jar</include>
3653
</includes>
37-
<fileMode>755</fileMode>
54+
<fileMode>664</fileMode>
3855
<directoryMode>764</directoryMode>
3956
</fileSet>
4057
<fileSet>
@@ -54,4 +71,4 @@
5471
<scope>runtime</scope>
5572
</dependencySet>
5673
</dependencySets>
57-
</assembly>
74+
</assembly>
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11
@REM
2-
@REM Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
2+
@REM Copyright 2015-2016 Jeeva Kandasamy ([email protected])
3+
@REM and other contributors as indicated by the @author tags.
34
@REM
45
@REM Licensed under the Apache License, Version 2.0 (the "License");
56
@REM you may not use this file except in compliance with the License.
67
@REM You may obtain a copy of the License at
78
@REM
8-
@REM http://www.apache.org/licenses/LICENSE-2.0
9+
@REM http://www.apache.org/licenses/LICENSE-2.0
910
@REM
1011
@REM Unless required by applicable law or agreed to in writing, software
1112
@REM distributed under the License is distributed on an "AS IS" BASIS,
@@ -16,12 +17,10 @@
1617

1718
@ECHO OFF
1819
SET HEAP_MIN=-Xms8m
19-
SET HEAP_MAX=-Xmx40m
20-
21-
SET MC_VERSION=0.0.3-alpha1
20+
SET HEAP_MAX=-Xmx100m
2221

2322
SET CONF_PROPERTIES_FILE=../conf/mycontroller.properties
2423
SET CONF_LOG_FILE=../conf/logback.xml
2524

2625
@ECHO ON
27-
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
26+
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

src/main/package/bin/start.sh renamed to dist/src/main/package/bin/start.sh

+10-10
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
#!/bin/bash
22
#
3-
# Copyright (C) 2015-2016 Jeeva Kandasamy ([email protected])
3+
# Copyright 2015-2016 Jeeva Kandasamy ([email protected])
4+
# and other contributors as indicated by the @author tags.
45
#
56
# Licensed under the Apache License, Version 2.0 (the "License");
67
# you may not use this file except in compliance with the License.
78
# You may obtain a copy of the License at
89
#
9-
# http://www.apache.org/licenses/LICENSE-2.0
10+
# http://www.apache.org/licenses/LICENSE-2.0
1011
#
1112
# Unless required by applicable law or agreed to in writing, software
1213
# distributed under the License is distributed on an "AS IS" BASIS,
@@ -25,19 +26,18 @@ cd ${ACTUAL_LOCATION}
2526

2627
#Java Heap settings
2728
HEAP_MIN=-Xms8m
28-
HEAP_MAX=-Xmx40m
29+
HEAP_MAX=-Xmx100m
2930

3031
JAVA_VERSION="1.7"
31-
MC_VERSION="0.0.3-alpha1"
3232

3333
#configuration file location
3434
CONF_PROPERTIES_FILE=../conf/mycontroller.properties
3535
CONF_LOG_FILE=../conf/logback.xml
3636

37-
if type -p java; then
38-
_java=java
39-
elif [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
37+
if [[ -n "$JAVA_HOME" ]] && [[ -x "$JAVA_HOME/bin/java" ]]; then
4038
_java="$JAVA_HOME/bin/java"
39+
elif type -p java; then
40+
_java=java
4141
else
4242
echo "java is not installed in our machine"
4343
fi
@@ -46,15 +46,15 @@ if [[ "$_java" ]]; then
4646
version=$("$_java" -version 2>&1 | awk -F '"' '/version/ {print $2}')
4747
echo "java version: $version"
4848
if [[ "$version" > "$JAVA_VERSION" ]]; then
49-
MC_PID=`ps -ef | grep mycontroller-standalone | grep -v grep | awk '{ print $2 }'`
49+
MC_PID=`ps -ef | grep "org.mycontroller.standalone.StartApp" | grep -v grep | awk '{ print $2 }'`
5050
if [ ! -z "$MC_PID" ]
5151
then
5252
echo "Mycontroller.org server is already running on pid[${MC_PID}]"
5353
else
54-
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 &
54+
$_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 &
5555
echo 'Start issued for Mycontroller'
5656
fi
57-
else
57+
else
5858
echo "Mycontroller.org server required java version $JAVA_VERSION or later"
5959
fi
6060
fi

0 commit comments

Comments
 (0)