Skip to content

Commit 69a7d15

Browse files
authored
Merge pull request #171 from PiBrewing/development
Merge from Development branch
2 parents cbc23cf + c1bd64f commit 69a7d15

40 files changed

Lines changed: 879 additions & 131 deletions

.devcontainer/Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
1-
FROM mcr.microsoft.com/vscode/devcontainers/python:3.11-bookworm
1+
FROM mcr.microsoft.com/vscode/devcontainers/python:3.13-trixie
22

33
RUN apt-get update \
44
&& apt-get upgrade -y
55
RUN apt-get install --no-install-recommends -y \
6-
libatlas-base-dev \
76
libsystemd-dev \
87
libffi-dev \
98
python3-pip \

CHANGELOG.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,25 @@
11
# Changelog
22

3+
## Server Version 4.7.0 (23.11.25):
4+
### Codename: Winter Bock
5+
6+
### Maintenance:
7+
- Update required packages to latest versions.
8+
- Update dockerfile requirements.
9+
- adapt deprecated get_event_loops
10+
11+
### Fixes:
12+
- Fix error handling for local recipe file loading.
13+
- Catch empty MQTT values (Error handling).
14+
- Change rights of log file if file is not accessible.
15+
16+
### Features:
17+
- Add Chromium autostart feature for trixie os
18+
- Add function to transfer free memory value to GUI as well as minimum memory config parameter to reload browser page if memory becomes lower.
19+
- Use output value as alternative (Alternative actor plugin required to ensure higher resolution) instead of power (0-100%).
20+
- Add optional actor to boilstep for steam condensor or solenoid valve
21+
322
## Server Version 4.6.1 (16.04.25):
4-
### Codename: Hop Master
523

624
### Fixes:
725
- Restore Config via raspberryPi did not work. Fix in system controller to check as well for 'application/zip' content type (Issue #162) (4.6.1.a1)

Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,12 @@ RUN apk --no-cache add curl && mkdir /downloads
33
# Download installation files
44
RUN curl https://github.com/PiBrewing/craftbeerpi4-ui/archive/main.zip -L -o ./downloads/cbpi-ui.zip
55

6-
FROM python:3.10 as base
6+
FROM python:3.13 as base
77

88
# Install dependencies
99
RUN apt-get update \
1010
&& apt-get upgrade -y
1111
RUN apt-get install --no-install-recommends -y \
12-
libatlas-base-dev \
1312
libsystemd-dev \
1413
libffi-dev \
1514
python3-pip \

cbpi/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
__version__ = "4.6.1"
2-
__codename__ = "Hop Master"
1+
__version__ = "4.7.0"
2+
__codename__ = "Winter Bock"

cbpi/api/actor.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ def __init__(self, cbpi, id, props):
2121
self.state = False
2222
self.running = False
2323
self.power = 100
24+
self.output = 100
25+
self.maxoutput = 100
2426
self.timer = 0
2527

2628
def init(self):
@@ -71,7 +73,7 @@ async def add_config_value(
7173
):
7274
await self.cbpi.add(name, value, type, description, options=None)
7375

74-
async def on(self, power):
76+
async def on(self, power, output=None):
7577
"""
7678
Code to switch the actor on. Power is provided as integer value
7779
@@ -96,3 +98,12 @@ async def set_power(self, power):
9698
"""
9799
return dict(power=self.power)
98100
pass
101+
102+
async def set_output(self, output):
103+
"""
104+
Code to set power for actor
105+
106+
:return: dict power
107+
"""
108+
return dict(output=self.output)
109+
pass

cbpi/api/base.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ def get_actor_state(self, id):
6767
logging.error("Failed to read actor state in step - actor {}".format(id))
6868
return False
6969

70-
async def actor_on(self, id, power=100):
70+
async def actor_on(self, id, power=100, output=None):
7171

7272
try:
73-
await self.cbpi.actor.on(id, power)
73+
await self.cbpi.actor.on(id, power, output)
7474
except Exception as e:
7575
pass
7676

@@ -85,3 +85,9 @@ async def actor_set_power(self, id, power):
8585
await self.cbpi.actor.set_power(id, power)
8686
except Exception as e:
8787
pass
88+
89+
async def actor_set_output(self, id, output):
90+
try:
91+
await self.cbpi.actor.set_output(id, output)
92+
except Exception as e:
93+
pass

cbpi/api/dataclasses.py

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from cbpi.api.step import StepState
77

88

9+
910
class Props:
1011

1112
def __init__(self, data={}):
@@ -58,13 +59,22 @@ class Actor:
5859
props: Props = Props()
5960
state: bool = False
6061
power: int = 100
62+
maxoutput: int = 100
63+
output: int = maxoutput
6164
timer: int = 0
6265
type: str = None
6366
instance: str = None
6467

6568
def __str__(self):
66-
return "name={} props={}, state={}, type={}, power={}, timer={}".format(
67-
self.name, self.props, self.state, self.type, self.power, self.timer
69+
return "name={} props={}, state={}, type={}, power={}, output={}, maxoutput={}, timer={}".format(
70+
self.name,
71+
self.props,
72+
self.state,
73+
self.type,
74+
self.power,
75+
self.output,
76+
self.maxoutput,
77+
self.timer,
6878
)
6979

7080
def to_dict(self):
@@ -81,6 +91,8 @@ def to_dict(self):
8191
props=self.props.to_dict(),
8292
state=state,
8393
power=self.power,
94+
output=self.output,
95+
maxoutput=self.maxoutput,
8496
timer=self.timer,
8597
)
8698

cbpi/api/property.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,16 +11,18 @@ class Select(PropertyType):
1111
Select Property. The user can select value from list set as options parameter
1212
"""
1313

14-
def __init__(self, label, options, description=""):
14+
def __init__(self, label, options, default_value=None, description=""):
1515
"""
1616
1717
:param label:
1818
:param options:
19+
:param default_value:
1920
:param description:
2021
"""
2122
PropertyType.__init__(self)
2223
self.label = label
2324
self.options = options
25+
self.default_value = default_value
2426
self.description = description
2527

2628
class Number(PropertyType):

0 commit comments

Comments
 (0)