mirror of
https://github.com/PiBrewing/craftbeerpi4.git
synced 2024-11-25 00:18:17 +01:00
commit
80a1a2f6fb
10 changed files with 394 additions and 35 deletions
128
CODE_OF_CONDUCT.md
Normal file
128
CODE_OF_CONDUCT.md
Normal file
|
@ -0,0 +1,128 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our
|
||||
community a harassment-free experience for everyone, regardless of age, body
|
||||
size, visible or invisible disability, ethnicity, sex characteristics, gender
|
||||
identity and expression, level of experience, education, socio-economic status,
|
||||
nationality, personal appearance, race, religion, or sexual identity
|
||||
and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming,
|
||||
diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our
|
||||
community include:
|
||||
|
||||
* Demonstrating empathy and kindness toward other people
|
||||
* Being respectful of differing opinions, viewpoints, and experiences
|
||||
* Giving and gracefully accepting constructive feedback
|
||||
* Accepting responsibility and apologizing to those affected by our mistakes,
|
||||
and learning from the experience
|
||||
* Focusing on what is best not just for us as individuals, but for the
|
||||
overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
* The use of sexualized language or imagery, and sexual attention or
|
||||
advances of any kind
|
||||
* Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
* Public or private harassment
|
||||
* Publishing others' private information, such as a physical or email
|
||||
address, without their explicit permission
|
||||
* Other conduct which could reasonably be considered inappropriate in a
|
||||
professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of
|
||||
acceptable behavior and will take appropriate and fair corrective action in
|
||||
response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject
|
||||
comments, commits, code, wiki edits, issues, and other contributions that are
|
||||
not aligned to this Code of Conduct, and will communicate reasons for moderation
|
||||
decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when
|
||||
an individual is officially representing the community in public spaces.
|
||||
Examples of representing our community include using an official e-mail address,
|
||||
posting via an official social media account, or acting as an appointed
|
||||
representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
||||
reported to the community leaders responsible for enforcement at
|
||||
avollkopf@web.de.
|
||||
All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the
|
||||
reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining
|
||||
the consequences for any action they deem in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed
|
||||
unprofessional or unwelcome in the community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing
|
||||
clarity around the nature of the violation and an explanation of why the
|
||||
behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series
|
||||
of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No
|
||||
interaction with the people involved, including unsolicited interaction with
|
||||
those enforcing the Code of Conduct, for a specified period of time. This
|
||||
includes avoiding interactions in community spaces as well as external channels
|
||||
like social media. Violating these terms may lead to a temporary or
|
||||
permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including
|
||||
sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public
|
||||
communication with the community for a specified period of time. No public or
|
||||
private interaction with the people involved, including unsolicited interaction
|
||||
with those enforcing the Code of Conduct, is allowed during this period.
|
||||
Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community
|
||||
standards, including sustained inappropriate behavior, harassment of an
|
||||
individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within
|
||||
the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
|
||||
version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by [Mozilla's code of conduct
|
||||
enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at
|
||||
https://www.contributor-covenant.org/faq. Translations are available at
|
||||
https://www.contributor-covenant.org/translations.
|
159
CONTRIBUTING.md
Normal file
159
CONTRIBUTING.md
Normal file
|
@ -0,0 +1,159 @@
|
|||
<!-- omit in toc -->
|
||||
# Contributing to CraftBeerPi 4
|
||||
|
||||
First off, thanks for taking the time to contribute! ❤️
|
||||
|
||||
All types of contributions are encouraged and valued. See the [Table of Contents](#table-of-contents) for different ways to help and details about how this project handles them. Please make sure to read the relevant section before making your contribution. It will make it a lot easier for us maintainers and smooth out the experience for all involved. The community looks forward to your contributions. 🎉
|
||||
|
||||
> And if you like the project, but just don't have time to contribute, that's fine. There are other easy ways to support the project and show your appreciation, which we would also be very happy about:
|
||||
> - Star the project
|
||||
> - Tweet about it
|
||||
> - Refer this project in your project's readme
|
||||
> - Mention the project at local meetups and tell your friends/colleagues
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Table of Contents
|
||||
|
||||
- [Code of Conduct](#code-of-conduct)
|
||||
- [I Have a Question](#i-have-a-question)
|
||||
- [I Want To Contribute](#i-want-to-contribute)
|
||||
- [Reporting Bugs](#reporting-bugs)
|
||||
- [Suggesting Enhancements](#suggesting-enhancements)
|
||||
- [Your First Code Contribution](#your-first-code-contribution)
|
||||
- [Improving The Documentation](#improving-the-documentation)
|
||||
- [Styleguides](#styleguides)
|
||||
- [Commit Messages](#commit-messages)
|
||||
- [Join The Project Team](#join-the-project-team)
|
||||
|
||||
|
||||
## Code of Conduct
|
||||
|
||||
This project and everyone participating in it is governed by the
|
||||
[CraftBeerPi 4 Code of Conduct](https://github.com/avollkopf/craftbeerpi4/blob/master/CODE_OF_CONDUCT.md).
|
||||
By participating, you are expected to uphold this code. Please report unacceptable behavior
|
||||
to <avollkopf@web.de>.
|
||||
|
||||
|
||||
## I Have a Question
|
||||
|
||||
> If you want to ask a question, we assume that you have read the available [Documentation](https://openbrewing.gitbook.io/craftbeerpi4_support/).
|
||||
|
||||
Before you ask a question, it is best to search for existing [Issues](https://github.com/avollkopf/craftbeerpi4//issues) that might help you. In case you have found a suitable issue and still need clarification, you can write your question in this issue. It is also advisable to search the internet for answers first.
|
||||
|
||||
If you then still feel the need to ask a question and need clarification, we recommend the following:
|
||||
|
||||
- Open an [Issue](https://github.com/avollkopf/craftbeerpi4//issues/new).
|
||||
- Provide as much context as you can about what you're running into.
|
||||
- Provide project and platform versions (nodejs, npm, etc), depending on what seems relevant.
|
||||
|
||||
We will then take care of the issue as soon as possible.
|
||||
|
||||
<!--
|
||||
You might want to create a separate issue tag for questions and include it in this description. People should then tag their issues accordingly.
|
||||
|
||||
Depending on how large the project is, you may want to outsource the questioning, e.g. to Stack Overflow or Gitter. You may add additional contact and information possibilities:
|
||||
- IRC
|
||||
- Slack
|
||||
- Gitter
|
||||
- Stack Overflow tag
|
||||
- Blog
|
||||
- FAQ
|
||||
- Roadmap
|
||||
- E-Mail List
|
||||
- Forum
|
||||
-->
|
||||
|
||||
## I Want To Contribute
|
||||
|
||||
> ### Legal Notice <!-- omit in toc -->
|
||||
> When contributing to this project, you must agree that you have authored 100% of the content, that you have the necessary rights to the content and that the content you contribute may be provided under the project license.
|
||||
|
||||
### Reporting Bugs
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### Before Submitting a Bug Report
|
||||
|
||||
A good bug report shouldn't leave others needing to chase you up for more information. Therefore, we ask you to investigate carefully, collect information and describe the issue in detail in your report. Please complete the following steps in advance to help us fix any potential bug as fast as possible.
|
||||
|
||||
- Make sure that you are using the latest version.
|
||||
- Determine if your bug is really a bug and not an error on your side e.g. using incompatible environment components/versions (Make sure that you have read the [documentation](https://openbrewing.gitbook.io/craftbeerpi4_support/). If you are looking for support, you might want to check [this section](#i-have-a-question)).
|
||||
- To see if other users have experienced (and potentially already solved) the same issue you are having, check if there is not already a bug report existing for your bug or error in the [bug tracker](https://github.com/avollkopf/craftbeerpi4/issues?q=label%3Abug).
|
||||
- Also make sure to search the internet (including Stack Overflow) to see if users outside of the GitHub community have discussed the issue.
|
||||
- Collect information about the bug:
|
||||
- Stack trace (Traceback)
|
||||
- OS, Platform and Version (Windows, Linux, macOS, x86, ARM)
|
||||
- Version of the interpreter, compiler, SDK, runtime environment, package manager, depending on what seems relevant.
|
||||
- Possibly your input and the output
|
||||
- Can you reliably reproduce the issue? And can you also reproduce it with older versions?
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### How Do I Submit a Good Bug Report?
|
||||
|
||||
> You must never report security related issues, vulnerabilities or bugs including sensitive information to the issue tracker, or elsewhere in public. Instead sensitive bugs must be sent by email to <avollkopf@web.de>.
|
||||
<!-- You may add a PGP key to allow the messages to be sent encrypted as well. -->
|
||||
|
||||
We use GitHub issues to track bugs and errors. If you run into an issue with the project:
|
||||
|
||||
- Open an [Issue](https://github.com/avollkopf/craftbeerpi4//issues/new). (Since we can't be sure at this point whether it is a bug or not, we ask you not to talk about a bug yet and not to label the issue.)
|
||||
- Explain the behavior you would expect and the actual behavior.
|
||||
- Please provide as much context as possible and describe the *reproduction steps* that someone else can follow to recreate the issue on their own. This usually includes your code. For good bug reports you should isolate the problem and create a reduced test case.
|
||||
- Provide the information you collected in the previous section.
|
||||
|
||||
Once it's filed:
|
||||
|
||||
- The project team will label the issue accordingly.
|
||||
- A team member will try to reproduce the issue with your provided steps. If there are no reproduction steps or no obvious way to reproduce the issue, the team will ask you for those steps and mark the issue as `needs-repro`. Bugs with the `needs-repro` tag will not be addressed until they are reproduced.
|
||||
- If the team is able to reproduce the issue, it will be marked `needs-fix`, as well as possibly other tags (such as `critical`), and the issue will be left to be [implemented by someone](#your-first-code-contribution).
|
||||
|
||||
<!-- You might want to create an issue template for bugs and errors that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||
|
||||
|
||||
### Suggesting Enhancements
|
||||
|
||||
This section guides you through submitting an enhancement suggestion for CraftBeerPi 4, **including completely new features and minor improvements to existing functionality**. Following these guidelines will help maintainers and the community to understand your suggestion and find related suggestions.
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### Before Submitting an Enhancement
|
||||
|
||||
- Make sure that you are using the latest version.
|
||||
- Read the [documentation](https://openbrewing.gitbook.io/craftbeerpi4_support/) carefully and find out if the functionality is already covered, maybe by an individual configuration.
|
||||
- Perform a [search](https://github.com/avollkopf/craftbeerpi4//issues) to see if the enhancement has already been suggested. If it has, add a comment to the existing issue instead of opening a new one.
|
||||
- Find out whether your idea fits with the scope and aims of the project. It's up to you to make a strong case to convince the project's developers of the merits of this feature. Keep in mind that we want features that will be useful to the majority of our users and not just a small subset. If you're just targeting a minority of users, consider writing an add-on/plugin library.
|
||||
|
||||
<!-- omit in toc -->
|
||||
#### How Do I Submit a Good Enhancement Suggestion?
|
||||
|
||||
Enhancement suggestions are tracked as [GitHub issues](https://github.com/avollkopf/craftbeerpi4//issues).
|
||||
|
||||
- Use a **clear and descriptive title** for the issue to identify the suggestion.
|
||||
- Provide a **step-by-step description of the suggested enhancement** in as many details as possible.
|
||||
- **Describe the current behavior** and **explain which behavior you expected to see instead** and why. At this point you can also tell which alternatives do not work for you.
|
||||
- You may want to **include screenshots and animated GIFs** which help you demonstrate the steps or point out the part which the suggestion is related to. You can use [this tool](https://www.cockos.com/licecap/) to record GIFs on macOS and Windows, and [this tool](https://github.com/colinkeenan/silentcast) or [this tool](https://github.com/GNOME/byzanz) on Linux. <!-- this should only be included if the project has a GUI -->
|
||||
- **Explain why this enhancement would be useful** to most CraftBeerPi 4 users. You may also want to point out the other projects that solved it better and which could serve as inspiration.
|
||||
|
||||
<!-- You might want to create an issue template for enhancement suggestions that can be used as a guide and that defines the structure of the information to be included. If you do so, reference it here in the description. -->
|
||||
|
||||
### Your First Code Contribution
|
||||
<!-- TODO
|
||||
include Setup of env, IDE and typical getting started instructions?
|
||||
|
||||
-->
|
||||
|
||||
### Improving The Documentation
|
||||
<!-- TODO
|
||||
Updating, improving and correcting the documentation
|
||||
|
||||
-->
|
||||
|
||||
## Styleguides
|
||||
### Commit Messages
|
||||
<!-- TODO
|
||||
|
||||
-->
|
||||
|
||||
## Join The Project Team
|
||||
<!-- TODO -->
|
||||
|
||||
<!-- omit in toc -->
|
||||
## Attribution
|
||||
This guide is based on the **contributing-gen**. [Make your own](https://github.com/bttger/contributing-gen)!
|
|
@ -1,3 +1,3 @@
|
|||
__version__ = "4.1.0"
|
||||
__version__ = "4.1.2"
|
||||
__codename__ = "Groundhog Day"
|
||||
|
||||
|
|
|
@ -89,7 +89,7 @@ class Kettle:
|
|||
heater: Actor = None
|
||||
sensor: Sensor = None
|
||||
type: str = None
|
||||
target_temp: int = 0
|
||||
target_temp: float = 0
|
||||
|
||||
def __str__(self):
|
||||
return "name={} props={} temp={}".format(self.name, self.props, self.target_temp)
|
||||
|
|
28
cbpi/cli.py
28
cbpi/cli.py
|
@ -15,7 +15,7 @@ from colorama import Fore, Back, Style
|
|||
import importlib
|
||||
from importlib_metadata import metadata
|
||||
from tabulate import tabulate
|
||||
from inquirer import prompt
|
||||
import inquirer
|
||||
import platform
|
||||
import time
|
||||
|
||||
|
@ -74,19 +74,17 @@ class CraftBeerPiCli():
|
|||
print(Fore.LIGHTGREEN_EX, tabulate(result, headers="keys"), Style.RESET_ALL)
|
||||
|
||||
|
||||
def plugin_create(self):
|
||||
def plugin_create(self, pluginName):
|
||||
print("Plugin Creation")
|
||||
print("")
|
||||
|
||||
questions = [
|
||||
{
|
||||
'type': 'input',
|
||||
'name': 'name',
|
||||
'message': 'Plugin Name:',
|
||||
}
|
||||
]
|
||||
questions = [ inquirer.Text('name', message='Plugin Name (will be prefixed with "cbpi4-")', default=pluginName),]
|
||||
|
||||
answers = prompt(questions)
|
||||
answers = inquirer.prompt(questions)
|
||||
|
||||
if answers["name"] == "":
|
||||
print("you failed to provide a name for the new plugin - terminating")
|
||||
return
|
||||
|
||||
name = "cbpi4-" + str(answers["name"]).replace('_', '-').replace(' ', '-')
|
||||
if os.path.exists(os.path.join(".", name)) is True:
|
||||
|
@ -284,9 +282,15 @@ def plugins(context):
|
|||
|
||||
@main.command()
|
||||
@click.pass_context
|
||||
def create(context):
|
||||
@click.argument('pluginname', nargs=-1, required=False)
|
||||
def create(context, pluginname=[]):
|
||||
'''Create New Plugin'''
|
||||
context.obj.plugin_create()
|
||||
sentence = ""
|
||||
for word in pluginname:
|
||||
if sentence != "":
|
||||
sentence += " "
|
||||
sentence += word
|
||||
context.obj.plugin_create(sentence)
|
||||
|
||||
@main.command()
|
||||
@click.pass_context
|
||||
|
|
|
@ -52,6 +52,8 @@ class ConfigUpdate(CBPiExtension):
|
|||
SENSOR_LOG_MAX_BYTES = self.cbpi.config.get("SENSOR_LOG_MAX_BYTES", None)
|
||||
slow_pipe_animation = self.cbpi.config.get("slow_pipe_animation", None)
|
||||
NOTIFY_ON_ERROR = self.cbpi.config.get("NOTIFY_ON_ERROR", None)
|
||||
BoilAutoTimer = self.cbpi.config.get("BoilAutoTimer", None)
|
||||
|
||||
|
||||
if boil_temp is None:
|
||||
logger.info("INIT Boil Temp Setting")
|
||||
|
@ -334,6 +336,17 @@ class ConfigUpdate(CBPiExtension):
|
|||
except:
|
||||
logger.warning('Unable to update config')
|
||||
|
||||
if BoilAutoTimer is None:
|
||||
logging.info("INIT BoilAutoTimer")
|
||||
try:
|
||||
await self.cbpi.config.add('BoilAutoTimer', 'No', ConfigType.SELECT,
|
||||
'Start Boil timer automatically if Temp does not change for 5 Minutes and is above 95C/203F',
|
||||
[{"label": "Yes", "value": "Yes"},
|
||||
{"label": "No", "value": "No"}])
|
||||
BoilAutoTimer = self.cbpi.config.get("BoilAutoTimer", "No")
|
||||
except:
|
||||
logging.warning('Unable to update database')
|
||||
|
||||
def setup(cbpi):
|
||||
cbpi.plugin.register("ConfigUpdate", ConfigUpdate)
|
||||
pass
|
||||
|
|
|
@ -317,10 +317,12 @@ class ActorStep(CBPiStep):
|
|||
|
||||
@parameters([Property.Number(label="Timer", description="Time in Minutes", configurable=True),
|
||||
Property.Number(label="Temp", description="Boil temperature", configurable=True),
|
||||
#Property.Number(label="DwellTime", description="Time in minutes (Recommended: 5). If temp is not changing significantly within this time, Timer will start. Defaul:0 disabled", configurable=True),
|
||||
Property.Sensor(label="Sensor"),
|
||||
Property.Kettle(label="Kettle"),
|
||||
Property.Select(label="LidAlert",options=["Yes","No"], description="Trigger Alert to remove lid if temp is close to boil"),
|
||||
Property.Select(label="AutoMode",options=["Yes","No"], description="Switch Kettlelogic automatically on and off -> Yes"),
|
||||
#Property.Select(label="AutoTimer",options=["Yes","No"], description="Start Timer automatically if Temp does not change for 5 Minutes and is above 95C/203F"),
|
||||
Property.Select("First_Wort", options=["Yes","No"], description="First Wort Hop alert if set to Yes"),
|
||||
Property.Text("First_Wort_text", configurable = True, description="First Wort Hop alert text"),
|
||||
Property.Number("Hop_1", configurable = True, description="First Hop alert (minutes before finish)"),
|
||||
|
@ -372,15 +374,21 @@ class BoilStep(CBPiStep):
|
|||
self.lid_temp = 95 if self.get_config_value("TEMP_UNIT", "C") == "C" else 203
|
||||
self.lid_flag = True if self.props.get("LidAlert", "No") == "Yes" else False
|
||||
self.AutoMode = True if self.props.get("AutoMode", "No") == "Yes" else False
|
||||
self.AutoTimer = True if self.cbpi.config.get("BoilAutoTimer", "No") == "Yes" else False
|
||||
self.first_wort_hop_flag = False
|
||||
self.first_wort_hop=self.props.get("First_Wort", "No")
|
||||
self.first_wort_hop_text=self.props.get("First_Wort_text", None)
|
||||
self.hops_added=["","","","","",""]
|
||||
self.remaining_seconds = None
|
||||
self.temparray=np.array([])
|
||||
#self.dwelltime=int(self.props.get("DwellTime", 0))*60
|
||||
self.dwelltime=5*60 #tested with 5 minutes -> not exactly 5 min due to accuracy of asyncio.sleep
|
||||
self.deviationlimit=0.3 # derived from a test
|
||||
logging.warning(self.AutoTimer)
|
||||
|
||||
self.kettle=self.get_kettle(self.props.get("Kettle", None))
|
||||
if self.kettle is not None:
|
||||
self.kettle.target_temp = int(self.props.get("Temp", 0))
|
||||
self.kettle.target_temp = float(self.props.get("Temp", 0))
|
||||
|
||||
if self.cbpi.kettle is not None and self.timer is None:
|
||||
self.timer = Timer(int(self.props.get("Timer", 0)) *60 ,on_update=self.on_timer_update, on_done=self.on_timer_done)
|
||||
|
@ -428,12 +436,21 @@ class BoilStep(CBPiStep):
|
|||
while self.running == True:
|
||||
await asyncio.sleep(1)
|
||||
sensor_value = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
||||
|
||||
self.temparray = np.append(self.temparray,sensor_value)
|
||||
if self.temparray.size > self.dwelltime:
|
||||
self.temparray =np.delete(self.temparray,0)
|
||||
deviation= np.std(self.temparray)
|
||||
if (sensor_value >= self.lid_temp) and (deviation <= self.deviationlimit) and (self.AutoTimer is True) and (self.timer.is_running is not True):
|
||||
self.timer.start()
|
||||
self.timer.is_running = True
|
||||
estimated_completion_time = datetime.fromtimestamp(time.time()+ (int(self.props.get("Timer", 0)))*60)
|
||||
self.cbpi.notify(self.name, 'Timer started automatically. Estimated completion: {}'.format(estimated_completion_time.strftime("%H:%M")), NotificationType.INFO)
|
||||
logging.info("Current: "+str(sensor_value)+" | Dev: " + str(deviation))
|
||||
if self.lid_flag == True and sensor_value >= self.lid_temp:
|
||||
self.cbpi.notify("Please remove lid!", "Reached temp close to boiling", NotificationType.INFO)
|
||||
self.lid_flag = False
|
||||
|
||||
if sensor_value >= int(self.props.get("Temp", 0)) and self.timer.is_running is not True:
|
||||
if sensor_value >= float(self.props.get("Temp", 0)) and self.timer.is_running is not True:
|
||||
self.timer.start()
|
||||
self.timer.is_running = True
|
||||
estimated_completion_time = datetime.fromtimestamp(time.time()+ (int(self.props.get("Timer", 0)))*60)
|
||||
|
@ -479,7 +496,7 @@ class CooldownStep(CBPiStep):
|
|||
self.kettle = self.get_kettle(self.props.get("Kettle", None))
|
||||
self.actor = self.props.get("Actor", None)
|
||||
self.target_temp = int(self.props.get("Temp",0))
|
||||
self.Interval = 15 # Interval in minutes on how often cooldwon end time is calculated
|
||||
self.Interval = 10 # Interval in minutes on how often cooldwon end time is calculated
|
||||
|
||||
self.cbpi.notify(self.name, 'Cool down to {}°'.format(self.target_temp), NotificationType.INFO)
|
||||
if self.timer is None:
|
||||
|
@ -509,7 +526,7 @@ class CooldownStep(CBPiStep):
|
|||
await self.push_update()
|
||||
while self.running == True:
|
||||
current_temp = self.get_sensor_value(self.props.get("Sensor", None)).get("value")
|
||||
if self.count == 10:
|
||||
if self.count == 3:
|
||||
self.temp_array.append(current_temp)
|
||||
current_time = time.time()
|
||||
if self.initial_date == None:
|
||||
|
@ -524,6 +541,10 @@ class CooldownStep(CBPiStep):
|
|||
target_timestring= datetime.fromtimestamp(target_time)
|
||||
self.summary="ECT: {}".format(target_timestring.strftime("%H:%M"))
|
||||
self.cbpi.notify("Cooldown Step","Current: {}°, reaching {}° at {}".format(round(current_temp,1), self.target_temp, target_timestring.strftime("%d.%m %H:%M")), NotificationType.INFO)
|
||||
self.temp_array = []
|
||||
self.time_array = []
|
||||
self.temp_array.append(self.get_sensor_value(self.props.get("Sensor", None)).get("value"))
|
||||
self.time_array.append(time.time())
|
||||
await self.push_update()
|
||||
|
||||
if current_temp <= self.target_temp and self.timer.is_running is not True:
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
Metadata-Version: 2.1
|
||||
Name: cbpi4
|
||||
Version: 4.0.6
|
||||
Version: 4.1.2
|
||||
Summary: CraftBeerPi4 Brewing Software
|
||||
Home-page: http://web.craftbeerpi.com
|
||||
Author: Manuel Fritsch / Alexander Vollkopf
|
||||
|
|
|
@ -42,7 +42,6 @@ cbpi/config/plugin_list.txt
|
|||
cbpi/config/sensor.json
|
||||
cbpi/config/splash.png
|
||||
cbpi/config/step_data.json
|
||||
cbpi/config/dashboard/cbpi_dashboard_1.json
|
||||
cbpi/controller/__init__.py
|
||||
cbpi/controller/actor_controller.py
|
||||
cbpi/controller/basic_controller2.py
|
||||
|
@ -64,40 +63,60 @@ cbpi/controller/upload_controller.py
|
|||
cbpi/extension/__init__.py
|
||||
cbpi/extension/ConfigUpdate/__init__.py
|
||||
cbpi/extension/ConfigUpdate/config.yaml
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/ConfigUpdate/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/FermentationStep/__init__.py
|
||||
cbpi/extension/FermentationStep/config.yaml
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/FermentationStep/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/FermenterHysteresis/__init__.py
|
||||
cbpi/extension/FermenterHysteresis/config.yaml
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/FermenterHysteresis/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/dummyactor/__init__.py
|
||||
cbpi/extension/dummyactor/config.yaml
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/dummyactor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/dummysensor/__init__.py
|
||||
cbpi/extension/dummysensor/config.yaml
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/dummysensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/gpioactor/__init__.py
|
||||
cbpi/extension/gpioactor/config.yaml
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/gpioactor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/httpsensor/__init__.py
|
||||
cbpi/extension/httpsensor/config.yaml
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/httpsensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/hysteresis/__init__.py
|
||||
cbpi/extension/hysteresis/config.yaml
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/hysteresis/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mashstep/__init__.py
|
||||
cbpi/extension/mashstep/config.yaml
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mashstep/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__init__.py
|
||||
|
@ -105,24 +124,38 @@ cbpi/extension/mqtt_actor/config.yaml
|
|||
cbpi/extension/mqtt_actor/generic_mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/tasmota_mqtt_actor.py
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-310.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-311.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/generic_mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-310.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-311.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-310.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-311.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-37.pyc
|
||||
cbpi/extension/mqtt_actor/__pycache__/tasmota_mqtt_actor.cpython-39.pyc
|
||||
cbpi/extension/mqtt_sensor/__init__.py
|
||||
cbpi/extension/mqtt_sensor/config.yaml
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_sensor/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/mqtt_util/__init__.py
|
||||
cbpi/extension/mqtt_util/config.yaml
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/mqtt_util/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/extension/onewire/__init__.py
|
||||
cbpi/extension/onewire/config.yaml
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-310.pyc
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-311.pyc
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-37.pyc
|
||||
cbpi/extension/onewire/__pycache__/__init__.cpython-39.pyc
|
||||
cbpi/http_endpoints/__init__.py
|
||||
|
|
|
@ -1,23 +1,24 @@
|
|||
aiohttp==3.8.1
|
||||
typing-extensions>=4
|
||||
aiohttp==3.8.3
|
||||
aiohttp-auth==0.1.1
|
||||
aiohttp-route-decorator==0.1.4
|
||||
aiohttp-security==0.4.0
|
||||
aiohttp-session==2.11.0
|
||||
aiohttp-session==2.12.0
|
||||
aiohttp-swagger==1.0.16
|
||||
aiojobs==1.0.0
|
||||
aiojobs==1.1.0
|
||||
aiosqlite==0.17.0
|
||||
cryptography==36.0.1
|
||||
requests==2.27.1
|
||||
voluptuous==0.12.2
|
||||
requests==2.28.1
|
||||
voluptuous==0.13.1
|
||||
pyfiglet==0.8.post1
|
||||
click==8.0.4
|
||||
shortuuid==1.0.8
|
||||
tabulate==0.8.9
|
||||
asyncio-mqtt
|
||||
PyInquirer==1.0.3
|
||||
colorama==0.4.4
|
||||
psutil==5.9.0
|
||||
click==8.1.3
|
||||
shortuuid==1.0.11
|
||||
tabulate==0.9.0
|
||||
asyncio-mqtt==0.16.1
|
||||
inquirer==3.1.1
|
||||
colorama==0.4.6
|
||||
psutil==5.9.4
|
||||
cbpi4gui
|
||||
importlib_metadata
|
||||
numpy==1.22.2
|
||||
pandas==1.4.1
|
||||
numpy==1.24.1
|
||||
pandas==1.5.3
|
||||
|
|
Loading…
Reference in a new issue