In [1]:
import sys

In [5]:
sys.path.append("/root/git/SolarDataRESTfulAPI")

In [2]:
cd /root/git/SolarDataRESTfulAPI


/root/git/SolarDataRESTfulAPI

In [3]:
ls


cvs_importer.py       Feeds.json            InfluxDBInterface.pyc  influx.json    IoTtoolkit.pyc  README.md     testdata/    Universe.json
DataFeedUniverse.pyc  InfluxDBInterface.py  influxDBSolarREST.py   IoTtoolkit.py  LICENSE         SiteIDs.json  testREST.py

In [4]:
import IoTtoolkit
reload(IoTtoolkit)
import InfluxDBInterface
reload(InfluxDBInterface)
MyUniverse = IoTtoolkit.Universe()


---------------------------------------------------------------------------
KeyError                                  Traceback (most recent call last)
<ipython-input-4-401a0276a15c> in <module>()
      3 import InfluxDBInterface
      4 reload(InfluxDBInterface)
----> 5 MyUniverse = IoTtoolkit.Universe()

/root/git/SolarDataRESTfulAPI/IoTtoolkit.pyc in __init__(self, Defenition, AutoloadFeeds, Active)
     58 
     59     if self.DefDict["LTS TYPE"] == "InfluxDB":
---> 60       self.LTS = InfluxDBInterface(self.DefDict["LTS DATA"])
     61 
     62     if AutoloadFeeds == True:

/root/git/SolarDataRESTfulAPI/InfluxDBInterface.pyc in __init__(self, config_param)
     18     print self.config
     19 
---> 20     InfluxDBClient.__init__(self,self.config["host"], self.config["port"], self.config["user"], self.config["password"], self.config["database"])
     21 
     22   def GetLastTimeStamp(self,FluxId):

KeyError: 'database'
{u'databases': [u'by-id'], u'host': u'livinglab2.powerprojects.se', u'password': u'', u'port': 8086, u'user': u'uploader'}

In [33]:



---------------------------------------------------------------------------
NameError                                 Traceback (most recent call last)
<ipython-input-33-fd22257da65a> in <module>()
----> 1 MyUniverse = IoTtoolkit.Universe()

/root/git/SolarDataRESTfulAPI/IoTtoolkit.py in __init__(self, Defenition, AutoloadFeeds, Active)
     58 
     59     if self.DefDict["LTS TYPE"] == "InfluxDB":
---> 60       self.LTS = InfluxDBInterface(self.DefDict["LTS DATA"])
     61 
     62     if AutoloadFeeds == True:

/root/git/SolarDataRESTfulAPI/InfluxDBInterface.pyc in __init__(self, config_param)
      7   def __init__(self,config_param="influx.json"):
      8 
----> 9     if type(Defenition) == type(""):
     10       #Load database credentials from file
     11       fp = open(config_param,"r")

NameError: global name 'Defenition' is not defined

In [24]:
Defenition ="Universe.json"
File = open(Defenition,"r")