-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
06f0258
commit 1c5c3f9
Showing
26 changed files
with
102 additions
and
66 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,26 @@ | ||
# MQTT | ||
|
||
Some information about MQTT and how to use it in a MQTTDevice environment. | ||
|
||
## What ist MQTT | ||
|
||
MQTT is a publish-and-subscribe protocol. Clients, devices and applications publish and subscribe into topics handled by a broker. In a CraftbeerPi environment a sensor is a publishing and an actor is a subscribing device. Devices or applications never communicate directly, instead they send and receive messages managed in topics by the MQTT broker. A topic looks like a named channel or folder, eg induction/temp or upstairs/bathroom/light. Hundreds of different topics are possible. Each topic behave like a message in- and outbox. Messages are send in a compact JSON format, also known as payloads. A simple payload from a sensor device can look like this: { "value": 21.2 }. The sensor publishes this message into a topic. All subscribed clients, devices or application to this topic will receive the sensor message "value 21.2". A simple payload from CraftbeerPi to an actor can be { "state": "on"}. CBPi4 publishes this message into a topic to switch on an actor. An actor must subcribe to this topics to receive this message. | ||
|
||
MQTT summary: | ||
## MQTT summary | ||
|
||
* sensors are publishing payloads (sensor values) into topics | ||
* actors subscribe to topics to receive payloads (commands) | ||
* every published payload will always be sent to a MQTT broker | ||
* the MQTT broker sends every received payload to all subscribing devices and applications | ||
* craftbeerpi subscribes to all sensor topics and publishes actor commands in actor topics | ||
* all sensor and actor topics are unique | ||
|
||
## How to use it | ||
|
||
Do not hazzle on technical details. MQTT topics are named channels like folders. So it is a good approach to start with a clear channel structure. A mash tun needs an induction hub, an agitator and a temperature sensor. MQTT topcis can look like this: | ||
|
||
mash/sensor\ | ||
mash/agitator\ | ||
mash/induction | ||
|
||
Descriptive MQTT topics are highly recommended. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,23 @@ | ||
# Backup and Restore | ||
|
||
The file explorer can be reached via the web browser <http://mqttdevice/edit> | ||
Backup and restore are available via web interface. | ||
|
||
1. Backup | ||
![Backup and Restore](img/backup.jpg) | ||
|
||
It is recommended to make a backup after configuration is completed. MQTT backup files are text files. You can view an edit the configurtion files. | ||
|
||
## Explorer | ||
|
||
If you want to work with files directly you can use the file explorer. The file explorer can be reached via the web browser <http://mqttdevice/edit>. File explorer offers editor functions. You can check, view and edit files types like txt, json or css. | ||
|
||
![File explorer](img/explorer.jpg) | ||
|
||
File explorer also offers download and upload functions: | ||
|
||
1. Download | ||
|
||
Click on the file config.txt (left mouse button) and select download from the popup. | ||
|
||
2. Restore | ||
2. Upload | ||
|
||
Click on Select file, select the config.txt from the backup and click on upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,13 @@ | ||
# Installation | ||
|
||
The installation is divided into three steps: | ||
While installation of MQTTDevice is very easy you need some prerequisite. | ||
|
||
1. Installation of RaspberryPi and CraftbeerPi4 | ||
2. Installation MQTT Broker | ||
3. Installation MQTTDevice | ||
## Prerequisite | ||
|
||
The installation and configuration of CraftbeerPi4 is described here: <https://openbrewing.gitbook.io/craftbeerpi4_support/master/server-installation> | ||
You will need version 4.0.1.11 or above. Earlier versions do not support MQTT actors. | ||
1. CraftbeerPi4 | ||
|
||
The installation and configuration of RaspberryPi is available in many good instructions on the internet. | ||
The installation and configuration of CraftbeerPi4 is described here: <https://openbrewing.gitbook.io/craftbeerpi4_support/master/server-installation>. Version 4.0.1.11 or above is required. Earlier versions do not support MQTT actors. | ||
|
||
The communication between CraftbeerPi and MQTTDevice takes place via WLAN. Sensors send temperature values to CraftbeerPi and CraftbeerPi sends commands to actors (e.g. switch agitator on / off). The MQTT protocol is used for this communication. The MQTT protocol requires a MQTT broker. | ||
2. MQTT Broker | ||
|
||
The MQTT sensor "Induction temperature" and the MQTT actor "Agitator" are now created on the MQTTdevice with the identical CBPi4 topics: | ||
|
||
![mqttSensor2](img/mqttSensor2.jpg) | ||
|
||
![mqttAktor2](img/mqttAktor2.jpg) | ||
|
||
The sensor or actor name can be different. These steps complete the exemplary installation and configuration of MQTT sensors and actors. Up to 6 sensors and 8 actors can be set up per MQTT device. (Almost) any number of MQTT devices can be connected to CraftbeerPi via MQTT. Three MQTT devices are used very often: | ||
|
||
MQTTDevice 1: Mash tun with temperature sensors and agitator. | ||
|
||
MQTTDevice 2: HLT with temperature sensors, pumps and valves etc. | ||
|
||
MQTTDevice 3: Fermenter with temperature sensors, an actor for heating and an actor for cooling | ||
|
||
Any combination is possible. Because the MQTT communication is implemented via topics, a temperature sensor and an induction hob for a CraftbeerPi Kettle do not have to be configured on the same MQTTDeivce. | ||
|
||
![induction](img/induction.jpg) | ||
|
||
The picture above is an example on how to configure an induction hob GGM IDS2. Do not reduce fan run on after power off below 120sec: savely cool down induction hob after mash or boil. GPIOs D5, D6 and D7 are highly recommended. Check ESP8266 manual for further information about GPIO states (High/Low) on startup. | ||
The MQTT protocol is used for communication between CraftbeerPi and MQTTDevice. Sensors send temperature values to CraftbeerPi and CraftbeerPi sends commands to actors (e.g. switch agitator on / off). The MQTT protocol requires a MQTT broker. Please follow the instructions on craftbeerpi gitbook to install and configure a MQTT broker like mosquitto. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Setup sensors and actors | ||
|
||
The MQTT sensor "mash tun temperature" and the MQTT actors "mash tun induction" and "mash tun agitator" are now created on the MQTTdevice with exactly the same CBPi4 topics: | ||
|
||
![MQTT sensor](img/mqttSensor2.jpg) | ||
|
||
![MQTT actor](img/mqttAktor2.jpg) | ||
|
||
![MQTT induction](img/induction.jpg) | ||
|
||
_Note: sensor and actor names can be different between CBPi4 and MQTTDevice, but MQTT topics must be exactly equal. MQTT topics are case sensitive._ | ||
|
||
The picture MQTT induction is an example on how to configure the induction hob GGM IDS2. GPIOs D5, D6 and D7 are recommended. |