☀️ t6 is an "oriented-Data" platform to connect physical Objects with timeseries DB.
JavaScript CSS HTML C++ Lua Shell C
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.settings
bin
data
docs
etc/init.d
public
routes
sensors Basic Gps sensor May 24, 2018
serializers
sessions
test
views
.gitignore
.snyk
CONTRIBUTING.md
LICENSE
README.md
ROADMAP.md
app.js
events.js
package.json

README.md

t6

t6 is an "oriented-Data" platform to connect physical Objects with timeseries DB. Please referes to CONTRIBUTING.md in case you would like to help :-)

Structure & Context

Physical World

Physical World are composed by your sensors and actuators. Physical Objects require a virtual Object in t6 and then, they could add Data to Flows. Sample nodeMCU and Arduino scripts are available in the sensors repositories.

Application & Dashboard Screenshots

t6 screenshot t6 screenshot t6 screenshot t6 screenshot

Physical Objects require a virtual Object in t6 and then, they could add Data to Flows.

t6 API first: Live, eat, and breathe the API-first lifestyle of t6.

Detailed Api documentation is available here: api-General.

Mqtt rules to handle Actions

Rules

"Decision-Rule" engine is not yet pushed to github. But a working stable implementation is working at home since several months. To sum up, events are pushed as json payloads to mqtt topics. Then the engine is watching for these payloads and handle them according to specific rules. #### Actions Actions are triggered when something is happening on the t6 platform. Actions can be: email, SMS, API calls (e.g. twitter), etc ...

t6 Installation

Install node (if needed): https://nodejs.org/en/
Install npm (if needed): https://github.com/npm/npm

Do not use sudo/root to install t6, this is not necessary and not recommended

git clone https://github.com/mathcoll/t6.git ./t6 & cd ./t6
npm install
rename "settings-hostname.js" according to your server _hostname_ and edit the file.
rename "rules-hostname.js" according to your server _hostname_.
rename "sensors-hostname.js" according to your server _hostname_.
rename "db-hostname.json" according to your server _hostname_.

On linux, to identify your hostname, you can run the following command:

hostname

Please have a look at the options in settings-hostname.js, there are some secrets to be customized.

Once the setting are done, you can initialize the influxDb databases:

CREATE DATABASE "t6"
CREATE DATABASE "requests" WITH DURATION 7d REPLICATION 1 SHARD DURATION 1d NAME "req"
CREATE RETENTION POLICY "quota7d" on "t6" DURATION 7d REPLICATION 1 SHARD DURATION 1d

You can add the server running as a service, tested with Ubuntu and Debian:

  • First: install the server in services:
sudo ln -s /var/www/t6/etc/init.d/t6 /etc/init.d/t6

And then, start t6 using:

sudo /etc/init.d/t6 (re)start|stop|status
  • Then, set the server to run at start:
sudo update-rc.d t6 defaults

t6 Troobleshooting after installation

Q: sudo /etc/init.d/t6 start does not return any output, what should I do?

A: Try to set chmod +x to file /var/www/t6/bin/www

Q: Do I need to install sqlite3?

A: sqlite3 is not required and can be disabled in the settings. sqlite3 library to store data is not maintained and become obsolete.

Q: I got an error trying to install sqlite3, what should I do?

A: Ubuntu and Debian usually have a dedicated nodejs version, try removing "node" and install sudo apt-get install nodejs-legacy instead, then sudo npm install sqlite3@3.0.5.