Utilities (utils package)

Python is an Object Orientated programing language and as such most of the core concepts in Little Sense are models as such. The “utils” package contains these objects Classes e.g. Dashboards and Devices. Much of the functionality is contained within these classes and is the best place to add new features which will then become avaiable system wide.


We advice great caution to novice developers, however do not be put off and breaking code like this is the best way to learn, but maybe keep a copy backed up just incase and document what you change.


get_InfluxDB() Get an instance of the InfluxDB database
influx_connected() Test connection to InfluxDB database


BackupManager() This class manages all thing relating to backups.
DashBoards() Dashboard Collection (Iterable)
Device(device_id, create_if_unknown) Individual Device
Devices() Devices Collection (Iterator)
Field(dtype, name, unit) .
FieldValue(field, value) Field Value
Logger() Custom logger with InfluxDB backend
Metric(device, field, aggregation_function) Data type for reading query metric.
Readings(readings, device_id, time_start, …) Datatype for returned readings from readings query
SerialLogger Log specifically designed for the serial data.
SerialTXQueue() An interface between the web UI and serial interface.