mirror of
https://github.com/Manuel83/craftbeerpi3
synced 2026-08-09 18:52:40 +02:00
tool tip for config properties
This commit is contained in:
@@ -14,9 +14,9 @@ class MashStep(StepBase):
|
||||
Just put the decorator @cbpi.step on top of a method
|
||||
'''
|
||||
# Properties
|
||||
temp = Property.Number("Temperature", configurable=True)
|
||||
kettle = StepProperty.Kettle("Kettle")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True)
|
||||
temp = Property.Number("Temperature", configurable=True, description="Target Temperature of Mash Step")
|
||||
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, description="Timer is started when the target temperature is reached")
|
||||
|
||||
def init(self):
|
||||
'''
|
||||
@@ -66,8 +66,8 @@ class MashInStep(StepBase):
|
||||
Just put the decorator @cbpi.step on top of a method
|
||||
'''
|
||||
# Properties
|
||||
temp = Property.Number("Temperature", configurable=True)
|
||||
kettle = StepProperty.Kettle("Kettle")
|
||||
temp = Property.Number("Temperature", configurable=True, description="Target Temperature of Mash Step")
|
||||
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the mashing takes place")
|
||||
s = False
|
||||
|
||||
@cbpi.action("Change Power")
|
||||
@@ -101,7 +101,7 @@ class MashInStep(StepBase):
|
||||
@cbpi.step
|
||||
class ChilStep(StepBase):
|
||||
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0)
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately")
|
||||
|
||||
@cbpi.action("Stat Timer")
|
||||
def start(self):
|
||||
@@ -125,8 +125,8 @@ class ChilStep(StepBase):
|
||||
@cbpi.step
|
||||
class PumpStep(StepBase):
|
||||
|
||||
pump = StepProperty.Actor("Pump")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0)
|
||||
pump = StepProperty.Actor("Pump", description="Pump actor gets toogled")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=0, description="Timer is started immediately")
|
||||
|
||||
@cbpi.action("Stat Timer")
|
||||
def start(self):
|
||||
@@ -156,16 +156,15 @@ class BoilStep(StepBase):
|
||||
Just put the decorator @cbpi.step on top of a method
|
||||
'''
|
||||
# Properties
|
||||
temp = Property.Number("Temperature", configurable=True, default_value=100)
|
||||
kettle = StepProperty.Kettle("Kettle")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=90)
|
||||
hop_1 = Property.Number("Hop 1 Addition", configurable=True)
|
||||
temp = Property.Number("Temperature", configurable=True, default_value=100, description="Target temperature for boiling")
|
||||
kettle = StepProperty.Kettle("Kettle", description="Kettle in which the boiling step takes place")
|
||||
timer = Property.Number("Timer in Minutes", configurable=True, default_value=90, description="Timer is started when target temperature is reached")
|
||||
hop_1 = Property.Number("Hop 1 Addition", configurable=True, description="Fist Hop alert")
|
||||
hop_1_added = Property.Number("",default_value=None)
|
||||
|
||||
hop_2 = Property.Number("Hop 2 Addition", configurable=True)
|
||||
hop_2 = Property.Number("Hop 2 Addition", configurable=True, description="Second Hop alert")
|
||||
hop_2_added = Property.Number("", default_value=None)
|
||||
hop_3 = Property.Number("Hop 3 Addition", configurable=True)
|
||||
hop_3_added = Property.Number("", default_value=None)
|
||||
hop_3_added = Property.Number("", default_value=None, description="Second Hop alert")
|
||||
|
||||
def init(self):
|
||||
'''
|
||||
|
||||
@@ -11,7 +11,12 @@ from modules.core.props import Property
|
||||
@cbpi.sensor
|
||||
class DummyTempSensor(SensorActive):
|
||||
|
||||
temp = Property.Number("Temperature", configurable=True, default_value=5)
|
||||
temp = Property.Number("Temperature", configurable=True, default_value=5, description="Dummy Temperature as decimal value")
|
||||
|
||||
@cbpi.action("My Custom Action")
|
||||
def my_action(self):
|
||||
print "HELLO WORLD"
|
||||
pass
|
||||
|
||||
def get_unit(self):
|
||||
'''
|
||||
@@ -29,7 +34,7 @@ class DummyTempSensor(SensorActive):
|
||||
'''
|
||||
while self.is_running() is True:
|
||||
self.data_received(self.temp)
|
||||
socketio.sleep(5)
|
||||
self.sleep(5)
|
||||
|
||||
@classmethod
|
||||
def init_global(cls):
|
||||
|
||||
@@ -6,10 +6,10 @@ from modules.core.props import Property
|
||||
@cbpi.fermentation_controller
|
||||
class Hysteresis(FermenterController):
|
||||
|
||||
heater_offset_min = Property.Number("Heater Offset ON", True, 0)
|
||||
heater_offset_max = Property.Number("Heater Offset OFF", True, 0)
|
||||
cooler_offset_min = Property.Number("Cooler Offset ON", True, 0)
|
||||
cooler_offset_max = Property.Number("Cooler Offset OFF", True, 0)
|
||||
heater_offset_min = Property.Number("Heater Offset ON", True, 0, description="Offset as decimal number when the heater is switched on. Should be geather then 'Heater Offset OFF'. For example 2 means the heater will be switched on if the current temperature is 2 degrees above the target temperature")
|
||||
heater_offset_max = Property.Number("Heater Offset OFF", True, 0, description="Offset as decimal number when the heater is switched off. Should be smaller then 'Heater Offset ON'. For example 1 means the heater will be switched off if the current temperature is 1 degrees above the target temperature")
|
||||
cooler_offset_min = Property.Number("Cooler Offset ON", True, 0, description="Offset as decimal number when the cooler is switched on. Should be geather then 'Cooler Offset OFF'. For example 2 means the cooler will be switched on if the current temperature is 2 degrees below the target temperature")
|
||||
cooler_offset_max = Property.Number("Cooler Offset OFF", True, 0, description="Offset as decimal number when the cooler is switched off. Should be less then 'Cooler Offset ON'. For example 1 means the cooler will be switched off if the current temperature is 1 degrees below the target temperature")
|
||||
|
||||
def stop(self):
|
||||
super(FermenterController, self).stop()
|
||||
|
||||
@@ -18,7 +18,7 @@ except Exception as e:
|
||||
@cbpi.actor
|
||||
class GPIOSimple(ActorBase):
|
||||
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected")
|
||||
|
||||
def init(self):
|
||||
GPIO.setup(int(self.gpio), GPIO.OUT)
|
||||
@@ -35,7 +35,7 @@ class GPIOSimple(ActorBase):
|
||||
@cbpi.actor
|
||||
class GPIOPWM(ActorBase):
|
||||
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected")
|
||||
duty_cylce = Property.Number("Duty Cycle", configurable=True)
|
||||
|
||||
p = None
|
||||
@@ -74,7 +74,7 @@ class GPIOPWM(ActorBase):
|
||||
@cbpi.actor
|
||||
class RelayBoard(ActorBase):
|
||||
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27])
|
||||
gpio = Property.Select("GPIO", options=[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27], description="GPIO to which the actor is connected")
|
||||
|
||||
def init(self):
|
||||
GPIO.setup(int(self.gpio), GPIO.OUT)
|
||||
@@ -91,6 +91,7 @@ class RelayBoard(ActorBase):
|
||||
@cbpi.actor
|
||||
class Dummy(ActorBase):
|
||||
|
||||
|
||||
def on(self, power=100):
|
||||
'''
|
||||
Code to switch on the actor
|
||||
|
||||
@@ -8,8 +8,8 @@ class Hysteresis(KettleController):
|
||||
|
||||
# Custom Properties
|
||||
|
||||
on = Property.Number("Offset On", True, 0)
|
||||
off = Property.Number("Offset Off", True, 0)
|
||||
on = Property.Number("Offset On", True, 0, description="Offset below target temp when heater should switched on. Should be bigger then Offset Off")
|
||||
off = Property.Number("Offset Off", True, 0, description="Offset below target temp when heater should switched off. Should be smaller then Offset Off")
|
||||
|
||||
def stop(self):
|
||||
'''
|
||||
@@ -30,11 +30,9 @@ class Hysteresis(KettleController):
|
||||
'''
|
||||
while self.is_running():
|
||||
|
||||
self.actor_power(50)
|
||||
|
||||
if self.get_temp() < self.get_target_temp() - int(self.on):
|
||||
if self.get_temp() < self.get_target_temp() - float(self.on):
|
||||
self.heater_on(100)
|
||||
elif self.get_temp() >= self.get_target_temp() - int(self.off):
|
||||
elif self.get_temp() >= self.get_target_temp() - float(self.off):
|
||||
self.heater_off()
|
||||
else:
|
||||
self.heater_off()
|
||||
|
||||
@@ -66,8 +66,8 @@ class myThread (threading.Thread):
|
||||
@cbpi.sensor
|
||||
class ONE_WIRE_SENSOR(SensorPassive):
|
||||
|
||||
sensor_name = Property.Select("Sensor", getSensors())
|
||||
offset = Property.Number("Offset", True, 0)
|
||||
|
||||
offset = Property.Number("Offset", True, 0,description="Offset which is added to the received sensor data. positie and negatie values are possible" )
|
||||
|
||||
def init(self):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user