- Import KBH

- Import BeerXML
- Import REST API
- Migration DB
- Set Default Screen after Start
- Cleanup
This commit is contained in:
Manuel83
2017-07-02 23:52:18 +02:00
parent c2aa5d8141
commit 291f09dcd1
30 changed files with 6519 additions and 120 deletions
+5 -5
View File
@@ -13,26 +13,26 @@ class SensorView(BaseView):
cache_key = "sensors"
def post_post_callback(self, m):
def _post_post_callback(self, m):
cbpi.init_sensor(m.id)
def post_put_callback(self, m):
def _post_put_callback(self, m):
cbpi.stop_sensor(m.id)
cbpi.init_sensor(m.id)
def pre_delete_callback(self, m):
def _pre_delete_callback(self, m):
cbpi.stop_sensor(m.id)
@cbpi.initalizer(order=1000)
def init(cbpi):
print "INITIALIZE SENSOR MODULE"
SensorView.register(cbpi.app, route_base='/api/sensor')
SensorView.init_cache()
cbpi.init_sensors()
@cbpi.backgroundtask(key="read_passiv_sensor", interval=5)
def read_passive_sensor():
def read_passive_sensor(api):
"""
background process that reads all passive sensors in interval of 1 second
:return: None