Compare commits
305 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| c7f0d4e8b3 | |||
| e39e1b462d | |||
| 9d41856854 | |||
| c26c769108 | |||
| ac97ca8068 | |||
| c96a00333b | |||
| 21a672acf4 | |||
| be7b6cc2d6 | |||
| 6cec337db1 | |||
| 8ee7ed0ef2 | |||
| 3e60e55f16 | |||
| bec5a3098b | |||
| 96635381f4 | |||
| 12d3c80ba8 | |||
| 17026db07e | |||
| f68ec9a8e9 | |||
| aa3c3d05e1 | |||
| 3d883e0674 | |||
| 22e6400369 | |||
| 60024dc915 | |||
| d049e524d5 | |||
| cc0b50f288 | |||
| a980bc4946 | |||
| 3ef524accd | |||
| 34e6843d91 | |||
| b7ee6b16dc | |||
| e4707c2493 | |||
| f3cbda43d1 | |||
| ce73bd70fe | |||
| 784844b85f | |||
| c145056e5e | |||
| e39f282abf | |||
| 1d8b26998a | |||
| 98c48e595f | |||
| 7d64788154 | |||
| c4cb9ff458 | |||
| 2e924d2882 | |||
| e6de5e4576 | |||
| 183e14733c | |||
| 7935dd5c93 | |||
| 9fe699b40d | |||
| 0b84b5aea4 | |||
| 2af860f694 | |||
| 47f730b76e | |||
| c27f1030b6 | |||
| 99a61f8ca3 | |||
| 78b7484403 | |||
| eb24b32952 | |||
| c818d5bcc7 | |||
| 8a5267b0f8 | |||
| 54a9fcedf8 | |||
| 198c681333 | |||
| ec4cbc1e7c | |||
| 7ea6f8b3e4 | |||
| a52de9ccb7 | |||
| dc4f54be4b | |||
| f7f590a77e | |||
| a4745cdccd | |||
| a68980a6b3 | |||
| cdb66470b5 | |||
| 1875160f6f | |||
| dd0cc96d58 | |||
| 2d2a79470d | |||
| cfcebca5a0 | |||
| 4d473573db | |||
| 6acf0ad031 | |||
| 070aeb35d7 | |||
| b710626ad0 | |||
| 16604f7fdb | |||
| 6e4e7fba4a | |||
| 234125bc35 | |||
| a89b418350 | |||
| 2dec5c1a05 | |||
| 926c3e2af2 | |||
| bda3f270af | |||
| aff64c354c | |||
| 425012517c | |||
| 13b8dc95db | |||
| 1dec30e2fa | |||
| 7747a10959 | |||
| ed04554a4a | |||
| 2ee0e775be | |||
| b80991280a | |||
| fb7f43ed23 | |||
| d8a1b66738 | |||
| 94485b5633 | |||
| 628c89b1d1 | |||
| 7a90189927 | |||
| b5ac492414 | |||
| 0efa7320e3 | |||
| 253208b6f9 | |||
| b80ca96a73 | |||
| fa28d7e3d7 | |||
| 4dfba22914 | |||
| 100123e716 | |||
| ef365f360c | |||
| 95ff5b81c0 | |||
| 7cf6849e5d | |||
| 53e9f08272 | |||
| 6b92172d74 | |||
| 2501831a59 | |||
| 3a278b0ca6 | |||
| 78e2edd4e9 | |||
| a8fe102bb8 | |||
| e88250196e | |||
| 57ef44c450 | |||
| 931669bf53 | |||
| c01367e422 | |||
| b91f006d8b | |||
| b65a9f0bd3 | |||
| d91556681b | |||
| 242d3addef | |||
| 81b7d7e930 | |||
| 5dae45bb0b | |||
| fa78d02778 | |||
| 370fecaa8a | |||
| b6a0e39ac3 | |||
| 433b3ee002 | |||
| 58894924a5 | |||
| 3edea58f8c | |||
| dc200294be | |||
| 4d1922d088 | |||
| c9227fd8ac | |||
| 0b029f68e3 | |||
| c46aab31e9 | |||
| 184fdc14d1 | |||
| 940016f44a | |||
| af39f2c94b | |||
| 9c74043172 | |||
| 7cf816c903 | |||
| 342368bd77 | |||
| bc35492cee | |||
| d7605da60f | |||
| bfd895112d | |||
| b4f6f15055 | |||
| 1b93608d2a | |||
| 987dab9079 | |||
| f2dfe7a88f | |||
| 28ff89d07f | |||
| 20228d9e79 | |||
| b2d96b34b1 | |||
| 6cb0a2ddf0 | |||
| b94b33ecf1 | |||
| f27f7e4c81 | |||
| 48a139cdd5 | |||
| ce0f6ebd7c | |||
| d00a13bb50 | |||
| 1cbb44f714 | |||
| f5f3730281 | |||
| 102d8aa266 | |||
| b1db199beb | |||
| 41357ed8dd | |||
| 4339239c33 | |||
| 08fd1b6edd | |||
| 02f9d4fcb7 | |||
| 17337e39ba | |||
| b30248d973 | |||
| 41dfcd0e4f | |||
| 870d9cbbab | |||
| fa80fbc114 | |||
| 2d30b9451b | |||
| e863797030 | |||
| f4b9d46077 | |||
| 2d1e6f8f50 | |||
| 378d00b83e | |||
| 8c369ed2e8 | |||
| 9e58387ef7 | |||
| 5e31cea660 | |||
| ed04b687ed | |||
| 0cf4909df4 | |||
| b700fdd8dd | |||
| a21ac02333 | |||
| 17438db7a2 | |||
| 870be06255 | |||
| ee89eeb39d | |||
| 291c4cb42a | |||
| 68c7755e7e | |||
| 48a62d819a | |||
| ac27882ad1 | |||
| c197606204 | |||
| d9ce3af5aa | |||
| e8270d4027 | |||
| 2dc35e212b | |||
| e57d62471b | |||
| 5e3b103815 | |||
| e1b2494835 | |||
| c27556500e | |||
| 696cca0087 | |||
| 9e6172caeb | |||
| 68054ebf4f | |||
| 203bb67f7f | |||
| 4dfa80c17f | |||
| 3cd96cfc82 | |||
| bcc4133a31 | |||
| d6fc1390fd | |||
| 55ceb0bf34 | |||
| 6a81f5de16 | |||
| aea0d9bab1 | |||
| 52273e1ebe | |||
| 902d87a9c5 | |||
| 81dc81a1ae | |||
| 94bfbbd664 | |||
| 53d471c0aa | |||
| 8d9896f8b4 | |||
| 3a49b15dea | |||
| 1adaf8bc46 | |||
| 267054e4ba | |||
| a80a1c5cdc | |||
| 6656882859 | |||
| e662f7e29d | |||
| cf795be35f | |||
| 1cc834f089 | |||
| 132bd3b29d | |||
| d68c3cae54 | |||
| e1618604c9 | |||
| 6109f66ea0 | |||
| 5716584772 | |||
| edaa23f0f6 | |||
| 5a1be3c2e4 | |||
| c7e286f51e | |||
| 7e8938c38c | |||
| 8d51526481 | |||
| c0188cd5cc | |||
| 28bc108921 | |||
| 0a1ce4fe60 | |||
| 1e0ec282ca | |||
| 6f39d31d5d | |||
| 41b2eb6b07 | |||
| 9ad529d9eb | |||
| da3ba116da | |||
| 65581f13d5 | |||
| 326d773741 | |||
| 3b949b13f7 | |||
| 6214c01157 | |||
| 4499824965 | |||
| 48e0c065b6 | |||
| e59d65fac0 | |||
| 3dbd626aee | |||
| ee485c4466 | |||
| b60a7af9cd | |||
| 1c0340b9cf | |||
| dd1cc00c9d | |||
| 4f0398260b | |||
| 49318f3191 | |||
| 490655fb02 | |||
| 907e8ee498 | |||
| d7a14a4899 | |||
| a968c1a91e | |||
| f4515f86c8 | |||
| 7f22b2dee2 | |||
| fc37d158c5 | |||
| c6f90c42af | |||
| 1b83d4180b | |||
| e54b53c974 | |||
| fee3fd81a0 | |||
| ccc99033cd | |||
| 03ae4329bc | |||
| baaeddb9fb | |||
| e0c464416d | |||
| 43892798ef | |||
| 64f2f598df | |||
| b405f0b191 | |||
| ded778fd11 | |||
| f1da2c5a4d | |||
| 9a44631a96 | |||
| 8fad681f01 | |||
| 0ca8bcab43 | |||
| 51fa28bddf | |||
| 4a31b474c5 | |||
| 9bca47d566 | |||
| 0632804bd4 | |||
| 8362585b7b | |||
| 67801e0c91 | |||
| a49cb55b93 | |||
| da36be0862 | |||
| 5612a5e039 | |||
| d003727113 | |||
| c4968633ed | |||
| 12a6c1d31b | |||
| c3731ca4b4 | |||
| 467a5ff068 | |||
| d759ebcd77 | |||
| 267eda7afd | |||
| b065d1136e | |||
| 47afc78ee4 | |||
| fccc6a3609 | |||
| c7583d9d6f | |||
| dc829b9487 | |||
| b3f28c8276 | |||
| 14c925d480 | |||
| 3f94756fa8 | |||
| b7eab6e3d0 | |||
| eb63ff0a51 | |||
| edd5d0d083 | |||
| fc11ae264f | |||
| 4f7476bb84 | |||
| cf3c922fa2 | |||
| 584760b6ba | |||
| cb9838181f | |||
| bc9d598bfe | |||
| 659d5ea0d2 | |||
| 2242401977 | |||
| c3f2b91d72 | |||
| e5cd72ec2d | |||
|
|
e777d4e3bf |
791 changed files with 65802 additions and 352599 deletions
15
.classpath
15
.classpath
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="test"/>
|
||||
<classpathentry kind="src" path="plugins/tellstick/src"/>
|
||||
<classpathentry kind="src" path="plugins/tellstick/test"/>
|
||||
<classpathentry kind="src" path="plugins/zwave/src"/>
|
||||
|
||||
<classpathentry kind="lib" path="lib/*"/>
|
||||
<classpathentry kind="src" path="plugins/zwave/lib/*"/>
|
||||
|
||||
|
||||
<classpathentry combineaccessrules="false" kind="src" path="/zutil-java"/>
|
||||
<classpathentry kind="output" path="build"/>
|
||||
</classpath>
|
||||
4
.gitattributes
vendored
Executable file → Normal file
4
.gitattributes
vendored
Executable file → Normal file
|
|
@ -1,5 +1,5 @@
|
|||
# Github language stats file
|
||||
external/* linguist-vendored
|
||||
lib/* linguist-vendored
|
||||
resource/web/css/* linguist-vendored
|
||||
resource/web/js/* linguist-vendored
|
||||
*.css linguist-vendored
|
||||
*.js linguist-vendored
|
||||
14
.gitignore
vendored
Executable file → Normal file
14
.gitignore
vendored
Executable file → Normal file
|
|
@ -1,8 +1,14 @@
|
|||
/screenlog.0*
|
||||
# Configuration and dependencies
|
||||
/hal.conf
|
||||
/hal.db*
|
||||
build
|
||||
/lib/zutil-*
|
||||
/recordings/
|
||||
|
||||
# Runtime files
|
||||
/screenlog.0*
|
||||
/OZW_Log.txt
|
||||
/zwscene.xml
|
||||
/zwcfg*.xml
|
||||
|
||||
# Build and Ide files
|
||||
build
|
||||
.gradle
|
||||
.idea
|
||||
17
.project
17
.project
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>hal</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
||||
71
Hal.iml
71
Hal.iml
|
|
@ -1,71 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" inherit-compiler-output="true">
|
||||
<exclude-output />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/test" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/resource" type="java-resource" relativeOutputPath="resource" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-zwave/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-tellstick/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-tellstick/test" isTestSource="true" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-raspberry/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-zigbee/src" isTestSource="false" />
|
||||
<sourceFolder url="file://$MODULE_DIR$/plugins/hal-zwave/test" isTestSource="true" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/plugins/hal-raspberry/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/plugins/hal-tellstick/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/plugins/hal-zigbee/build" />
|
||||
<excludeFolder url="file://$MODULE_DIR$/plugins/hal-zwave/build" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="module" module-name="Zutil" exported="" />
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library name="lib">
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<NATIVE>
|
||||
<root url="file://$MODULE_DIR$/lib" />
|
||||
</NATIVE>
|
||||
<SOURCES>
|
||||
<root url="jar://$USER_HOME$/.ideaLibSources/wzwave-0.0.3-sources.jar!/" />
|
||||
<root url="jar://$USER_HOME$/.ideaLibSources/netty-all-4.0.46.Final-sources.jar!/" />
|
||||
</SOURCES>
|
||||
<jarDirectory url="file://$MODULE_DIR$/lib" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/plugins/hal-raspberry/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$MODULE_DIR$/plugins/hal-raspberry/lib" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" exported="">
|
||||
<library>
|
||||
<CLASSES>
|
||||
<root url="file://$MODULE_DIR$/plugins/hal-zwave/lib" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
<jarDirectory url="file://$MODULE_DIR$/plugins/hal-zwave/lib" recursive="false" />
|
||||
</library>
|
||||
</orderEntry>
|
||||
<orderEntry type="module-library" scope="TEST">
|
||||
<library name="JUnit4">
|
||||
<CLASSES>
|
||||
<root url="jar://$APPLICATION_HOME_DIR$/lib/junit-4.12.jar!/" />
|
||||
<root url="jar://$APPLICATION_HOME_DIR$/lib/hamcrest-core-1.3.jar!/" />
|
||||
</CLASSES>
|
||||
<JAVADOC />
|
||||
<SOURCES />
|
||||
</library>
|
||||
</orderEntry>
|
||||
</component>
|
||||
</module>
|
||||
17
Jenkinsfile
vendored
Executable file → Normal file
17
Jenkinsfile
vendored
Executable file → Normal file
|
|
@ -1,30 +1,29 @@
|
|||
// Jenkinsfile (Pipeline Script)
|
||||
node {
|
||||
// Configure environment
|
||||
env.JAVA_HOME = tool name: 'jdk8'
|
||||
env.JAVA_HOME = tool name: 'jdk-11'
|
||||
env.REPO_URL = "repo.koc.se/hal.git" //scm.getUserRemoteConfigs()[0].getUrl()
|
||||
env.BUILD_NAME = "BUILD-" + env.BUILD_ID
|
||||
env.BUILD_NAME = "BUILD-${env.BUILD_ID}"
|
||||
|
||||
|
||||
checkout scm
|
||||
|
||||
stage('Build') {
|
||||
sh 'ant clean'
|
||||
sh 'ant build-all'
|
||||
sh './gradlew clean'
|
||||
sh './gradlew build'
|
||||
}
|
||||
|
||||
stage('Test') {
|
||||
try {
|
||||
sh 'ant test-all'
|
||||
sh './gradlew test'
|
||||
} finally {
|
||||
step([$class: 'JUnitResultArchiver', testResults: 'build/reports/*.xml'])
|
||||
junit testResults: '**/build/test-results/test/*.xml'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
stage('Package') {
|
||||
sh 'ant package-all'
|
||||
archiveArtifacts artifacts: 'build/release/**', fingerprint: true
|
||||
sh './gradlew distZip'
|
||||
archiveArtifacts artifacts: 'build/distributions/Hal.zip', fingerprint: true
|
||||
|
||||
// Tag artifact
|
||||
withCredentials([[$class: 'UsernamePasswordMultiBinding', credentialsId: 'f8e5f6c6-4adb-4ab2-bb5d-1c8535dff491',
|
||||
|
|
|
|||
0
LICENSE.txt
Executable file → Normal file
0
LICENSE.txt
Executable file → Normal file
61
README.md
Executable file → Normal file
61
README.md
Executable file → Normal file
|
|
@ -1,13 +1,14 @@
|
|||
# Hal
|
||||
|
||||
Hal is a home automation hub with sensor statistics with the functionality to
|
||||
share that data between friends. It is developed to be very extensible so future
|
||||
share that data between friends. It has been developed to be very extensible so future
|
||||
Sensors and other input devices can be supported.
|
||||
|
||||
Features:
|
||||
- **Map**, Set up a house map with sensor and events mapped on a floorplan
|
||||
- **Map**, Set up a house map with sensors and events mapped on a floorplan
|
||||
- **Triggers and Actions**, IFTTT type functionality
|
||||
- **Power;Challenge**, Sync power or sensor usage between friends to lower e.g Power usage
|
||||
- **Power;Challenge**, Sync power or sensor usage between friends to challenge each other to lower the power usage
|
||||
- **[Google Assistant Integration](plugins/hal-assistant-google/READNME.md)**
|
||||
|
||||
Currently supported devices:
|
||||
- **Network Scanner**, IP scanner to detect devices on local network
|
||||
|
|
@ -16,29 +17,40 @@ Currently supported devices:
|
|||
- NexaSelfLearning
|
||||
- Oregon0x1A2D
|
||||
- **Raspberry Pi**, GPIO connected sensors
|
||||
- **[Zigbee](plugins/hal-zigbee/README.md)**
|
||||
- Temperature Sensors
|
||||
- Humidity Sensors
|
||||
- Pressure Sensors
|
||||
- OnnOff Devices
|
||||
- **Google Assistant**
|
||||
- **MQTT Devices**
|
||||
|
||||
Under development (Not ready to be used yet)
|
||||
- **Z-Wave**
|
||||
|
||||
|
||||
The project is currently in alpha state, and as such things will change and break.
|
||||
The project is currently in alpha state, and as such things will change and break continuously.
|
||||
|
||||
### Screenshots
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||

|
||||

|
||||
|
||||
## Installing
|
||||
|
||||
To run the Hal server you first need to clone the git repository and then run the
|
||||
ant command to build and run:
|
||||
gradle command to build and run the server:
|
||||
|
||||
```
|
||||
ant run
|
||||
./gradlew run
|
||||
```
|
||||
|
||||
Check `hal.conf.example` for available configuration options.
|
||||
By default, HAL server will be listening to http://localhost:8080.
|
||||
|
||||
## Running the tests
|
||||
|
||||
|
|
@ -46,7 +58,34 @@ The current test coverage is greatly lacking, but to run the available JUnit
|
|||
test-cases run:
|
||||
|
||||
```
|
||||
ant test
|
||||
./gradlew test
|
||||
```
|
||||
|
||||
## Architecture
|
||||
|
||||
```
|
||||
HalAbstractControlerManager
|
||||
|
|
||||
| HalAbstractController
|
||||
| |
|
||||
| | HalAbstractDevice
|
||||
| | |
|
||||
.-----------. .------------. .--------.
|
||||
| | | | | |
|
||||
| | | | ----> | Device |
|
||||
| | | | | |
|
||||
| | ----> | Controller | '--------'
|
||||
| | | | .--------.
|
||||
| | | | | |
|
||||
| Manager | | | ----> | Device |
|
||||
| | | | | |
|
||||
| | '------------' '--------'
|
||||
| | .------------. .--------.
|
||||
| | | | | |
|
||||
| | ----> | Controller | ----> | Device |
|
||||
| | | | | |
|
||||
'-----------' '------------' '--------'
|
||||
|
||||
```
|
||||
|
||||
## Authors
|
||||
|
|
|
|||
|
|
@ -66,7 +66,7 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
|
|||
stepBufferPointer(&bufStartP);
|
||||
b2 = *bufStartP;
|
||||
stepBufferPointer(&bufStartP);
|
||||
if(!IS_PREAMP(b1, b2)){
|
||||
if (!IS_PREAMP(b1, b2)){
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
@ -75,7 +75,7 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
|
|||
uint16_t dataBitsInBuffer = (calculateBufferPointerDistance(bufStartP, bufEndP)-2) / 4; //each bit is representd by 4 high/low
|
||||
if (dataBitsInBuffer == 32) {
|
||||
dimValuePresent = false;
|
||||
}else if(dataBitsInBuffer == 36){
|
||||
} else if (dataBitsInBuffer == 36){
|
||||
dimValuePresent = true;
|
||||
} else {
|
||||
return false;
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ void parseRadioRXBuffer() {
|
|||
//Serial.print("low:"); Serial.println(sampleCount);
|
||||
if (sampleCount >= SILENCE_LENGTH) { //evaluate if it is time to parse the curernt data
|
||||
endDataP = bufferReadP; //this is a silient period and must be the end of a data
|
||||
if(startDataP != 0){
|
||||
if (startDataP != 0){
|
||||
parse = true;
|
||||
break;
|
||||
}
|
||||
|
|
@ -88,7 +88,7 @@ void sendTCodedData(uint8_t* data, uint8_t T_long, uint8_t* timings, uint8_t rep
|
|||
for (int i = 0; i < T_long; ++i) {
|
||||
uint8_t timeIndex = (data[i / 4] >> (6 - (2 * (i % 4)))) & 0x03;
|
||||
if (timings[timeIndex] > 0 || i == T_long - 1) {
|
||||
if(nextPinState){
|
||||
if (nextPinState){
|
||||
TX_PIN_HIGH();
|
||||
}else{
|
||||
TX_PIN_LOW();
|
||||
|
|
@ -111,7 +111,7 @@ void sendSCodedData(uint8_t* data, uint8_t pulseCount, uint8_t repeat, uint8_t p
|
|||
bool nextPinState = HIGH;
|
||||
for (int i = 0; i < pulseCount; ++i) {
|
||||
if (data[i] > 0 || i == pulseCount - 1) {
|
||||
if(nextPinState){
|
||||
if (nextPinState){
|
||||
TX_PIN_HIGH();
|
||||
}else{
|
||||
TX_PIN_LOW();
|
||||
|
|
|
|||
0
arduino/HalMultiSensor/HalConfiguration.h
Executable file → Normal file
0
arduino/HalMultiSensor/HalConfiguration.h
Executable file → Normal file
0
arduino/HalMultiSensor/HalInclude.h
Executable file → Normal file
0
arduino/HalMultiSensor/HalInclude.h
Executable file → Normal file
0
arduino/HalMultiSensor/HalInterfaces.h
Executable file → Normal file
0
arduino/HalMultiSensor/HalInterfaces.h
Executable file → Normal file
6
arduino/HalMultiSensor/HalMultiSensor.ino
Executable file → Normal file
6
arduino/HalMultiSensor/HalMultiSensor.ino
Executable file → Normal file
|
|
@ -92,7 +92,7 @@ void loop()
|
|||
|
||||
// Send power consumption
|
||||
#ifdef POWERCON_ENABLED
|
||||
if(timerMultiplier % POWER_TIMER_MULTIPLIER == 0)
|
||||
if (timerMultiplier % POWER_TIMER_MULTIPLIER == 0)
|
||||
{
|
||||
static PowerData powerData;
|
||||
powerSensor->read(powerData); // not needed, only here for future use
|
||||
|
|
@ -103,7 +103,7 @@ void loop()
|
|||
|
||||
// Handle temperature sensor
|
||||
#ifdef TEMPERATURE_ENABLED
|
||||
if(timerMultiplier % TEMPERATURE_TIMER_MULTIPLIER == 0)
|
||||
if (timerMultiplier % TEMPERATURE_TIMER_MULTIPLIER == 0)
|
||||
{
|
||||
static TemperatureData tempData;
|
||||
tempSensor->read(tempData);
|
||||
|
|
@ -114,7 +114,7 @@ void loop()
|
|||
|
||||
// Handle light sensor
|
||||
#ifdef LIGHT_ENABLED
|
||||
if(timerMultiplier % LIGHT_TIMER_MULTIPLIER == 0)
|
||||
if (timerMultiplier % LIGHT_TIMER_MULTIPLIER == 0)
|
||||
{
|
||||
static LightData lightData;
|
||||
lightSensor->read(lightData);
|
||||
|
|
|
|||
0
arduino/HalMultiSensor/HalMultiSensorEnclosure.FCStd
Executable file → Normal file
0
arduino/HalMultiSensor/HalMultiSensorEnclosure.FCStd
Executable file → Normal file
0
arduino/HalMultiSensor/HalMultiSensorEnclosure_bottom.stl
Executable file → Normal file
0
arduino/HalMultiSensor/HalMultiSensorEnclosure_bottom.stl
Executable file → Normal file
0
arduino/HalMultiSensor/HalMultiSensorEnclosure_top.stl
Executable file → Normal file
0
arduino/HalMultiSensor/HalMultiSensorEnclosure_top.stl
Executable file → Normal file
0
arduino/HalMultiSensor/Interrupt.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/Interrupt.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/Interrupt.h
Executable file → Normal file
0
arduino/HalMultiSensor/Interrupt.h
Executable file → Normal file
0
arduino/HalMultiSensor/ProtocolNexa.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/ProtocolNexa.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/ProtocolNexa.h
Executable file → Normal file
0
arduino/HalMultiSensor/ProtocolNexa.h
Executable file → Normal file
4
arduino/HalMultiSensor/ProtocolOregon.cpp
Executable file → Normal file
4
arduino/HalMultiSensor/ProtocolOregon.cpp
Executable file → Normal file
|
|
@ -83,14 +83,14 @@ inline void ProtocolOregon::setId(byte data[], byte id)
|
|||
*/
|
||||
inline void ProtocolOregon::setBatteryLevel(byte data[], bool level)
|
||||
{
|
||||
if(!level) data[4] = 0x0C;
|
||||
if (!level) data[4] = 0x0C;
|
||||
else data[4] = 0x00;
|
||||
}
|
||||
|
||||
inline void ProtocolOregon::setTemperature(byte data[], float temp)
|
||||
{
|
||||
// Set temperature sign
|
||||
if(temp < 0)
|
||||
if (temp < 0)
|
||||
{
|
||||
data[6] = 0x08;
|
||||
temp *= -1;
|
||||
|
|
|
|||
0
arduino/HalMultiSensor/ProtocolOregon.h
Executable file → Normal file
0
arduino/HalMultiSensor/ProtocolOregon.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorBH1750.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorBH1750.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorBH1750.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorBH1750.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorDHT.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorDHT.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorDHT.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorDHT.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorPhotocell.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorPhotocell.cpp
Executable file → Normal file
0
arduino/HalMultiSensor/SensorPhotocell.h
Executable file → Normal file
0
arduino/HalMultiSensor/SensorPhotocell.h
Executable file → Normal file
111
build.gradle
Normal file
111
build.gradle
Normal file
|
|
@ -0,0 +1,111 @@
|
|||
plugins {
|
||||
id 'java'
|
||||
id 'application'
|
||||
}
|
||||
|
||||
/*
|
||||
* The MIT License (MIT)
|
||||
*
|
||||
* Copyright (c) 2025 Ziver Koc
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
* of this software and associated documentation files (the "Software"), to deal
|
||||
* in the Software without restriction, including without limitation the rights
|
||||
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
* copies of the Software, and to permit persons to whom the Software is
|
||||
* furnished to do so, subject to the following conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included in
|
||||
* all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
* THE SOFTWARE.
|
||||
*/
|
||||
|
||||
// ------------------------------------
|
||||
// Hal common configuration
|
||||
// ------------------------------------
|
||||
|
||||
allprojects {
|
||||
repositories {
|
||||
mavenLocal()
|
||||
mavenCentral()
|
||||
}
|
||||
}
|
||||
|
||||
subprojects {
|
||||
apply plugin: 'java-library'
|
||||
|
||||
dependencies {
|
||||
//implementation 'se.koc:zutil:1.0.314'
|
||||
implementation 'se.koc:zutil:1.0.0-SNAPSHOT'
|
||||
|
||||
testImplementation 'junit:junit:4.12'
|
||||
testImplementation 'org.hamcrest:hamcrest-core:2.2'
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
srcDirs 'src'
|
||||
}
|
||||
// We do not want the resource folder to be included in the jar file
|
||||
//resources {
|
||||
// srcDir 'resource'
|
||||
//}
|
||||
}
|
||||
test {
|
||||
java {
|
||||
srcDirs 'test'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------
|
||||
// Hal general configuration
|
||||
// ------------------------------------
|
||||
|
||||
dependencies {
|
||||
project.subprojects.each { subProject ->
|
||||
runtimeOnly subProject
|
||||
}
|
||||
}
|
||||
|
||||
distributions {
|
||||
distTar.enabled = false
|
||||
distZip.enabled = false
|
||||
|
||||
main {
|
||||
contents {
|
||||
from 'hal.conf.example'
|
||||
from 'logging.properties'
|
||||
|
||||
from sourceSets.main.output.resourcesDir
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task copyRecources(type: Copy) {
|
||||
doFirst{
|
||||
System.out.println("Copying resource files...")
|
||||
}
|
||||
|
||||
project.subprojects.each { subProject ->
|
||||
from "${subProject.projectDir}/resources"
|
||||
}
|
||||
|
||||
into(sourceSets.main.output.resourcesDir)
|
||||
}
|
||||
|
||||
jar.dependsOn(copyRecources)
|
||||
copyRecources.mustRunAfter(processResources)
|
||||
|
||||
application {
|
||||
mainClass = 'se.hal.HalServer'
|
||||
}
|
||||
188
build.xml
188
build.xml
|
|
@ -1,188 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="Hal" >
|
||||
|
||||
<!-- ________________________ PROPERTIES AND SETTINGS ________________________ -->
|
||||
|
||||
<!--common properties-->
|
||||
<property name="root" value="." />
|
||||
<property name="srcDir" value="${root}/src" />
|
||||
<property name="testDir" value="${root}/test" />
|
||||
<property name="libDir" value="${root}/lib" />
|
||||
|
||||
<property name="buildRoot" value="${root}/build" />
|
||||
<property name="compileDir" value="${buildRoot}/production" />
|
||||
<property name="compileTestDir" value="${buildRoot}/test" />
|
||||
<property name="releaseDir" value="${buildRoot}/release" />
|
||||
<property name="reportsDir" value="${buildRoot}/reports" />
|
||||
<property name="releaseJar" value="hal.jar" />
|
||||
|
||||
|
||||
<!-- ________________________ CLASSPATH ________________________ -->
|
||||
|
||||
<!--define standard arguments for javac-->
|
||||
<presetdef name="javac">
|
||||
<javac includeantruntime="false" />
|
||||
</presetdef>
|
||||
|
||||
<!--classpath included when building-->
|
||||
<path id="classpath.build">
|
||||
<fileset dir="${libDir}">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
<pathelement location="${compileDir}" />
|
||||
</path>
|
||||
|
||||
<path id="classpath.test">
|
||||
<pathelement location="${compileTestDir}" />
|
||||
<!--include libraries used for building-->
|
||||
<path refid="classpath.build"/>
|
||||
</path>
|
||||
|
||||
<!-- ________________________ EXECUTION TARGETS ________________________ -->
|
||||
|
||||
<target name="run" depends="package-all">
|
||||
<java fork="true" failonerror="true" classname="se.hal.HalServer">
|
||||
<classpath>
|
||||
<pathelement path="${releaseDir}/${releaseJar}"/>
|
||||
<pathelement path="${releaseDir}/plugins/*"/>
|
||||
<pathelement path="${libDir}/*"/>
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<target name="debug-remote" depends="package">
|
||||
<java fork="true" failonerror="true" classname="se.hal.HalServer">
|
||||
<jvmarg value="-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=5005" />
|
||||
<classpath>
|
||||
<pathelement path="${releaseDir}/${releaseJar}"/>
|
||||
<pathelement path="${libDir}/*"/> <!--wildcard may not be platform independent, ok?-->
|
||||
</classpath>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
<!-- Test targets -->
|
||||
<target name="test-all" depends="test,test-plugins" />
|
||||
|
||||
<target name="test" depends="build-test">
|
||||
<mkdir dir="${reportsDir}" />
|
||||
<junit printsummary="yes" haltonfailure="false" fork="true">
|
||||
<classpath refid="classpath.test" />
|
||||
<formatter type="plain" usefile="false" /> <!-- to screen -->
|
||||
<formatter type="xml" /> <!-- to file -->
|
||||
|
||||
<batchtest todir="${reportsDir}" skipNonTests="true">
|
||||
<fileset dir="${compileTestDir}" includes="**/*Test*.class" />
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<target name="test-plugins" depends="build-test">
|
||||
<subant target="test" verbose="true">
|
||||
<fileset dir="plugins/" includes="*/build.xml"/>
|
||||
</subant>
|
||||
</target>
|
||||
<!-- ________________________ BUILD TARGETS ________________________ -->
|
||||
|
||||
<!-- clean all build paths -->
|
||||
<target name="clean">
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${buildRoot}" includes="**/*"/>
|
||||
</delete>
|
||||
<!-- clean plugins -->
|
||||
<subant target="clean" verbose="true">
|
||||
<fileset dir="plugins/" includes="*/build.xml"/>
|
||||
</subant>
|
||||
</target>
|
||||
|
||||
|
||||
<!-- build product code -->
|
||||
<target name="build-all" depends="build,build-plugins" />
|
||||
|
||||
<target name="build" depends="build-dependencies">
|
||||
<mkdir dir="${compileDir}" />
|
||||
<javac srcdir="${srcDir}" destdir="${compileDir}" debug="yes" debugLevel="lines,vars,source" fork="yes">
|
||||
<classpath refid="classpath.build" />
|
||||
<include name="**/*.java" />
|
||||
<exclude name="se/hal/tts/GoogleTTSClient.java" />
|
||||
</javac>
|
||||
<copy todir="${compileDir}">
|
||||
<fileset dir="${srcDir}"
|
||||
excludes="**/*.java" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<target name="build-dependencies">
|
||||
<mkdir dir="${compileDir}" />
|
||||
<get src="http://ci.koc.se/jenkins/job/Zutil/lastSuccessfulBuild/artifact/se/koc/zutil/1.0.2-231/zutil-1.0.2-231.jar"
|
||||
dest="${libDir}" verbose="true" usetimestamp="true"/>
|
||||
</target>
|
||||
|
||||
<target name="build-plugins" depends="build">
|
||||
<subant target="build" verbose="true">
|
||||
<fileset dir="plugins/" includes="*/build.xml"/>
|
||||
</subant>
|
||||
</target>
|
||||
|
||||
<target name="build-test" depends="build">
|
||||
<mkdir dir="${compileTestDir}" />
|
||||
<javac srcdir="${testDir}" destdir="${compileTestDir}" debug="yes" debugLevel="lines,vars,source" fork="yes">
|
||||
<classpath refid="classpath.test" />
|
||||
<include name="**/*.java" />
|
||||
</javac>
|
||||
<copy todir="${compileTestDir}">
|
||||
<fileset dir="${testDir}"
|
||||
excludes="**/*.java" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- generate release packages -->
|
||||
<target name="package-all" depends="package,package-plugins" />
|
||||
|
||||
<target name="package" depends="build">
|
||||
<copy todir="${releaseDir}" >
|
||||
<fileset file="${root}/hal.conf.example" />
|
||||
<fileset file="${root}/hal-default.db" />
|
||||
<fileset file="${root}/logging.properties" />
|
||||
<fileset file="${root}/run.sh" />
|
||||
</copy>
|
||||
<copy todir="${releaseDir}/lib">
|
||||
<fileset dir="${libDir}" excludes="junit-*.jar,hamcrest-*.jar" />
|
||||
</copy>
|
||||
<copy todir="${releaseDir}/resource/web">
|
||||
<fileset dir="resource/web" />
|
||||
</copy>
|
||||
<jar destfile="${releaseDir}/${releaseJar}" basedir="${compileDir}" />
|
||||
</target>
|
||||
|
||||
<target name="package-plugins" depends="package">
|
||||
<subant target="package" verbose="true">
|
||||
<fileset dir="plugins/" includes="*/build.xml"/>
|
||||
</subant>
|
||||
<!-- Copy plugin jars -->
|
||||
<copy todir="${releaseDir}/plugins" flatten="true" includeEmptyDirs="false">
|
||||
<fileset dir="plugins/">
|
||||
<include name="*/build/release/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
<!-- Copy plugin libs -->
|
||||
<copy todir="${releaseDir}/lib" flatten="true" includeEmptyDirs="false">
|
||||
<fileset dir="plugins/">
|
||||
<include name="*/lib/**"/>
|
||||
</fileset>
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<!-- ________________________ UTILITY TARGETS ________________________ -->
|
||||
|
||||
<target name="clear-aggr-data-from-db" depends="">
|
||||
<exec executable="sqlite3">
|
||||
<arg line="hal.db 'DELETE FROM sensor_data_aggr'" />
|
||||
</exec>
|
||||
|
||||
<!-- update all internal sensors aggregation version to indicate for peers that they need to re-sync all data -->
|
||||
<exec executable="sqlite3">
|
||||
<arg line="hal.db 'UPDATE sensor SET aggr_version = (aggr_version+1) WHERE id = (SELECT sensor.id FROM user, sensor WHERE user.external == 0 AND sensor.user_id = user.id)'" />
|
||||
</exec>
|
||||
</target>
|
||||
|
||||
</project>
|
||||
100
build_plugin.xml
100
build_plugin.xml
|
|
@ -1,100 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="abstract plugin build file" >
|
||||
|
||||
<!-- ________________________ PROPERTIES AND SETTINGS ________________________ -->
|
||||
<!-- ____________ (THESE SHOULD BE SET BY IMPORTING BUILD SCRIPT) ____________ -->
|
||||
|
||||
<!--common properties-->
|
||||
<!--
|
||||
<property name="root" value="." />
|
||||
<property name="srcDir" value="${root}/src" />
|
||||
<property name="testDir" value="${root}/test" />
|
||||
<property name="libDir" value="${root}/lib" />
|
||||
|
||||
<property name="buildRoot" value="${root}/build" />
|
||||
<property name="compileDir" value="${buildRoot}/production" />
|
||||
<property name="compileTestDir" value="${buildRoot}/test" />
|
||||
<property name="releaseDir" value="${buildRoot}/release" />
|
||||
<property name="releaseJar" value="tellstick.jar" />
|
||||
<property name="reportsDir" value="../../${buildRoot}/reports" />
|
||||
-->
|
||||
|
||||
<!-- ________________________ CLASSPATH ________________________ -->
|
||||
|
||||
<!--define standard arguments for javac-->
|
||||
<presetdef name="javac">
|
||||
<javac includeantruntime="false" />
|
||||
</presetdef>
|
||||
|
||||
<!--classpath included when building-->
|
||||
<path id="classpath.build">
|
||||
<fileset dir="${libDir}" erroronmissingdir="false">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
<pathelement location="${compileDir}" />
|
||||
<!-- Hal core -->
|
||||
<pathelement location="../../build/production" />
|
||||
<fileset dir="../../lib">
|
||||
<include name="**/*.jar"/>
|
||||
</fileset>
|
||||
</path>
|
||||
|
||||
<path id="classpath.test">
|
||||
<pathelement location="${compileTestDir}" />
|
||||
<pathelement location="../../${compileTestDir}" />
|
||||
<!--include libraries used for building-->
|
||||
<path refid="classpath.build"/>
|
||||
</path>
|
||||
|
||||
<!-- ________________________ EXECUTION TARGETS ________________________ -->
|
||||
|
||||
<target name="test" depends="build-test">
|
||||
<mkdir dir="${reportsDir}" />
|
||||
<junit printsummary="yes" haltonfailure="false" fork="true">
|
||||
<classpath refid="classpath.test" />
|
||||
<formatter type="plain" usefile="false" /> <!-- to screen -->
|
||||
<formatter type="xml" /> <!-- to file -->
|
||||
|
||||
<batchtest todir="${reportsDir}" skipNonTests="true">
|
||||
<fileset dir="${compileTestDir}" includes="**/*Test*.class" erroronmissingdir="false"/>
|
||||
</batchtest>
|
||||
</junit>
|
||||
</target>
|
||||
|
||||
<!-- ________________________ BUILD TARGETS ________________________ -->
|
||||
|
||||
<!--clean all build paths-->
|
||||
<target name="clean">
|
||||
<delete includeemptydirs="true" failonerror="false">
|
||||
<fileset dir="${buildRoot}" includes="**/*"/>
|
||||
</delete>
|
||||
</target>
|
||||
|
||||
<!--build product code-->
|
||||
<target name="build">
|
||||
<mkdir dir="${compileDir}" />
|
||||
<javac srcdir="${srcDir}" destdir="${compileDir}" debug="yes" debugLevel="lines,vars,source" fork="yes">
|
||||
<classpath refid="classpath.build" />
|
||||
<include name="**/*.java" />
|
||||
</javac>
|
||||
<copy todir="${compileDir}">
|
||||
<fileset dir="${srcDir}"
|
||||
excludes="**/*.java" />
|
||||
</copy>
|
||||
</target>
|
||||
|
||||
<available file="${testDir}" property="testDirAvailable" value=""/>
|
||||
|
||||
<target name="build-test" depends="build" if="testDirAvailable">
|
||||
<mkdir dir="${compileTestDir}" />
|
||||
<javac srcdir="${testDir}" destdir="${compileTestDir}" debug="yes" debugLevel="lines,vars,source" fork="yes">
|
||||
<classpath refid="classpath.test" />
|
||||
<include name="**/*.java" />
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<target name="package" depends="build">
|
||||
<jar destfile="${releaseDir}/${releaseJar}" basedir="${compileDir}" />
|
||||
</target>
|
||||
|
||||
</project>
|
||||
0
external/tellstick-core/AUTHORS.txt
vendored
Executable file → Normal file
0
external/tellstick-core/AUTHORS.txt
vendored
Executable file → Normal file
0
external/tellstick-core/LICENSE.txt
vendored
Executable file → Normal file
0
external/tellstick-core/LICENSE.txt
vendored
Executable file → Normal file
18
external/tellstick-core/Protocol.cpp
vendored
Executable file → Normal file
18
external/tellstick-core/Protocol.cpp
vendored
Executable file → Normal file
|
|
@ -97,7 +97,7 @@ bool Protocol::checkBit(int data, int bitno) {
|
|||
|
||||
|
||||
Protocol *Protocol::getProtocolInstance(const std::wstring &protocolname) {
|
||||
if(TelldusCore::comparei(protocolname, L"arctech")) {
|
||||
if (TelldusCore::comparei(protocolname, L"arctech")) {
|
||||
return new ProtocolNexa();
|
||||
|
||||
} else if (TelldusCore::comparei(protocolname, L"brateck")) {
|
||||
|
|
@ -151,7 +151,7 @@ Protocol *Protocol::getProtocolInstance(const std::wstring &protocolname) {
|
|||
|
||||
std::list<std::string> Protocol::getParametersForProtocol(const std::wstring &protocolName) {
|
||||
std::list<std::string> parameters;
|
||||
if(TelldusCore::comparei(protocolName, L"arctech")) {
|
||||
if (TelldusCore::comparei(protocolName, L"arctech")) {
|
||||
parameters.push_back("house");
|
||||
parameters.push_back("unit");
|
||||
|
||||
|
|
@ -218,7 +218,7 @@ std::list<std::string> Protocol::decodeData(const std::string &fullData) {
|
|||
std::string decoded = "";
|
||||
|
||||
ControllerMessage dataMsg(fullData);
|
||||
if( TelldusCore::comparei(dataMsg.protocol(), L"arctech") ) {
|
||||
if ( TelldusCore::comparei(dataMsg.protocol(), L"arctech") ) {
|
||||
decoded = ProtocolNexa::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
|
|
@ -231,32 +231,32 @@ std::list<std::string> Protocol::decodeData(const std::string &fullData) {
|
|||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"everflourish") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"everflourish") ) {
|
||||
decoded = ProtocolEverflourish::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"fineoffset") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"fineoffset") ) {
|
||||
decoded = ProtocolFineoffset::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"mandolyn") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"mandolyn") ) {
|
||||
decoded = ProtocolMandolyn::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"oregon") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"oregon") ) {
|
||||
decoded = ProtocolOregon::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"x10") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"x10") ) {
|
||||
decoded = ProtocolX10::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
}
|
||||
} else if(TelldusCore::comparei(dataMsg.protocol(), L"hasta") ) {
|
||||
} else if (TelldusCore::comparei(dataMsg.protocol(), L"hasta") ) {
|
||||
decoded = ProtocolHasta::decodeData(dataMsg);
|
||||
if (decoded != "") {
|
||||
retval.push_back(decoded);
|
||||
|
|
|
|||
0
external/tellstick-core/Protocol.h
vendored
Executable file → Normal file
0
external/tellstick-core/Protocol.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolBrateck.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolBrateck.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolBrateck.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolBrateck.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolComen.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolComen.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolComen.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolComen.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolEverflourish.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolEverflourish.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolEverflourish.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolEverflourish.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFineoffset.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFineoffset.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFineoffset.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFineoffset.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFuhaote.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFuhaote.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFuhaote.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolFuhaote.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolGroup.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolGroup.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolGroup.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolGroup.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolHasta.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolHasta.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolHasta.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolHasta.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolIkea.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolIkea.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolIkea.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolIkea.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolMandolyn.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolMandolyn.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolMandolyn.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolMandolyn.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolNexa.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolNexa.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolNexa.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolNexa.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolOregon.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolOregon.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolOregon.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolOregon.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolRisingSun.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolRisingSun.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolRisingSun.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolRisingSun.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSartano.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSartano.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSartano.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSartano.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolScene.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolScene.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolScene.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolScene.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSilvanChip.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSilvanChip.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSilvanChip.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolSilvanChip.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolUpm.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolUpm.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolUpm.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolUpm.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolWaveman.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolWaveman.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolWaveman.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolWaveman.h
vendored
Executable file → Normal file
2
external/tellstick-core/ProtocolX10.cpp
vendored
Executable file → Normal file
2
external/tellstick-core/ProtocolX10.cpp
vendored
Executable file → Normal file
|
|
@ -175,7 +175,7 @@ std::string ProtocolX10::decodeData(const ControllerMessage& dataMsg) {
|
|||
retString << "house:" << static_cast<char>('A' + intHouse);
|
||||
retString << ";unit:" << unit+1;
|
||||
retString << ";method:";
|
||||
if(method == 0) {
|
||||
if (method == 0) {
|
||||
retString << "turnon;";
|
||||
} else {
|
||||
retString << "turnoff;";
|
||||
|
|
|
|||
0
external/tellstick-core/ProtocolX10.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolX10.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolYidong.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolYidong.cpp
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolYidong.h
vendored
Executable file → Normal file
0
external/tellstick-core/ProtocolYidong.h
vendored
Executable file → Normal file
0
external/tellstick-core/README.txt
vendored
Executable file → Normal file
0
external/tellstick-core/README.txt
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/Static/amd64/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/Static/amd64/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/Static/i386/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/Static/i386/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftbusui.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftbusui.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftcserco.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftcserco.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx64.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx64.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftdibus.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftdibus.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftlang.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftlang.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftser2k.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftser2k.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftserui2.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/amd64/ftserui2.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/dpinst-amd64.exe
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/dpinst-amd64.exe
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/dpinst-x86.exe
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/dpinst-x86.exe
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftd2xx.h
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftd2xx.h
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdibus.cat
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdibus.cat
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdibus.inf
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdibus.inf
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdiport.cat
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdiport.cat
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdiport.inf
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/ftdiport.inf
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftbusui.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftbusui.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftcserco.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftcserco.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.lib
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftdibus.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftdibus.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftlang.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftlang.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftser2k.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftser2k.sys
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftserui2.dll
vendored
Executable file → Normal file
0
external/tellstick-driver/SerialDriver_Windows/i386/ftserui2.dll
vendored
Executable file → Normal file
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue