Skip to content

Commit

Permalink
Merge pull request #53 from medlor/3.1.0_beta
Browse files Browse the repository at this point in the history
3.1.0
  • Loading branch information
medlor authored Jan 18, 2022
2 parents 1df40e1 + 6ced92d commit bcc9796
Show file tree
Hide file tree
Showing 33 changed files with 2,503 additions and 1,320 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,9 @@ userConfig.h*
!userConfig.h.SAMPLE
*.bak
*.swp
*.ino.cpp
.vscode
.pio/*
.DS_Store
com.dropbox.attrs
pictures/icon-sets/shared/thenounproject/
Binary file added IoTMQTTPanel/IoTMQTT-showcase_v3.1.0.mp4
Binary file not shown.

Large diffs are not rendered by default.

60 changes: 57 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@

## Do it yourself, open-source PID for your espresso machine

Version 3.0.0
Version 3.1.0

## Support / Contact
You can chat with us directly using our [discord server](https://discord.gg/VA5ZeacFdw).
Expand Down Expand Up @@ -58,14 +58,16 @@ Two cups of a double cappuccino with the new Steamfunction | [![Two cups of a do
- VALVE := activate Valve (not yet)
- CLEANING := activate cleaning mode
- SLEEPING := activate sleeping mode
- TEMP_INC := increase setPoint (not yet)
- TEMP_DEC := decrease setPoint (not yet)
- MENU := activate menu
- MENU_INC := increase value shown in menu
- MENU_DEC := decrease value shown in menu
- while also supporting the switch types: toggles (eg switches) and triggers (eg push buttons)
- added MQTT support to control ACTIONS using topics ../actions/<ACTION> with supported payloads of 0|1|-1 (off|on|switch)
Example: "custom/Küche.Rancilio2/actions/STEAMING"
- added Blynk support to control ACTIONS using virtual pins
1. MultiToggle triggers any ACTION based on multiple simultaneous hardware-button states (eg. if hotwater+steaming button is pressed then start the action CLEANING). MultiToggle can trigger up to six ACTIONS just by using the three rancilio's hardware-switches and therefore reduces the need for external control (mqtt, blynk, resistor-circuit, ..).
1. GpioAction: When actions are activated, specific GPIOs can be triggered also. This can be used eg. to light up LEDs in Rancilio's custom modified hardware-switches.
1. "Brew Profiles" can be used to easily set optimum brew settings for different beans.
1. Offline Modus is fixed and enhanced. If userConfig.h's FORCE_OFFLINE is enabled, then PID fully is working without networking. Ideal in situations when there is no connectivity or you dont want to rely on it.
1. Huge performance tunings and improvements under the hood which stabilizes the system (eg in situations of bad WIFI, hardware issues,..).
1. MQTT support to integrate machine in smart-home solutions and to easier extract details for graphing/alerting.
Expand Down Expand Up @@ -122,6 +124,57 @@ Installation is as explained on http://rancilio-pid.de/ but with following adapa
- Instructions can be found at https://github.com/medlor/bleeding-edge-ranciliopid/wiki/Instructions-on-how-to-create-new-icon-collections
## Changelog
- 3.1.0:
- NEW FEATURE: Add support for up to 3 "Profiles", which can be used to quickly switch between different brew settings (eg. when different beans are used).
- An individual profile comprises of following settings:
- Brew Temperature / setPoint
- Brew Time
- Preinfusion time and pause
- Coldstart Temperature / startTemp
- Profiles can be selected by any means, eg mqtt/blynk/menu/.. . The variable for this is "profile".
- The selected profile is also shown on the display, see new setting ENABLE_PROFILE_STATUS.
- ATTENTION: Following variable names has changed and therefore any mqtt dashboards and tools have to be adapted (eg IotMQTT/Grafana/nodered):
- setPoint -> activeSetPoint
- brewtime -> activeBrewTime
- starttemp -> activeStartTemp
- preinfusion -> activePreinfusion
- preinfusionpause -> activePreinfusionPause
- Hint: Changing the value of any of variables (eg using mqtt/blynk) will update the respective setting of the currently activated profile.
- Blynk:
- Added new virtual Pin V3 for "profile", which can be any number between 1 and 3.
- Added [Blynk Showcase](https://github.com/medlor/bleeding-edge-ranciliopid/tree/master/blynk/blynk-showcase_v3.1.0.mp4).
- NEW FEATURE: Initial support for MENU which can be used to control settings using the display-case with buttons:
- Action "MENU" added.
- Actions TEMP_INC and TEMP_DEC renamed to MENU_INC and MENU_DEC respectively.
- Added new userConfig.h setting MENU_CONFIG which is used to configure menu settings.
- Following menu operations are supported (can be extended on request):
- SETPOINT, SETPOINTSTEAM, BREWTIME, PREINFUSION, PREINFUSION_PAUSE, PID_ON
- NEW FEATURE: The calculation of the "total brew time" can be adjusted with the userConfig.h setting BREWTIMER_MODE.
- 0: (default) brewtime-countdown is equal BREWTIMEX.
- 1: brewtime-countdown is BREWTIMEX + PREINFUSIONX + PREINFUSION_PAUSEX
- userConfig.h Changes:
- Added:
- ENABLE_PROFILE_STATUS
- Renamed SETPOINT to SETPOINT1
- Renamed BREWTIME to SETPOINT1
- Renamed PREINFUSION to PREINFUSION1
- Renamed PREINFUSION_PAUSE to PREINFUSION_PAUSE1
- TEMPSENSOR (default=2)
- SETPOINT2, SETPOINT3
- STARTTEMP2, STARTTEMP3
- PREINFUSION2, PREINFUSION3
- PREINFUSION_PAUSE2, PREINFUSION_PAUSE3
- BREWTIMER_MODE
- Support for Thermistor K-type with MAX6675 (Thanks to aschoelzhorn for the PR and TeraK, sailhobie for support).
- TSIC3xx is still strongly recommended to use!
- Updated IoTMQTT Dashboard [IoTMQTTPanel-perfect_coffee_pid_v3.1.0_v1.json](https://github.com/medlor/bleeding-edge-ranciliopid/tree/master/IoTMQTTPanel/IoTMQTTPanel-perfect_coffee_pid_v3.1.0_v1.json) to include Profile and Action support. [Showcase](https://github.com/medlor/bleeding-edge-ranciliopid/tree/master/IoTMQTTPanel/IoTMQTT-showcase_v3.1.0.mp4).
- Refactor and fix eeprom stuff.
- Refactor all variables from double to float.
- Make blynk optional on compilation.
- Removed burst feature.
- Fixes:
- Fix blynk "heater output" not being shown.
- Fix float compare function.
- 3.0.0:
- Project is getting renamed to "Perfect Coffee PID".
- Improve temperature readings to reduce undesireable actions of the PID controller:
Expand Down Expand Up @@ -492,6 +545,7 @@ Also to the nice people in our rancilio discord channel and the ones who contrib
## Also special thanks to the great icon artwork
- ["washing hand"](https://thenounproject.com/matfine/collection/cleaning-icon/?i=2749704) by [Mat fine](https://thenounproject.com/matfine) from [the Noun Project](https://thenounproject.com/matfine/collection/cleaning-icon/?i=2749704) licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/legalcode)
- ["menu"](https://thenounproject.com/icon/menu-2943760/) by [Mat fine](https://thenounproject.com/matfine) from [the Noun Project](https://thenounproject.com/icon/tasks-2943947/) licensed under [CC BY 3.0](https://creativecommons.org/licenses/by/3.0/legalcode)
- ["Glückliche Gesichter Emoticons"](https://pixabay.com/de/illustrations/gl%C3%BCckliche-gesichter-emoticons-5049116/) by [Annalise Batista](https://pixabay.com/de/users/annaliseart-7089643/) licensed under [Pixabay license](https://pixabay.com/de/service/terms/#license)
Expand Down
Binary file added blynk/blynk-showcase_v3.1.0.mp4
Binary file not shown.
26 changes: 0 additions & 26 deletions pictures/icon-sets/shared/clean.xbm

This file was deleted.

Binary file removed pictures/icon-sets/shared/clean.xcf
Binary file not shown.
26 changes: 0 additions & 26 deletions pictures/icon-sets/shared/clean_rotated.xbm

This file was deleted.

Binary file removed pictures/icon-sets/shared/clean_rotated.xcf
Binary file not shown.
5 changes: 5 additions & 0 deletions pictures/icon-sets/shared/profile_1.xbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define profile_1_width 11
#define profile_1_height 9
static unsigned char profile_1_bits[] = {
0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0x22, 0x02, 0x22, 0x02, 0x22, 0x02,
0x02, 0x02, 0xfe, 0x03, 0x00, 0x00 };
Binary file added pictures/icon-sets/shared/profile_1.xcf
Binary file not shown.
5 changes: 5 additions & 0 deletions pictures/icon-sets/shared/profile_2.xbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define profile_2_width 11
#define profile_2_height 9
static unsigned char profile_2_bits[] = {
0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0x52, 0x02, 0x52, 0x02, 0x52, 0x02,
0x02, 0x02, 0xfe, 0x03, 0x00, 0x00 };
Binary file added pictures/icon-sets/shared/profile_2.xcf
Binary file not shown.
5 changes: 5 additions & 0 deletions pictures/icon-sets/shared/profile_3.xbm
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#define profile_3_width 11
#define profile_3_height 9
static unsigned char profile_3_bits[] = {
0x00, 0x00, 0xfe, 0x03, 0x02, 0x02, 0xaa, 0x02, 0xaa, 0x02, 0xaa, 0x02,
0x02, 0x02, 0xfe, 0x03, 0x00, 0x00 };
Binary file added pictures/icon-sets/shared/profile_3.xcf
Binary file not shown.
36 changes: 27 additions & 9 deletions platformio.ini
Original file line number Diff line number Diff line change
@@ -1,49 +1,64 @@
[platformio]
#lib_dir = libraries/
src_dir = rancilio-pid/
default_envs = esp32_usb

[env]
lib_ldf_mode = chain # https://github.com/Links2004/arduinoWebSockets/issues/635
lib_compat_mode = strict

[env:nodemcuv2_usb]
platform = espressif8266@^2
board = nodemcuv2
board_build.mcu = esp8266
framework = arduino
monitor_speed = 115200
lib_ldf_mode = chain+
build_flags =
-include "rancilio-pid/RemoteDebugCfg.h"
lib_ignore =
WiFi
lib_deps =
joaolopesf/RemoteDebug @ ^3.0.5
#lebuni/ZACwire for TSic @ 1.3.3
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_esp32_support
olikraus/U8g2 @ ^2.28.8
blynkkk/Blynk @ ^1.0.0
blynkkk/Blynk @ ^1.0.1
knolleary/PubSubClient @ ^2.8
pololu/VL53L0X @ ^1.3.0
martin-ger/uMQTTBroker @ ^1.0.0
fastled/FastLED @ ^3.4.0
adafruit/MAX6675 library @ ^1.1.0

[env:nodemcuv2_ota]
platform = espressif8266@^2
board = nodemcuv2
board_build.mcu = esp8266
framework = arduino
monitor_speed = 115200
upload_protocol = espota
upload_port = rancilio
upload_flags =
--auth=${sysenv.OTAPASSWORD}
lib_ldf_mode = chain+
build_flags =
-include "rancilio-pid/RemoteDebugCfg.h"
lib_ignore =
WiFi
lib_deps =
joaolopesf/RemoteDebug @ ^3.0.5
#lebuni/ZACwire for TSic @ 1.3.3
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_esp32_support
olikraus/U8g2 @ ^2.28.8
blynkkk/Blynk @ ^1.0.0
blynkkk/Blynk @ ^1.0.1
knolleary/PubSubClient @ ^2.8
pololu/VL53L0X @ ^1.3.0
martin-ger/uMQTTBroker @ ^1.0.0
fastled/FastLED @ ^3.4.0
adafruit/MAX6675 library @ ^1.1.0

[env:esp32_usb]
platform = espressif32
platform = espressif32@^3
board = esp32dev
framework = arduino
monitor_speed = 115200
Expand All @@ -56,13 +71,14 @@ lib_deps =
#ZACwire for TSic beta=https://github.com/lebuni/ZACwire-Library#beta
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_esp32_support
olikraus/U8g2 @ ^2.28.8
blynkkk/Blynk @ ^1.0.0
blynkkk/Blynk @ ^1.0.1
knolleary/PubSubClient @ ^2.8
pololu/VL53L0X @ ^1.3.0
fastled/FastLED @ ^3.4.0
adafruit/MAX6675 library @ ^1.1.0

[env:esp32_ota_DEV]
platform = espressif32
platform = espressif32@^3
board = esp32dev
framework = arduino
monitor_speed = 115200
Expand All @@ -75,15 +91,16 @@ build_flags =
lib_deps =
joaolopesf/RemoteDebug @ ^3.0.5
#lebuni/ZACwire for TSic @ 1.3.3
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_automatic_handling_of_bitwindow
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_esp32_support
olikraus/U8g2 @ ^2.28.8
blynkkk/Blynk @ ^1.0.0
blynkkk/Blynk @ ^1.0.1
knolleary/PubSubClient @ ^2.8
pololu/VL53L0X @ ^1.3.0
fastled/FastLED @ ^3.4.0
adafruit/MAX6675 library @ ^1.1.0

[env:esp32_ota_LIVE]
platform = espressif32
platform = espressif32@^3
board = esp32dev
framework = arduino
monitor_speed = 115200
Expand All @@ -98,7 +115,8 @@ lib_deps =
#lebuni/ZACwire for TSic @ 1.3.3
ZACwire for TSic fix=https://github.com/medlor/ZACwire-Library#improve_esp32_support
olikraus/U8g2 @ ^2.28.8
blynkkk/Blynk @ ^1.0.0
blynkkk/Blynk @ ^1.0.1
knolleary/PubSubClient @ ^2.8
pololu/VL53L0X @ ^1.3.0
fastled/FastLED @ ^3.4.0
adafruit/MAX6675 library @ ^1.1.0
45 changes: 25 additions & 20 deletions rancilio-pid/MQTT.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,16 +28,20 @@ bool mqttReconnect(bool);
bool mqttPublish(char*, char*);
bool isMqttWorking();
void mqttPublishSettings();
bool persistSetting(char*, double*, char*);
bool persistSetting(char*, float*, char*);
bool persistSetting(char*, int*, char*);
bool persistSetting(char*, unsigned int*, char*);
void mqttParse(char*, char*);
void mqttParseActions(char* topic_str, char* data_str);
void mqttCallback1(char* topic, unsigned char* data, unsigned int length);
void mqtt_callback_2(uint32_t* client, const char* topic, uint32_t topic_len, const char* data, uint32_t length);

char* bool2string(bool in);
char* int2string(int state);
char* number2string(double in);
char* number2string(float in);
char* number2string(float in);
char* number2string(int in);
char* number2string(unsigned int in);

extern const char* mqttTopicPrefix;
extern const char* hostname;
Expand All @@ -63,27 +67,28 @@ extern char topicSet[256];
extern char topicActions[256];
extern unsigned long mqttConnectTime;
extern unsigned int mqttMaxIncrementalBackoff;
extern double brewtime;
extern double preinfusion;
extern double preinfusionpause;
extern double starttemp;
extern double setPoint;
extern double setPointSteam;
extern unsigned int profile;
extern float* activeBrewTime;
extern float* activePreinfusion;
extern float* activePreinfusionPause;
extern float* activeStartTemp;
extern float* activeSetPoint;
extern float setPointSteam;
extern int pidON;
extern double brewDetectionSensitivity;
extern double brewDetectionPower;
extern double aggoKp;
extern double aggoTn;
extern double aggoTv;
extern double aggKp;
extern double aggTn;
extern double aggTv;
extern double steadyPower;
extern double steadyPowerOffset;
extern float brewDetectionSensitivity;
extern float brewDetectionPower;
extern float aggoKp;
extern float aggoTn;
extern float aggoTv;
extern float aggKp;
extern float aggTn;
extern float aggTv;
extern float steadyPower;
extern float steadyPowerOffset;
extern unsigned int steadyPowerOffsetTime;
extern double steadyPowerMQTTDisableUpdateUntilProcessed;
extern float steadyPowerMQTTDisableUpdateUntilProcessed;
extern unsigned long steadyPowerMQTTDisableUpdateUntilProcessedTime;
extern double steadyPowerSaved;
extern float steadyPowerSaved;
extern unsigned long eepromForceSync;

#endif
Loading

0 comments on commit bcc9796

Please sign in to comment.