House automation side services.
This repository has been archived because this source code has moved to its mother project
Part of the Angharad system, but you can use it as a standlone program.
Provides the context execution for carleon services.
Carleon implements an interface to control multiple types of house automation services (camera, music, etc.). To add a new service, you have to create a library with the proper functions, then place the library in the folder specified by modules_path
in your configuration file, then restart the program.
Check Carleon services modules How-To for more information on how to build a service.
On Debian-based systems (Debian, Raspbian, Ubuntu), use the following comand to install dependencies:
sudo apt-get install libmicrohttpd-dev libjansson-dev libcurl4-gnutls-dev libmysqlclient-dev libsqlite3-dev libconfig-dev
git clone https://github.com/babelouest/orcania.git
cd orcania
make
sudo make install
git clone https://github.com/babelouest/yder.git
cd yder/src
make
sudo make install
git clone https://github.com/babelouest/ulfius.git
cd ulfius/src
make
sudo make install
git clone https://github.com/babelouest/hoel.git
cd hoel/src
make
sudo make install
You need gcc and Make to compile the program.
External libraries are mandatory to compile Benoic:
- libconfig, Configuration File Library
- jansson, json manipulation library
- libmicrohttpd, HTTP server library
- libcurl, HTTP client library
- MySQL client API, MySQL/MariaDB API
- SQLite3, SQLite API
Also, Benoic is based on Angharad libraries to work:
- Orcania, Potluck with different functions for different purposes that can be shared among angharad programs
- Yder, Logging library
- Ulfius, Web Framework for REST Applications
- Hoel, Database abstraction library
When all prerequisites are installed, clone carleon from github:
git clone https://github.com/babelouest/carleon.git
cd carleon
make release-standalone
Go to Carleon services directory, then compile the services you need.
cd service-modules
make libservicemotion.so libservicempd.so
Go back to carleon source folder, then as root, run make install
:
cd carleon
sudo make install
Depending on your needs, you can use a sqlite3 database (single file, fast and reliable) or a MySQL Database (fast and reliable as well but also more secure).
Run the SQL script carleon.mariadb.sql file under an already existing database.
mysql < carleon.mariadb.sql
Run the SQL script carleon.sqlite3.sql file in an existing or a new SQLite3 database file:
sqlite3 carleon.db < carleon.sqlite3.sql
The file carleon.conf.sample contains a sample file with all the configuration parameters needed, just fill the parameters with your own environment. Paths can be relatives or absolute.
Copy carleon.conf.sample
into your configuration folder as carleon.conf
cp carleon.conf.sample /usr/local/etc/carleon.conf
To run carleon, simply execute the command:
/usr/local/bin/carleon --config-file=/usr/local/etc/carleon.conf
Check the log messages in the log file, syslog or the console, depending on your configuration, then the server will be up and running when you'll se the following log message:
yyyy-mm-dd hh:mm:ss - Carleon INFO: Start carleon on port 2756
The full API Documentation can be found in the file API.md
: