13. Libraries and tools: IoT Apps (based on node red)
IoT Apps
App1 App2
App3 App4
App runtime
Runtime impl.
• redzilla: A node-red as-a-service instance launcher supporting custom authentication and
instance management api https://github.com/muka/redzilla
Developed by CREATE-NET for a previous project. Manage node-red instances in docker
containers and offers a convenient HTTP API.
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
22. Discovery UI Discovery API BLE adapter Device Management
Search
scan()
1. Discover devices
2. check is new
3. sync device info
isRegistered()
updateDevice()
{device list}
Display
Pair(dev ID)
connect (dev ID)
pair ()
Enter PIN
OK
Device
connected
BLE
Discovery
BLE
Pairing
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
39. 1) GW manages object and services as
Object with methods and properties (as
per DBus specs)
2) Client issue a request to a structured
endpoint. Eg
GET /device/fridge1/temperature?unit=C
3) Restful HTTP API route request and
params calling the managed object
4) Response is delivered. Eg. -4
Restful API methods map to GW managed objects / services
Callable methods of abstract objects allows to interact with GW
managed devices. Example: A fridge device instance
Questions and doubts (1): Restful HTTP API example
{
name: “fridge1”,
int temperature(string unit)
void setPower(bool on)
}
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
40. 1)
2) Client register on broker topic(s) to
receive updates for a device or device
property
http.POST /fridge1/subscribe/temperature
mqtt.subscription >> /fridge1/temperature
3) Bridge receive properties updates from
objects
4) Client get updated of the updated value(s)
mqtt.subscription << -8
Questions and doubts (1): Broker example
{
name: “fridge1”,
onChange(temperature)
}
DBus supports DBus.Properties to receive asyncronous updates on
properties
Broker topic can be per property or object wise to group messages
Register to DBus PropertiesChanged for property (one or more) and
publish once updates flows
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
43. Low level bus
• DBus is available in most linux distribution (within systemd) with kernel services
exposed (NetworkManager, Bluez, PowerManager, PolicyKit).
• Allows for GW internal service abstraction and interaction.
SDK example
• A java based class set to interact with “object proxies” (our APIs) like Device
Communication, Device Management or Storage.
• A use case may be to have an OSGI module to map Kura GPIO component to the
Device Communication API of AGILE and have it exposed to other GW components
Questions and doubts (2): Low level Bus and SDK
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR
45. Low level bus
• UI is a webapp composed of static resources (js,html) and an API
• Connection to internal GW events happens via the internal APIs and dedicated plugin
hooks
• UIs will be composed of interfaces structured as parent container where pluggable
child UIs will be attached.
Examples:
• A Control Panel allows to “attach” extensions like NetworkManager or User
Management
• A Data visualization interface allow to inject data visualization subcomponent
based on data type or source
Questions and doubts (3): Low Level Bus & UIs
AGILE PLENARY MEETING, 14-15 April 2016, Athens, GR