Compare commits

...

305 commits

Author SHA1 Message Date
c7f0d4e8b3 Uplift to Java 21 2025-12-16 23:55:17 +01:00
e39e1b462d Added links in settings page 2025-10-24 01:56:41 +02:00
9d41856854 Added support for multiple eco cube devices 2025-10-24 01:55:49 +02:00
c26c769108 Renamed devices to have Config at the end 2025-10-24 01:47:19 +02:00
ac97ca8068 Fixed equals method and refactored vue folder 2025-10-24 01:10:58 +02:00
c96a00333b Renamed Tibber plugin name 2025-10-23 23:30:55 +02:00
21a672acf4 Implementation of EcoSens Cloud API 2025-10-23 23:29:31 +02:00
be7b6cc2d6 Refactored Tibber query code into a seperate class 2025-10-23 23:19:15 +02:00
6cec337db1 Implement the proper shutdown for TibberController 2025-10-23 22:31:30 +02:00
8ee7ed0ef2 Fixed current showing incorrectly 2024-12-29 22:38:53 +01:00
3e60e55f16 Fixed plugin config issue 2024-12-29 22:32:56 +01:00
bec5a3098b Fixed equals bug in Tibber 2024-12-29 22:28:23 +01:00
96635381f4 Finished tibber controller logic 2024-12-29 00:38:07 +01:00
12d3c80ba8 Fixed bug with tibber request 2024-12-28 22:11:26 +01:00
17026db07e Added power, voltage and current to MQTT parsing 2024-12-28 20:55:37 +01:00
f68ec9a8e9 Downgraded SQLite 2024-10-01 23:49:57 +02:00
aa3c3d05e1 Added doc for missing commands 2024-10-01 23:38:21 +02:00
3d883e0674 Fixed incorrect Zigbee2mqtt topic name for setting values 2024-10-01 23:26:32 +02:00
22e6400369 Removed old event page 2024-09-26 00:55:47 +02:00
60024dc915 Fixed Event overview page to properly modify events 2024-09-26 00:54:58 +02:00
d049e524d5 Added support for setting event values through MQTT 2024-09-26 00:31:25 +02:00
cc0b50f288 Updated readme with current project state 2024-09-26 00:30:49 +02:00
a980bc4946 Implemented MQTT events and added additional test cases 2024-09-25 00:16:07 +02:00
3ef524accd Uplift to solve vulnerabilities 2024-09-22 00:09:48 +02:00
34e6843d91 Fixe some buggs in MQTT, it works now 2024-09-09 23:35:26 +02:00
b7ee6b16dc Introduced MQTT detectors to autodetect MQTT devices 2024-09-04 02:58:44 +02:00
e4707c2493 Fixed console output issue 2024-07-16 23:44:46 +02:00
f3cbda43d1 Some bugfixes 2024-05-27 01:41:37 +02:00
ce73bd70fe Moved Zigbee neighbour info to API 2024-05-27 00:01:22 +02:00
784844b85f added favicon 2024-03-22 02:05:51 +01:00
c145056e5e robustness fix 2024-03-22 01:43:09 +01:00
e39f282abf robustness fix 2024-03-22 01:41:40 +01:00
1d8b26998a fixed some JS issues where event overview links did not work and all devices does is not visible 2024-03-22 01:27:43 +01:00
98c48e595f Fixed compilation issues 2024-03-15 00:59:47 +01:00
7d64788154 Introduction of JS based pages 2024-03-15 00:17:15 +01:00
c4cb9ff458 Added Tibber plugin 2024-03-15 00:07:52 +01:00
2e924d2882 Minor robustness fix 2024-03-15 00:06:10 +01:00
e6de5e4576 Added daemon view to plugin page 2024-03-15 00:05:39 +01:00
183e14733c Added missing plugins to example configuration 2024-03-15 00:04:28 +01:00
7935dd5c93 Added initial zigbee network map 2024-03-15 00:03:39 +01:00
9fe699b40d Added missing tibber build file 2024-03-14 23:25:32 +01:00
0b84b5aea4 Moving checkbox switch to css and colored the slider 2024-01-27 00:15:23 +01:00
2af860f694 Added daemon list to frontend 2024-01-25 14:42:28 +01:00
47f730b76e Introduction of Javascript modules for frontend 2024-01-24 22:23:48 +01:00
c27f1030b6 Moved around some properties in the API 2024-01-24 22:22:20 +01:00
99a61f8ca3 Added controller status indication 2024-01-24 21:41:51 +01:00
78b7484403 Updated exception reporting to Logger 2024-01-23 23:00:25 +01:00
eb24b32952 Changed extension of license files 2023-11-04 23:20:09 +01:00
c818d5bcc7 Improved data column title 2023-10-04 23:44:43 +02:00
8a5267b0f8 Fixed exceptions and color selection 2023-10-04 23:32:24 +02:00
54a9fcedf8 some bugfixes 2023-09-28 22:14:13 +02:00
198c681333 some bugfixes 2023-09-28 22:09:46 +02:00
ec4cbc1e7c some bugfixes 2023-09-28 22:08:35 +02:00
7ea6f8b3e4 silence gradle on run 2023-09-28 22:05:26 +02:00
a52de9ccb7 silence gradle on run 2023-09-28 21:59:58 +02:00
dc4f54be4b Pressure data bugfix 2023-09-28 21:37:32 +02:00
f7f590a77e Bugfix of incorrectly read level of zigbee devices 2023-09-08 23:16:03 +02:00
a4745cdccd Added Color and Brightness traits to Google Assistant 2023-09-08 22:14:03 +02:00
a68980a6b3 Fixed color in event overview 2023-09-04 01:21:43 +02:00
cdb66470b5 Fixed auto table update messing with user input 2023-08-28 22:09:18 +02:00
1875160f6f Fixed compile error 2023-08-22 22:09:50 +02:00
dd0cc96d58 Improved MQTT Unkown device printout 2023-08-22 20:29:29 +02:00
2d2a79470d Fixed MQTT and added PM2.5 trait to google assistant 2023-08-21 02:44:12 +02:00
cfcebca5a0 Fixed incoorect data type for humidity 2023-08-20 23:40:31 +02:00
4d473573db Fixed deletion issue 2023-05-16 02:29:12 +02:00
6acf0ad031 added no color option to run script 2023-05-16 01:43:16 +02:00
070aeb35d7 Reshuffled init order to allow web server port modification 2023-05-16 01:13:53 +02:00
b710626ad0 Updated junit report path 2023-05-15 23:47:08 +02:00
16604f7fdb Fixed run permissions 2023-05-15 23:33:54 +02:00
6e4e7fba4a Uplift zutil version 2023-05-15 15:40:16 +02:00
234125bc35 Implementation of level and color data types 2023-05-15 15:35:56 +02:00
a89b418350 Fixed alerts as strings was not escaped properly 2023-03-29 01:07:41 +02:00
2dec5c1a05 Added PM sensor 2023-03-26 01:32:27 +01:00
926c3e2af2 Improved MQTT Broker and added overview page 2023-03-26 00:53:39 +01:00
bda3f270af Added telegram support 2023-03-04 00:24:20 +01:00
aff64c354c Fixing incorrect position of UI button 2023-02-27 23:34:20 +01:00
425012517c Refactored run script to not run Hal through gradle. 2023-02-27 23:33:56 +01:00
13b8dc95db Fixed wording 2023-02-26 17:04:02 +01:00
1dec30e2fa Added room hint to google assistant 2023-01-12 00:57:56 +01:00
7747a10959 Introduction of room alerts 2023-01-11 16:11:11 +01:00
ed04554a4a Refactored alerts to be API based and not directly generated into the HTML 2023-01-11 03:41:15 +01:00
2ee0e775be Moved css into a lib folder for external code 2023-01-10 03:08:17 +01:00
b80991280a Downgraded svg.js as many plugins did not support v3.x
Now rooms can be moved and resized.
2023-01-10 02:58:36 +01:00
fb7f43ed23 Upgraded svg.js library to version 3 2023-01-10 00:53:30 +01:00
d8a1b66738 Removed unnecessary extra layer in resource folder structure. 2023-01-09 01:02:37 +01:00
94485b5633 Starting differential update of map 2023-01-09 00:51:51 +01:00
628c89b1d1 Moved external JS scripts to lib folder, moved map JS to a seperate file 2023-01-09 00:14:54 +01:00
7a90189927 Introduction of Room assignments 2023-01-06 23:54:53 +01:00
b5ac492414 Added AlertAction and fixed enum selection issues on the frontend 2023-01-06 00:16:45 +01:00
0efa7320e3 Fixed up the API and added API doc 2023-01-05 22:24:47 +01:00
253208b6f9 Fixed issue where API always returned all devices 2022-06-01 20:04:26 +02:00
b80ca96a73 Fixed misspelling 2022-05-27 03:08:13 +02:00
fa28d7e3d7 Uplifted Jenkins jdk 2022-05-27 03:06:04 +02:00
4dfba22914 Uplift of Zutil 2022-05-27 03:02:00 +02:00
100123e716 Uplift of Zutil 2022-05-27 02:21:19 +02:00
ef365f360c Moved Json Pages to api folder and added auto update javascript to overview pages. 2022-05-27 02:13:33 +02:00
95ff5b81c0 Added possibility to refresh individual Zigbee attributes. 2022-05-23 23:19:21 +02:00
7cf6849e5d Added duplicate listener logic to prevent duplicate reports. 2022-05-23 20:09:45 +02:00
53e9f08272 Added some robustness to RTSP recorder 2022-05-23 20:09:05 +02:00
6b92172d74 Added missing NVR files 2022-05-20 13:05:34 +02:00
2501831a59 Working NVR plugin 2022-05-20 13:04:23 +02:00
3a278b0ca6 Changed to disable plugins by default 2022-05-20 12:00:06 +02:00
78e2edd4e9 Fixed some spelling mistakes 2022-05-20 11:59:49 +02:00
a8fe102bb8 Changed type to show configuration class 2022-05-20 11:58:59 +02:00
e88250196e fixed js include 2021-12-05 21:04:30 +01:00
57ef44c450 Removed staging ACME server 2021-12-04 22:52:49 +01:00
931669bf53 CHanged manual URL generation to a util class. 2021-12-04 22:50:22 +01:00
c01367e422 Improved logging 2021-12-04 22:14:49 +01:00
b91f006d8b Made error handling more robust for managers 2021-12-04 21:31:48 +01:00
b65a9f0bd3 Improved external web-server 2021-12-04 21:00:08 +01:00
d91556681b Added some user messages to cert generation 2021-12-03 02:12:59 +01:00
242d3addef Fixed warning 2021-12-03 01:55:44 +01:00
81b7d7e930 Removed unused API classes 2021-12-03 01:55:33 +01:00
5dae45bb0b Renamed DB Upgrade classes 2021-12-03 01:53:23 +01:00
fa78d02778 Added additional method needed for newer Zigbee lib versions 2021-12-03 01:52:09 +01:00
370fecaa8a Fixed a bug where null device are returned on sync request 2021-10-10 02:40:18 +02:00
b6a0e39ac3 Improved logging and removed exception in factory. 2021-10-10 02:25:22 +02:00
433b3ee002 Fixed incorrect exception messages 2021-10-10 02:11:24 +02:00
58894924a5 Updated some js libs and added license info 2021-10-02 20:48:17 +02:00
3edea58f8c Renamed some DeviceData classes, added additional data classes also and better handling in zigbee 2021-10-02 19:42:23 +02:00
dc200294be Added ability to disable local mDNS server 2021-10-02 19:40:45 +02:00
4d1922d088 Added ID to config pages 2021-09-23 00:36:40 +02:00
c9227fd8ac Added safty check so that Google sync does not fail 2021-09-23 00:05:38 +02:00
0b029f68e3 Bugfix for devices that do not have any data yet 2021-09-23 00:02:05 +02:00
c46aab31e9 Added margin to logo 2021-09-16 22:46:28 +02:00
184fdc14d1 Bugfix 2021-09-16 22:01:27 +02:00
940016f44a Added default aggregation intervall. 2021-09-16 21:58:48 +02:00
af39f2c94b bah, added exec permission 2021-09-16 17:21:04 +02:00
9c74043172 added exec permission on run.sh 2021-09-16 17:18:32 +02:00
7cf816c903 Added collapsable panels to zigbee network page 2021-09-16 17:15:22 +02:00
342368bd77 Fixed startup page 2021-09-16 00:10:46 +02:00
bc35492cee Refactoring navigation 2021-09-15 22:58:01 +02:00
d7605da60f Added startup page 2021-09-15 22:21:21 +02:00
bfd895112d Added a test mode without cert for external web server 2021-09-15 16:56:24 +02:00
b4f6f15055 fixed misspelling 2021-09-15 16:29:59 +02:00
1b93608d2a Added Scannable interface to NetScan 2021-09-15 16:34:21 +02:00
987dab9079 Uplift of Zutil 2021-09-10 22:19:02 +02:00
f2dfe7a88f Removed deconz 2021-09-09 17:53:07 +02:00
28ff89d07f Moved OAuth to the external http daemon and added OAuth2 store 2021-09-09 17:52:14 +02:00
20228d9e79 Fixed gradle config warning 2021-09-06 16:40:42 +02:00
b2d96b34b1 Bugfix 2021-09-06 16:34:20 +02:00
6cb0a2ddf0 Fixed ctrl-c for the gradle build 2021-09-06 16:17:11 +02:00
b94b33ecf1 Possibly fixed multiple listener addition 2021-09-06 16:05:32 +02:00
f27f7e4c81 Added google oath token to DB as the session was invalidated after restart. 2021-09-06 16:04:36 +02:00
48a139cdd5 bugfix 2021-08-30 01:52:38 +02:00
ce0f6ebd7c Switched to Integer 2021-08-30 01:50:19 +02:00
d00a13bb50 bugfix 2021-08-30 01:47:49 +02:00
1cbb44f714 Fixed casting issue 2021-08-30 01:46:39 +02:00
f5f3730281 Refactored event sending function to be more robust and thread safe 2021-08-30 01:42:34 +02:00
102d8aa266 Updated so that if a device data is not set then the latest one will be loaded from the DB 2021-08-30 01:39:29 +02:00
b1db199beb Refactored getController method 2021-08-30 01:32:26 +02:00
41357ed8dd Missed a check 2021-08-30 01:19:03 +02:00
4339239c33 Added more google traits and implemented execution function 2021-08-30 01:16:00 +02:00
08fd1b6edd Another fix 2021-08-29 22:24:32 +02:00
02f9d4fcb7 Another fix 2021-08-29 22:15:44 +02:00
17337e39ba Fixed another issue 2021-08-29 22:10:41 +02:00
b30248d973 Fixed null pointer exeption 2021-08-29 22:06:25 +02:00
41dfcd0e4f Seems google does not return custom data during query 2021-08-29 22:00:10 +02:00
870d9cbbab Some more bug fixes 2021-08-29 19:59:02 +02:00
fa80fbc114 Added Event devices to google assistant 2021-08-29 17:00:33 +02:00
2d30b9451b Temporarily disabled zip and tar packing 2021-08-29 15:01:44 +02:00
e863797030 bugfix 2021-08-29 14:57:03 +02:00
f4b9d46077 Removed unnecessary check 2021-08-29 14:53:16 +02:00
2d1e6f8f50 Fixed issue where external pages are not set 2021-08-29 14:16:42 +02:00
378d00b83e Zigbee plugin version uplift 2021-08-29 01:30:49 +02:00
8c369ed2e8 Uplift of zutil and updated documentation 2021-08-29 01:22:33 +02:00
9e58387ef7 Fixed recursive issue with dummy event and reduce update time for gui selections 2021-08-28 16:58:03 +02:00
5e31cea660 Added robustness for invalid IeeeAdresses 2021-08-28 16:52:24 +02:00
ed04b687ed Fixed issue where new devices was not showing up in the gui as selections 2021-08-28 16:46:55 +02:00
0cf4909df4 Removed some padding on trigger page 2021-08-28 16:29:51 +02:00
b700fdd8dd fixed comment 2021-08-28 16:12:58 +02:00
a21ac02333 Some bugfixes for multiple reports 2021-08-28 16:10:58 +02:00
17438db7a2 Made cron date time trigger more robust 2021-08-28 15:32:12 +02:00
870be06255 Moved external http server to a daemon 2021-08-28 14:09:41 +02:00
ee89eeb39d Uplift of zutil 2021-08-27 01:25:53 +02:00
291c4cb42a Added mDNS Daemon which will resolve hal.local domain 2021-08-26 21:21:55 +02:00
68c7755e7e Added exec permisison 2021-08-26 19:54:54 +01:00
48a62d819a Upgraded Zutil lib version 2021-08-22 16:09:43 +02:00
ac27882ad1 Fixed programmatically using a Certificate object for HttpServer 2021-08-22 02:11:06 +02:00
c197606204 Use existing certificate instead of doing the process all the time 2021-08-22 01:42:28 +02:00
d9ce3af5aa Fixed certificate handling 2021-08-20 23:10:13 +02:00
e8270d4027 Moved external HttpServer to hal-core and added SSL possibility through LestEncrypt 2021-08-05 16:41:40 +02:00
2dc35e212b Changed properties defined by .config file to be read only 2021-08-05 16:41:40 +02:00
e57d62471b Added hal.service file for systemd and updated the run script to support forground execution 2021-07-29 10:30:55 +01:00
5e3b103815 changed execution permission on run script 2021-07-28 15:46:15 +02:00
e1b2494835 updated run script to run gradle instead of ANT 2021-07-28 15:44:24 +02:00
c27556500e made gradlew executable 2021-07-28 15:32:09 +02:00
696cca0087 set a fixed zutil version dependency 2021-07-28 15:10:29 +02:00
9e6172caeb Added Zigbee attribute reading daemon 2021-07-23 23:35:19 +02:00
68054ebf4f Fixed zigbee on off events 2021-07-19 23:51:29 +02:00
203bb67f7f Added hal prefix to all config properties 2021-07-19 18:06:00 +02:00
4dfa80c17f Moved Zigbee DB things to its own package 2021-07-13 00:52:02 +02:00
3cd96cfc82 Some Zigbee bugfixes 2021-07-12 22:39:57 +02:00
bcc4133a31 Fixed some zigbee bugs 2021-07-12 00:35:25 +02:00
d6fc1390fd Fixed some bugs 2021-07-12 00:35:06 +02:00
55ceb0bf34 Small cleanup and fixed tests 2021-07-11 23:07:14 +02:00
6a81f5de16 Initial implementation of plugin DB upgrade support 2021-07-11 23:00:47 +02:00
aea0d9bab1 Added zigbee Hal DB data storage 2021-07-06 21:57:21 +02:00
52273e1ebe Hal now properly detects Zigbee sensors 2021-07-03 00:59:18 +02:00
902d87a9c5 Added overview Zigbee Node page for troubleshooting 2021-07-03 00:03:18 +02:00
81dc81a1ae Added scan button to Event and Sensor config pages 2021-07-02 00:42:11 +02:00
94bfbbd664 Removed generics from device listener and updated some js libs 2021-07-02 00:06:26 +02:00
53d471c0aa Changed device listener to be a list instead of single listener 2021-06-25 22:35:01 +02:00
8d9896f8b4 Refactored Zigbee attribute listener 2021-06-25 20:43:54 +02:00
3a49b15dea Added Zigbee attribute listener 2021-06-25 00:21:18 +02:00
1adaf8bc46 Updated vendore code exclusion as project now shows as majority javascript 2021-06-21 12:19:21 +02:00
267054e4ba Changed controllers to be singleton in the manager and moved isAvailable to AbstractController 2021-06-09 23:27:42 +02:00
a80a1c5cdc Added scanning button animation, detection of scannable controllers and scan start 2021-06-09 22:17:32 +02:00
6656882859 Added scan button to controller section 2021-06-09 20:53:10 +02:00
e662f7e29d More bug fixes for controller initiations 2021-06-09 20:35:54 +02:00
cf795be35f Fixed listing of controllers 2021-06-08 23:51:28 +02:00
1cc834f089 Made Hal more robust 2021-06-08 23:34:44 +02:00
132bd3b29d Downgraded zigbee framework to work with CC2531 dongle 2021-06-06 04:33:28 +02:00
d68c3cae54 Updated github language settings 2021-05-23 01:32:57 +02:00
e1618604c9 Updated with new Configurator changes and cleaned up imports 2021-05-08 01:41:13 +02:00
6109f66ea0 Updated to new Zutil naming 2021-05-07 00:17:38 +02:00
5716584772 Some small refactoring 2021-04-29 01:10:45 +02:00
edaa23f0f6 Fixed device reconfiguration, not tested though 2021-03-24 00:46:15 +01:00
5a1be3c2e4 Formatting cleanup 2021-03-23 21:54:29 +01:00
c7e286f51e Moved find device to its own utility method, and added a specific equals method and reworked some test. 2021-03-23 01:57:12 +01:00
7e8938c38c Renamed AbstractDevice to HalAbstractDevice and moved int intf package 2021-03-21 19:40:36 +01:00
8d51526481 Added architecture description 2021-03-21 19:37:17 +01:00
c0188cd5cc Refactoring of of inheritance structure, ControllerManagers will now also be able to be provided through plugins 2021-03-16 22:24:43 +01:00
28bc108921 Some cleanup in triggers page 2021-02-17 22:43:33 +01:00
0a1ce4fe60 Migrated to Zutil UserMessage class 2021-02-17 22:28:27 +01:00
1e0ec282ca Some troubleshooting on ZigBee plugin 2021-02-13 16:03:29 +01:00
6f39d31d5d Updated run permission 2021-02-09 00:14:21 +01:00
41b2eb6b07 Moved hal-default.db file into resource folder. 2021-01-29 21:56:43 +01:00
9ad529d9eb Added videojs player to play hls streams, fixed monitor web page 2021-01-29 21:40:54 +01:00
da3ba116da initial commit for NVR plugin 2021-01-26 01:53:11 +01:00
65581f13d5 Some small updates and fixes for Zigbee 2021-01-26 01:52:50 +01:00
326d773741 Fixed device pairing for ZigBee devices, endpoints not working still 2021-01-07 01:25:58 +01:00
3b949b13f7 ABle to connect to zigbee dongle now 2021-01-02 18:08:19 +01:00
6214c01157 Split switch event data into multiple classes 2021-01-02 04:25:04 +01:00
4499824965 Switched to use input and output streams 2021-01-02 04:05:45 +01:00
48e0c065b6 Started migration to new zigbee library 2021-01-02 01:20:59 +01:00
e59d65fac0 Small updates 2021-01-01 23:19:16 +01:00
3dbd626aee Moved out the pan id configuration 2021-01-01 22:20:17 +01:00
ee485c4466 Moved sync request to smart app 2021-01-01 22:19:51 +01:00
b60a7af9cd Added custom serial port implementation using JSerialComm 2020-12-26 01:35:03 +01:00
1c0340b9cf Updated readme files 2020-12-25 23:09:45 +01:00
dd1cc00c9d Added Zigbee plugin based on Zigbee4java 2020-12-25 23:08:42 +01:00
4f0398260b Moved current zigbee prototype into zigbee-deconz plugin and disabled plugin. 2020-12-25 18:21:02 +01:00
49318f3191 Small fixes 2020-12-16 22:30:58 +01:00
490655fb02 small change 2020-12-09 00:23:41 +01:00
907e8ee498 Fixed synchronization issues 2020-12-09 00:20:47 +01:00
d7a14a4899 Separated traits into their own classes, added humidity 2020-12-08 23:15:20 +01:00
a968c1a91e Added some more dummy sensors and improved the architecture 2020-12-08 23:14:36 +01:00
f4515f86c8 Dives now registered in Google Assistant but no data is displayed 2020-12-05 01:41:08 +01:00
7f22b2dee2 Some bugfixes 2020-12-05 01:00:08 +01:00
fc37d158c5 Added dummy plugin for simulated sensors 2020-12-05 00:08:29 +01:00
c6f90c42af Some more assistant progress, SYNC is now working but not yet returning devices 2020-12-05 00:07:41 +01:00
1b83d4180b Added description to plugins page 2020-12-05 00:03:12 +01:00
e54b53c974 Cleanup of sort function 2020-11-30 23:58:57 +01:00
fee3fd81a0 Fixed some things in assistant 2020-11-30 23:32:53 +01:00
ccc99033cd Now using Zutil Oauth code properly 2020-11-27 02:18:59 +01:00
03ae4329bc Migrated to new Oauth2 pages in Zutil 2020-11-22 23:26:00 +01:00
baaeddb9fb Make OAuth pages to follow spec 2020-11-20 00:36:29 +01:00
e0c464416d Fixed OAth2 pages, still some things to fix 2020-11-17 01:00:23 +01:00
43892798ef Some progress on G assistant api 2020-11-11 22:17:41 +01:00
64f2f598df Fixed resource path issues with gradle 2020-11-11 01:48:09 +01:00
b405f0b191 Fixed resource paths, still not working 2020-11-10 22:02:11 +01:00
ded778fd11 Fixed build dependency issues by moving hal core into hal-core folder/subproject 2020-11-10 18:36:02 +01:00
f1da2c5a4d Fixed build failures 2020-11-10 16:41:01 +01:00
9a44631a96 Fixing build issues 2020-11-10 16:40:31 +01:00
8fad681f01 With gradle the lib folder is no longer needed 2020-11-10 16:40:03 +01:00
0ca8bcab43 Removed TTS and STT code 2020-11-10 15:08:18 +01:00
51fa28bddf Updated plugin versions to indicate alpha status and changed back JSON page function parameters. 2020-09-05 14:13:35 +02:00
4a31b474c5 Added its own http server for Google Assistant api 2020-09-05 14:13:35 +02:00
9bca47d566 Added header parameters to JSON pages, Some cleanup of google assistant example code 2020-09-05 14:13:35 +02:00
0632804bd4 moved zwave config files 2020-08-31 17:03:42 +02:00
8362585b7b Updated readme files 2020-08-31 12:03:46 +02:00
67801e0c91 Including gradle wrapper 2020-08-28 23:22:29 +02:00
a49cb55b93 Switched to Gradle as build system 2020-08-28 23:09:15 +02:00
da36be0862 Updated plugin build files 2020-08-28 16:59:13 +02:00
5612a5e039 Added deConz interface 2020-07-28 14:08:35 +02:00
d003727113 added some more log printouts 2020-07-24 00:53:59 +02:00
c4968633ed fixed comment 2020-07-24 00:43:01 +02:00
12a6c1d31b Cleanedup property names 2020-07-24 00:39:11 +02:00
c3731ca4b4 Cleanup of property names 2020-07-24 00:25:58 +02:00
467a5ff068 small refactoring 2020-07-23 23:48:04 +02:00
d759ebcd77 Introduced AbstractController 2020-07-23 23:44:40 +02:00
267eda7afd Fixed test 2020-06-26 01:17:47 +02:00
b065d1136e Fixed PC web page definition 2020-06-26 01:15:04 +02:00
47afc78ee4 Moved PC to a plugin directory 2020-06-26 00:56:56 +02:00
fccc6a3609 Renamed PC 2020-06-26 00:00:28 +02:00
c7583d9d6f Incremented Zutil version 2020-06-25 23:37:20 +02:00
dc829b9487 Added the ability to enable or disable plugins on startup 2020-06-25 23:36:37 +02:00
b3f28c8276 Fixed wrong DNS entries 2020-06-25 23:25:38 +02:00
14c925d480 Added start of services 2020-06-25 17:01:28 +02:00
3f94756fa8 Clarified log text 2020-06-25 17:00:58 +02:00
b7eab6e3d0 Fixed zutil version link 2020-06-25 17:00:28 +02:00
eb63ff0a51 Moved event nav lower 2020-06-22 22:27:57 +02:00
edd5d0d083 Moved the smaller plugins to separate folders. 2020-06-22 22:26:53 +02:00
fc11ae264f Added plugin page for viewing plugin information 2020-06-22 22:16:50 +02:00
4f7476bb84 Renamed HalHttpPage to HalWebPage 2020-06-22 22:02:17 +02:00
cf3c922fa2 Added page for viewing properties. 2020-06-22 21:55:04 +02:00
584760b6ba New MQTT plugin 2020-06-22 16:30:07 +02:00
cb9838181f Fixed zutil dependecy issues 2020-06-22 16:29:44 +02:00
bc9d598bfe Added some comments 2020-06-22 14:58:44 +02:00
659d5ea0d2 Updated comment 2020-06-22 14:13:57 +02:00
2242401977 Updated parameter names 2020-06-22 14:07:03 +02:00
c3f2b91d72 Added missing file 2020-06-22 12:08:39 +02:00
e5cd72ec2d Fixed some issues 2020-06-22 11:47:36 +02:00
Ziver Koc
e777d4e3bf updated zutil download link 2020-01-21 10:54:08 +01:00
791 changed files with 65802 additions and 352599 deletions

View file

@ -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
View 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
View 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

View file

@ -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
View file

@ -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
View 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
View file

67
README.md Executable file → Normal file
View file

@ -1,44 +1,56 @@
# 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
- **NUT**, Linux UPS daemon
- **Tellstick**, Supported devices:
- NexaSelfLearning
- Oregon0x1A2D
- 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
![](screenshot_01.jpg)
![Week Graph](screenshot_01.jpg)
![](screenshot_02.jpg)
![Home Map](screenshot_02.jpg)
![](screenshot_03.jpg)
![Sensor Overview](screenshot_03.jpg)
![](screenshot_04.jpg)
![Event Overview](screenshot_04.jpg)
## 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.
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

View file

@ -59,28 +59,28 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
uint64_t data = 0;
bool dimValuePresent;
uint8_t b1,b2,b3,b4;
//parse preamp
b1 = *bufStartP;
stepBufferPointer(&bufStartP);
b2 = *bufStartP;
stepBufferPointer(&bufStartP);
if(!IS_PREAMP(b1, b2)){
if (!IS_PREAMP(b1, b2)){
return false;
}
//parse data
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;
}
for (uint8_t i = 0; i < dataBitsInBuffer; ++i) {
b1 = *bufStartP; //no of high
stepBufferPointer(&bufStartP);
@ -103,7 +103,7 @@ bool parseArctechSelfLearning(uint8_t* bufStartP, uint8_t* bufEndP) { //start
}
//data parsed - send event over serial
Serial.print(F("+Wclass:command;protocol:arctech;model:selflearning;data:0x"));
uint8_t hexToSend = (dimValuePresent ? 9 : 8);
for (int8_t i = hexToSend - 1; i >= 0; --i) {

View file

@ -17,29 +17,29 @@ void parseRadioRXBuffer() {
bool parse = false;
while (bufferReadP != bufferWriteP) { //stop if the read pointer is pointing to where the writing is currently performed
uint8_t sampleCount = *bufferReadP;
if ( (((uintptr_t)bufferReadP) & 0x1) == 1 ) { //buffer pointer is odd (stores highs)
//Serial.print("high:"); Serial.println(sampleCount);
if (prevValue >= SILENCE_LENGTH) {
startDataP = bufferReadP; //some new data must start here since this is the first "high" after a silent period
}
//stream data to stream parsers
parseOregonStream(HIGH, sampleCount);
} else { //buffer pointer is even (stores lows)
//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;
}
}
//stream data to stream parsers
parseOregonStream(LOW, sampleCount);
}
//step the read pointer one step
@ -74,11 +74,11 @@ void parseRadioRXBuffer() {
//Let all available parsers parse the data set now.
parseArctechSelfLearning(startDataP, endDataP);
//TODO: add more parsers here
//reset the data pointers since the data have been parsed at this point
startDataP = 0;
endDataP = 0;
}; //end radioTask
void sendTCodedData(uint8_t* data, uint8_t T_long, uint8_t* timings, uint8_t repeat, uint8_t pause) {
@ -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
View file

0
arduino/HalMultiSensor/HalInclude.h Executable file → Normal file
View file

0
arduino/HalMultiSensor/HalInterfaces.h Executable file → Normal file
View file

6
arduino/HalMultiSensor/HalMultiSensor.ino Executable file → Normal file
View 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
View file

View file

0
arduino/HalMultiSensor/HalMultiSensorEnclosure_top.stl Executable file → Normal file
View file

0
arduino/HalMultiSensor/Interrupt.cpp Executable file → Normal file
View file

0
arduino/HalMultiSensor/Interrupt.h Executable file → Normal file
View file

0
arduino/HalMultiSensor/ProtocolNexa.cpp Executable file → Normal file
View file

0
arduino/HalMultiSensor/ProtocolNexa.h Executable file → Normal file
View file

4
arduino/HalMultiSensor/ProtocolOregon.cpp Executable file → Normal file
View 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
View file

0
arduino/HalMultiSensor/SensorBH1750.cpp Executable file → Normal file
View file

0
arduino/HalMultiSensor/SensorBH1750.h Executable file → Normal file
View file

0
arduino/HalMultiSensor/SensorDHT.cpp Executable file → Normal file
View file

0
arduino/HalMultiSensor/SensorDHT.h Executable file → Normal file
View file

0
arduino/HalMultiSensor/SensorPhotocell.cpp Executable file → Normal file
View file

0
arduino/HalMultiSensor/SensorPhotocell.h Executable file → Normal file
View file

111
build.gradle Normal file
View 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
View file

@ -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>

View file

@ -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
View file

0
external/tellstick-core/LICENSE.txt vendored Executable file → Normal file
View file

18
external/tellstick-core/Protocol.cpp vendored Executable file → Normal file
View 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
View file

0
external/tellstick-core/ProtocolBrateck.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolBrateck.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolComen.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolComen.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolEverflourish.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolEverflourish.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolFineoffset.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolFineoffset.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolFuhaote.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolFuhaote.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolGroup.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolGroup.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolHasta.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolHasta.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolIkea.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolIkea.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolMandolyn.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolMandolyn.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolNexa.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolNexa.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolOregon.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolOregon.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolRisingSun.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolRisingSun.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolSartano.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolSartano.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolScene.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolScene.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolSilvanChip.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolSilvanChip.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolUpm.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolUpm.h vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolWaveman.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolWaveman.h vendored Executable file → Normal file
View file

2
external/tellstick-core/ProtocolX10.cpp vendored Executable file → Normal file
View 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
View file

0
external/tellstick-core/ProtocolYidong.cpp vendored Executable file → Normal file
View file

0
external/tellstick-core/ProtocolYidong.h vendored Executable file → Normal file
View file

0
external/tellstick-core/README.txt vendored Executable file → Normal file
View file

View file

View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftbusui.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftcserco.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx.lib vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftd2xx64.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftdibus.sys vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftlang.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftser2k.sys vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/amd64/ftserui2.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/dpinst-amd64.exe vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/dpinst-x86.exe vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/ftd2xx.h vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/ftdibus.cat vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/ftdibus.inf vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/ftdiport.cat vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/ftdiport.inf vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftbusui.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftcserco.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftd2xx.lib vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftdibus.sys vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftlang.dll vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftser2k.sys vendored Executable file → Normal file
View file

0
external/tellstick-driver/SerialDriver_Windows/i386/ftserui2.dll vendored Executable file → Normal file
View file

Some files were not shown because too many files have changed in this diff Show more