You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2.0 KiB

picc Tree

Data in picc is structured in a tree of paths, rooted at app.picc.<domain>, where <domain> uniquely identifies the server. It must be a series of strings composed of lower case letters, numbers and/or symbols - and _, separated by periods (.); in other words a hostname.

The same structure is used for the directory, where data can be queried, and the data streams, which are AMQP topics/routing keys for pub-sub access to the data.

Data Directory

The picc directory is key-value store where keys are picc paths and values are JSON documents. It serves both as a place for looking up system configuration and for latest values in the data streams.

System information is available under

app.picc.<domain>.sys.people.person_<id>

for information about people, and

app.picc.<domain>.sys.places.site_<id>.building_<id>.room_<id>

for information about the building.

Data stream values are available under the same paths they are using to publish to AMQP, see Data Streams.

Data Streams

Data streams are AMQP routing keys where drivers and entities publish their data.

Entity Tree

Like the system tree, the entity streams tree is divided into people streams

app.picc.<domain>.streams.people.person_<id>

and location streams

app.picc.<domain>.streams.places.site_<id>.building_<id>.room_<id>

These streams are publishing processed data and are meant for user consumption.

Device Tree

The device tree, like the entity tree, contains streams of data. In this case, the data is coming from devices in relatively raw form.

Leaves in the device tree are the basic building blocks of picc. They are AMQP topics where device drivers post data and accept commands. This data is meant to be processed by entities into user-friendly streams.

app.picc.<domain>.dev.lights.light_<id>.*

app.picc.<domain>.dev.sensors.sensor_<id>.*

app.picc.<domain>.dev.transformers.transformer_<id>