This platform enables means for (i) automated binding of IoT devices in order to access their sensors and actuators, and (ii) automated software provisioning.
see User Manual
A REST API for the management of devices, sensors and actuators is provided.
POST /api/devices/ HTTP/1.1
Content-Type: application/json
{
"name": "Raspberry Pi",
"macAddress": "123456789067",
"ipAddress": "192.168.0.34",
"formattedMacAddress": "12-34-56-78-90-67"
}
HTTP/1.1 201 Created
GET /api/devices/ HTTP/1.1
HTTP/1.1 200 OK
[
{
"macAddress": "123456789067",
"ipAddress": "192.168.0.34",
"name": "Raspberry Pi",
"id": "596c7a7d4f0c58688e5aa6b1",
"date": null,
}, ...
]
GET /api/devices/596c7a7d4f0c58688e5aa6b1 HTTP/1.1
HTTP/1.1 200 OK
{
"macAddress": "123456789067",
"ipAddress": "192.168.0.34",
"name": "Raspberry Pi",
"id": "596c7a7d4f0c58688e5aa6b1",
"date": null,
}
PUT /api/devices/596c7a7d4f0c58688e5aa6b1 HTTP/1.1
{
"name": "Raspberry Pi",
"macAddress": "127556789067",
"ipAddress": "192.168.0.75",
"formattedMacAddress": "12-75-56-78-90-67"
}
HTTP/1.1 204 No Content
DELETE /api/devices/596c7a7d4f0c58688e5aa6b1 HTTP/1.1
HTTP/1.1 204 No Content
An adapter is the required software (e.g., python script) to bind sensors and actuators to the MBP.
POST /api/types/ HTTP/1.1
Content-Type: application/json
{
"name": "TemperatureSensorAdapter",
"description": "An adapter for the LK temperature sensor",
"service": {
"name": "service-stub.conf",
"content": "stub conf"
},
"routines": [{
"name": "service-stub.py",
"content": "service code"
}]
}
HTTP/1.1 201 Created
GET /api/types/ HTTP/1.1
HTTP/1.1 200 OK
[
{
"name": "TemperatureSensorAdapter",
"id": "596c7c344f0c58688e5aa6b3",
"description": "An adapter for the LK temperature sensor"
}, ...
]
GET /api/types/596c7c344f0c58688e5aa6b3 HTTP/1.1
HTTP/1.1 200 OK
{
"name": "TemperatureSensorAdapter",
"id": "596c7c344f0c58688e5aa6b3",
"description": "An adapter for the LK temperature sensor"
}
PUT /api/types/596c7c344f0c58688e5aa6b3 HTTP/1.1
{
"name": "TemperatureSensorAdapter",
"description": "An adapter for the LK temperature sensor",
"service": {
"name": "service-stub.conf",
"content": "..."
},
"routines": [{
"name": "service-stub.py",
"content": "..."
}]
}
HTTP/1.1 204 No Content
DELETE /api/types/596c7c344f0c58688e5aa6b3 HTTP/1.1
HTTP/1.1 204 No Content
POST /api/sensors/ HTTP/1.1
Content-Type: application/json
{
"name": "Temperature Sensor",
"type": "<URL>/api/types/596c7c344f0c58688e5aa6b3",
"device": "<URL>/api/devices/596c7a7d4f0c58688e5aa6b1",
}
HTTP/1.1 201 Created
GET /api/sensors/ HTTP/1.1
HTTP/1.1 200 OK
[
{
"id": "596c7a974f0c58688e5aa6b2",
"name": "test_sensor",
"_embedded": {
"device": {
"macAddress": "111111111111",
"ipAddress": null,
"name": "Test_Device",
"id": "596c7a7d4f0c58688e5aa6b1",
"date": null
}
}
}, ...
]
GET /api/sensors/596c7a974f0c58688e5aa6b2 HTTP/1.1
HTTP/1.1 200 OK
{
"id": "596c7a974f0c58688e5aa6b2",
"name": "test_sensor",
"_embedded": {
"device": {
"macAddress": "111111111111",
"ipAddress": null,
"name": "Test_Device",
"id": "596c7a7d4f0c58688e5aa6b1",
"date": null
}
}
}
PUT /api/sensors/596c7a974f0c58688e5aa6b2 HTTP/1.1
{
"name": "Temperature Sensor",
"type": "<URL>/api/types/596c7c344f0c58688e5aa6b3",
"device": "<URL>/api/devices/596c7a7d4f0c58688e5aa6b1",
}
HTTP/1.1 204 No Content
DELETE /api/sensors/596c7a974f0c58688e5aa6b2 HTTP/1.1
HTTP/1.1 204 No Content
see REST calls for sensors, replace /sensors with /actuators
-
Java Projects (contains both web and the old base project that implemented the services)
-
Python Scripts (contains all python services and sensor scripts)
-
RSA Key (key that should be installed in each RPi in order to use SSH access)
-
Diagram (domain diagram for the java project)
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
(server machine)Python 3.5.1 :: Anaconda 4.0.0 (64-bit)
(server machine)Raspbian version here
(Raspberry Pi 3) (client machine)RPi python version here
(client machine)
mongoDB server on server machine
Install the server. To start the server, run ./Server/version/bin/mongod.exe inside the mongoDB installation directory. Version:
db version v3.2.7
git version: 4249c1d2b5999ebbf1fdf3bc0e0e3b3ff5c0aaf2
OpenSSL version: OpenSSL 1.0.1p-fips 9 Jul 2015
allocator: tcmalloc
modules: none
build environment:
distmod: 2008plus-ssl
distarch: x86_64
target_arch: x86_64
Mosquitto MQTT Broker on server machine
Download and install the server. It should start on its own.
Version: mosquitto version 1.4.8 (build date 14/02/2016 15:33:31.09)
Run sudo apt-get install upstart
, reboot after installation.
This is used to set up services on the system.
To set a service (%name% stands for any name):
- create a
%name%.conf
file in/etc/init
- run
sudo initctl reload-configuration
- run
sudo service %name% start
WinPCap on server machine (Windows only - not needed on Linux dists)
Compliments Scapy library.
On the client machine, run:
mkdir ~/.ssh
chmod 700 ~/.ssh
and then copy the public key found in rsa to ~./ssh.