소스 검색

Merge pull request #8 from Manuel83/master

Update 9/6/17
pull/206/head
swimIan GitHub 8 년 전
부모
커밋
14e4e6d61a
6개의 변경된 파일52개의 추가작업 그리고 48개의 파일을 삭제
  1. +3
    -1
      modules/__init__.py
  2. +2
    -3
      modules/addon/endpoints.py
  3. +1
    -0
      modules/base_plugins/one_wire/__init__.py
  4. +3
    -3
      modules/core/core.py
  5. +2
    -1
      modules/core/props.py
  6. +41
    -40
      modules/ui/static/bundle.js

+ 3
- 1
modules/__init__.py 파일 보기

@@ -29,7 +29,7 @@ import modules.sensors
import modules.actor
import modules.notification
import modules.fermenter
import modules.addon
from modules.addon.endpoints import initPlugins
import modules.ui
import modules.system
import modules.buzzer
@@ -37,6 +37,7 @@ import modules.stats
import modules.kettle
import modules.recipe_import
import modules.core.db_mirgrate
from app_config import cbpi
# Build the database:
# This will create the database file using SQLAlchemy
@@ -59,6 +60,7 @@ def init_db():
pass
init_db()
initPlugins()
cbpi.run_init()
cbpi.run_background_processes()


+ 2
- 3
modules/addon/endpoints.py 파일 보기

@@ -188,9 +188,8 @@ def loadPlugins():
cbpi.notify("Failed to load plugin %s " % filename, str(e), type="danger", timeout=None)
cbpi.app.logger.error(e)

@cbpi.initalizer(order=1)
def initPlugins(app):

#@cbpi.initalizer(order=1)
def initPlugins():
loadCorePlugins()
loadPlugins()



+ 1
- 0
modules/base_plugins/one_wire/__init__.py 파일 보기

@@ -18,6 +18,7 @@ def getSensors():
arr = []
for dirname in os.listdir('/sys/bus/w1/devices'):
if (dirname.startswith("28") or dirname.startswith("10")):
cbpi.app.logger.info("Device %s Found (Family: 28/10, Thermometer on GPIO4 (w1))" % dirname)
arr.append(dirname)
return arr
except:


+ 3
- 3
modules/core/core.py 파일 보기

@@ -274,11 +274,11 @@ class CraftBeerPi(ActorAPI, SensorAPI):
if isinstance(tmpObj.__getattribute__(m), Property.Number):
t = tmpObj.__getattribute__(m)
self.cache[key][name]["properties"].append(
{"name": m, "label": t.label, "type": "number", "configurable": t.configurable, "description": t.description})
{"name": m, "label": t.label, "type": "number", "configurable": t.configurable, "description": t.description, "default_value": t.default_value})
elif isinstance(tmpObj.__getattribute__(m), Property.Text):
t = tmpObj.__getattribute__(m)
self.cache[key][name]["properties"].append(
{"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "description": t.description})
{"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "default_value": t.default_value, "description": t.description})
elif isinstance(tmpObj.__getattribute__(m), Property.Select):
t = tmpObj.__getattribute__(m)
self.cache[key][name]["properties"].append(
@@ -356,7 +356,7 @@ class CraftBeerPi(ActorAPI, SensorAPI):
self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "number", "configurable": t.configurable, "default_value": t.default_value, "description": t.description})
elif isinstance(tmpObj.__getattribute__(m), StepProperty.Text):
t = tmpObj.__getattribute__(m)
self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "description": t.description})
self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "text", "configurable": t.configurable, "default_value": t.default_value, "description": t.description})
elif isinstance(tmpObj.__getattribute__(m), StepProperty.Select):
t = tmpObj.__getattribute__(m)
self.cache[key][name]["properties"].append({"name": m, "label": t.label, "type": "select", "configurable": True, "options": t.options, "description": t.description})


+ 2
- 1
modules/core/props.py 파일 보기

@@ -22,6 +22,7 @@ class Property(object):
PropertyType.__init__(self)
self.label = label
self.configurable = configurable
self.default_value = default_value
self.description = description

class Actor(PropertyType):
@@ -64,4 +65,4 @@ class StepProperty(Property):
PropertyType.__init__(self)
self.label = label
self.configurable = True
self.description = description
self.description = description

+ 41
- 40
modules/ui/static/bundle.js
파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
파일 보기


불러오는 중...
취소
저장