Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Current »

The IzoT REST API Server is a Python-based REST API Server based on Django and the Django REST Framework. It is configured using the standard Django configuration file mechanism in files under $IZOT/izot/server/project/settings. Default settings are stored in default.py. Local settings are stored in local.py, if it exists (copy example.py to create a new local settings file).

Most of the IzoT Server specific settings are specified under the IZOT section:

# IzoT Server configuration settings 
IZOT = {     
	# A (named) collection of IzoT Server Collectors that will     
	# be started to collect and update devices and datapoints.     
	# Names must be no longer than 30 characters and consist only of     
	# letters, numbers, underscores or hyphens.     
	'COLLECTORS': {         
		# NOTE: add additional collectors in "settings/local.py"                  
	
		# local LonBridge Server collector         
		'lonbridge': {             
			'class': 'collectors.lonbridge.LonBridgeCollector',             
			'args': {                 
				'host': 'localhost',                 
				'port': 3050             
			}         
		},                  

		# localhost collector             
		'localhost': {             
			'class': 'collectors.localhost.LocalhostCollector',             
			'args': {                 
				'poll': 10             
			}         
		}     
	},                         
	
	# A (named) collection of IzoT Server Publishers that will     
	# be started to publish datapoint updates.     
	'PUBLISHERS': {         
		# NOTE: add additional publishers in "settings/local.py"     
	},                         

	# A (named) collection of IzoT Server Subscribers that will     
	# be started to subscribe to device commands and datapoint updates.     
	'SUBSCRIBERS': {         
		# NOTE: add additional subscribers in "settings/local.py"     
	}, 
}

where​

SettingDescription
COLLECTORSIzoT Collectors are 'plug-in' components used to extend the IzoT Server to provide datapoint collectors. Two standard collectors are supplied by default: LonBridgeCollector collects datapoints from the IzoT Network Server (LonBridge); LocalhostCollector collects CPU, Disk and Memory usage datapoints from the local host. Custom collectors can be created and added to the local settings file (see example.py).

The supplied IzoT Collectors (including a sample MQTT collector) are located in the izot.server.collectors package.
PUBLISHERSIzoT Publishers are 'plug-in' components used to extend the IzoT Server to provide external datapoint publishers (e.g., to a cloud service). By default, there are no standard publishers (the only way to monitor datapoints is via the REST API). Custom publishers can be created and added to the local settings file (see example.py).

The supplied IzoT Publishers (including sample publishers for MQTT, SeeControl's Nexus Cloud service, InSync's SensorNet Cloud service, and Xively's Cloud service) are located in the izot.server.publishers package.
SUBSCRIBERSIzoT Subscribers are 'plug-in' components used to extend the IzoT Server to provide external datapoint subscribers. By default, there are no standard subscribers (the only way to control datapoints is via the REST API). Custom subscribers can be created and added to the local settings file (see example.py).

The supplied IzoT Subscribers (including a sample subscriber for SeeControl's Nexus Cloud service) are located in the izot.server.subscribers package.
classAll plug-ins are defined by specifying (a unique name and) the module's fullname.
argsA dictionary of custom arguments to configure the plug-in. See the appropriate plug-in source file for a description of valid custom arguments.

For further details on these and other settings, see the source for the individual plug-ins and the Django and Django REST Framework documentation.

  • No labels