The Smathouse's File System
The File System has a hierarchical tree structure. Each node in the tree has a name, and contains data and a list of event handlers (Consumer functions).
Accessing nodes in the File System is done via a string path, like: stove.is_on
, billing.water
, and etc.
Event handlers subscribe on any path. When a new data is sent on that path, an event will be fired to all subscribers. For example, if an event handler subscribes on the path: system.internals
, they will be notified when ever new data is sent on that branch (paths of the form: system.internals.*
).
The File System is heavily integrated to the sensors communication component of the system.
The sensors' hardware sends <path, data> messages to the system. Then, the sensors' local server sends the given data on the File System. All event handlers will be notified, including the applications that are listening on these paths with the SensorApi
or with the FileSystemService
.
When ever a system component decides to save the system image to the cloud or local database, it sends a message on the path: system.internals.saveme
. The SystemCore
always listens on this path, and when the event occurs, it saves the system's image.
Parts of the File System are saved to the cloud. When the house loads, it can add entries to its File System form the loaded system image. This feature is especially used by the applications. Applications can read and write private data to the File System. Each application gets a separate entry, and they have no way of accessing other applications' saved data.
Overview
Quick Start
Smarthouse Usage for Owners
Development Manuals
Continuous Development
Misc.