Code Monkey home page Code Monkey logo

asterics-smarthome-knx's Introduction

AsTeRICS based KNX communication

This folder contains an solution for an interaction between AsTeRICS and a KNX installation.

This example contains the most important functions, like

  • Switching (On/Off)
  • Blinds (Up/Down)
  • Dimming (relative/absolute)

Prerequisites

You need at least

  1. Java Runtime Environment 8. Some plugins only work with a 32-bit JRE. You can have mixed installations of JREs/JDKs (32bit, 64bit). APE automatically prefers the 32-bit JDK/JRE on windows for the run targets. If you want to override this, set the property fx.platform.basedir in the file APE.properties to the path of your JDK/JRE. If you want to create deployment files (.exe, .deb,...), you must have installed additional dependencies like a JDK.
  2. apache ant build framework (version >= 1.9.1) or an IDE for Java Developers, e.g. Eclipse (already contains ant)
  3. AsTeRICS 3.0 installed or a snapshot of AsTeRICS cloned to a parallel folder of the project.
  4. A KNX system and a list of the group addresses.

Demos / Examples

You can check some demos and asterics solution example repositories.

Run project

Enter

ant run

to build all the dependencies and start the ARE.

You can also start the ARE using the ARE start-scripts in the build/merged/bin/ARE folder.

Build project

Open a console or use your favorite IDE and run

ant build-all

to build all the dependencies and merge all files together in the build/merged/bin/ARE folder

Release project

To create a native installer open a console and run

ant deploy

Please also check additional dependencies and usage examples.

Folder structure

Subsequently you can see the simplified folder structure of an APE-based project, which contains an ant build file (build.xml), a property-based configuration file (APE.properties), the custom/bin/ARE folder to store the solution-specific files (e.g. model files), a build folder and a package folder for native installer customization.

build
  |- merged
  |- deploy
custom
  |- bin/ARE
    |- data
    |- images
    |- LICENSE
    |- models
      |- <custom model file>.acs
      |- ...
    |-profile
package
  |- linux
  |- windows
  |- macosx
APE.properties
build.xml

How to use the repository

Put all your custom files (model files, images, config files,...) to the custom/bin/ARE folder.

In case you have a web UI put the files (.html, images, .css, .js,...) to the document root (custom/bin/ARE/web) of the built-in webserver. The webserver also provides a websocket. Finally the ARE provides a REST API that can be used within a web application.

Before the project can be run it must be built (automatically builds the AsTeRICS repository and copies/merges needed plugin jars and project files to the ```build/merged/bin/ARE`` folder). You can also directly run the ARE with the project's solution.

Recommended workflow

  1. Save custom files (models, images, config files,...) to the custom/bin/ARE folder or modify them
  2. Call ant run-quick (Only copies the files of the custom folder to the merged/bin/ARE folder but does no cleanup and no building of dependencies)
  3. In case you have a Web UI, open http://localhost:8081
  4. If you want to modify the running model, press 'F8' to open it in the WebACS, then modify and upload it. To save successful modifications permanently, save the model file to the custom/bin/ARE/models folder again.
  5. Kill program and go to step 1

Other ant targets

To see all supported targets, call

ant -projecthelp

Changing AsTeRICS snapshot (ARE) used

The property ARE.baseURI defines the location of the ARE used for the execution of the project.

APE automatically searches for an ARE at the following locations:

  1. dependencies/AsTeRICS/bin/ARE (if Asterics is added as submodule)
  2. ../AsTeRICS/bin/ARE (if it's an APE projectdir withouth FABI and FLipMouse folder structure)
  3. ../../AsTeRICS/bin/ARE (if it's an AT solution folder structure)
  4. C:/Program Files (x86)/AsTeRICS/ARE/ (if there is an Asterics installation on windows)

You can also set ARE.baseURI manually, either in the file APE.properties or within an ant call, e.g. ant -DARE.baseURI=<path to ARE> run

License

Dual license MIT or GPLv3 with CLASSPATH exception. Please read more in the license section of the wiki.

asterics-smarthome-knx's People

Contributors

deinhofer avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.