from flask_sqlalchemy import SQLAlchemy
-sys.path.append('..')
+app_path = os.path.dirname(os.path.realpath(__file__))
+lib_path = os.path.join(cur_path, '..')
+sys.path.append(lib_path)
from seeparklib.openweathermap import openweathermap_json, OpenWeatherMapError
config.read(os.environ['SEEPARKINI'])
apikey = config.get('openweathermap', 'apikey')
cityid = config.get('openweathermap', 'cityid')
+mainsensor = config.get('temperature', 'mainsensor')
app = Flask(__name__)
app.json_encoder = JSONEncoder
@app.route("/")
def index():
airvalue, airtime = currentairtemperature(apikey, cityid)
- watervalue, watertime = currentwatertemperature('0316a21383ff') # config? mainwatertemp?
+ watervalue, watertime = currentwatertemperature(mainsensor)
return render_template(
'seepark_web.html',