Skip to content
Merged

0.7 #21

Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/pio-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ jobs:
uses: karniv00l/platformio-run-action@v1
with:
environments: "pressure-32s3_mini,pressure-32s2_mini,pressure-32c3_pico"
jobs: 6
jobs: 1
silent: false
verbose: true
disable-auto-clean: false
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,5 @@ src_docs/.env/
src_docs/_build
fp-*
_autosave*
*.bak
*.bak
idf_*
Binary file added 3d/Pressuremon case.3mf
Binary file not shown.
Binary file added 3d/Pressuremon lid.3mf
Binary file not shown.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,9 @@
![pr](https://img.shields.io/github/issues-pr/mp-se/pressuremon)
![dev_build](https://img.shields.io/github/actions/workflow/status/mp-se/pressuremon/pio-build.yaml?branch=dev)
![doc_build](https://img.shields.io/github/actions/workflow/status/mp-se/pressuremon/doc-build.yaml?branch=master)
![License](https://img.shields.io/github/license/mp-se/pressuremon)
![GitHub Stars](https://img.shields.io/github/stars/mp-se/pressuremon)
![Last Commit](https://img.shields.io/github/last-commit/mp-se/pressuremon)

# Pressure Monitor for Beer Brewing

Expand All @@ -18,6 +21,8 @@ The documentation can be found [here](https://mp-se.github.io/pressuremon/)

PCB design is located [here](https://github.com/mp-se/pcb-designs/)

3D models for a case can be found in the 3d directory on github.

If you want to support my work you can do that through these options

[<img src="https://gravitymon.com/images/buymecoffee.png" height=40>](https://www.buymeacoffee.com/mpse/) [<img src="https://img.shields.io/static/v1?label=Sponsor&message=%E2%9D%A4&logo=GitHub&color=%23fe8e86" height=40>](https://github.com/sponsors/mp-se)
Binary file modified bin/firmware32c3pico.bin
Binary file not shown.
Binary file modified bin/firmware32s2mini.bin
Binary file not shown.
Binary file modified bin/firmware32s3mini.bin
Binary file not shown.
Binary file modified html/app.css.gz
Binary file not shown.
Binary file modified html/app.js.gz
Binary file not shown.
Binary file modified html/favicon.ico.gz
Binary file not shown.
35 changes: 18 additions & 17 deletions platformio.ini
Original file line number Diff line number Diff line change
Expand Up @@ -17,26 +17,28 @@ include_dir = lib
upload_speed = 460800
monitor_speed = 115200
; ESP32 - Arduino 2.x
platform32 = espressif32@6.11.0
platform2 = espressif32@6.11.0
partitions = part32.csv # For arduino 2.x
; ESP32 - Arduino 3.x
; platform32 = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip # Arduino 3.x
; platform32 = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.31/platform-espressif32.zip # Arduino 3.x
; ESP32 - Arduino 3.x - currently too large for the current flash layout
; platform3 = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.35/platform-espressif32.zip
; platform3 = https://github.com/pioarduino/platform-espressif32/releases/download/55.03.32/platform-espressif32.zip
; platform3 = https://github.com/pioarduino/platform-espressif32/releases/download/54.03.20/platform-espressif32.zip # Arduino 3.x
; partitions = part32_2.0Mb.csv # For arduino 3.x (0x1f0000 app size)
build_unflags =
build_flags =
-Wl,-Map,output.map
-Os
-g0
-Wno-pedantic
-D CORE_DEBUG_LEVEL=0
-D BAUD=${common_env_data.monitor_speed}
-D USE_LITTLEFS=true
-D PRESSUREMON=1
-D CFG_APPNAME="\"pressuremon\""
-D CFG_APPVER="\"0.7.0\""
-D CFG_GITREV=\""beta-2\""
; -D CFG_GITREV=\""dev-1\""
!python script/git_rev.py
; -D CORE_DEBUG_LEVEL=5
; !python script/git_rev.py
; -D SKIP_SLEEPMODE=1
; -D COLLECT_PERFDATA=1
; -D CORE_DEBUG_LEVEL=2
Expand All @@ -51,19 +53,19 @@ build_flags =
build_src_flags =
-Wno-c++11-extensions
lib_deps =
https://github.com/mp-se/espframework#1.2.7
https://github.com/mp-se/gravitymon#v2.3.0-build1
https://github.com/mp-se/espframework#1.2.12
https://github.com/mp-se/gravitymon#v2.4.0-dev1
https://github.com/wollewald/ADS1115_WE#1.5.4
https://github.com/bblanchon/ArduinoJson#v7.4.2
https://github.com/256dpi/arduino-mqtt#v2.5.2
https://github.com/ESP32Async/ESPAsyncWebServer#v3.8.1
https://github.com/pstolarz/OneWireNg#0.14.0
https://github.com/ESP32Async/ESPAsyncWebServer#v3.9.3
https://github.com/pstolarz/OneWireNg#0.14.1
https://github.com/pstolarz/Arduino-Temperature-Control-Library.git#d2d70abe03299650b860e8ef74d7322d3f305cad
https://github.com/ThingPulse/esp8266-oled-ssd1306#4.6.1
https://github.com/stevemarple/SoftWire#v2.0.10
https://github.com/stevemarple/AsyncDelay#v1.1.2
https://github.com/ESP32Async/AsyncTCP#v3.4.8
https://github.com/h2zero/NimBLE-Arduino#2.3.6
https://github.com/ESP32Async/AsyncTCP#v3.4.9
https://github.com/h2zero/NimBLE-Arduino#2.3.7
extra_scripts =
pre:script/board.py
script/copy_firmware.py
Expand All @@ -79,7 +81,7 @@ html_files =
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
framework = arduino
platform = ${common_env_data.platform32}
platform = ${common_env_data.platform2}
extra_scripts = ${common_env_data.extra_scripts}
build_unflags = ${common_env_data.build_unflags}
build_flags =
Expand All @@ -103,7 +105,7 @@ monitor_filters = esp32_exception_decoder
[env:pressure-32s3_mini]
; ESP32-S3 Mini - Full featured with BLE, dual I2C, second sensor support
framework = arduino
platform = ${common_env_data.platform32}
platform = ${common_env_data.platform2}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts =
Expand Down Expand Up @@ -131,7 +133,7 @@ board_build.embed_txtfiles = ${common_env_data.html_files}
[env:pressure-32s2_mini]
; ESP32-S2 Mini - Single I2C (SoftWire for second sensor), no BLE, USB CDC
framework = arduino
platform = ${common_env_data.platform32}
platform = ${common_env_data.platform2}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts =
Expand Down Expand Up @@ -161,7 +163,7 @@ monitor_filters = esp32_exception_decoder
[env:pressure-32c3_pico]
; ESP32-C3 Pico - Compact board with BLE, single I2C (SoftWire for second sensor)
framework = arduino
platform = ${common_env_data.platform32}
platform = ${common_env_data.platform2}
upload_speed = ${common_env_data.upload_speed}
monitor_speed = ${common_env_data.monitor_speed}
extra_scripts =
Expand Down Expand Up @@ -189,4 +191,3 @@ board_build.partitions = ${common_env_data.partitions}
board_build.filesystem = littlefs
board_build.embed_txtfiles = ${common_env_data.html_files}
monitor_filters = esp32_exception_decoder

53 changes: 3 additions & 50 deletions src/ble_pressuremon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,63 +40,16 @@ void BleSender::init() {
_initFlag = true;
}

/*void BleSender::sendEddystoneData(float battery, float tempC, float
pressurePsi, float pressurePsi1) { Log.info(F("Starting eddystone data
transmission" CR));

char beacon_data[25];

uint16_t p = pressurePsi * 100;
uint16_t p1 = pressurePsi1 * 100;
uint16_t t = tempC * 1000;
uint16_t b = battery * 1000;
uint32_t chipId = 0;

for (int i = 0; i < 17; i = i + 8) {
chipId |= ((ESP.getEfuseMac() >> (40 - i)) & 0xff) << i;
}

beacon_data[0] = 0x20; // Eddystone Frame Type (Unencrypted Eddystone-TLM)
beacon_data[1] = 0x00; // TLM version
beacon_data[2] = (b >> 8);
beacon_data[3] = (b & 0xFF);
beacon_data[4] = (t >> 8);
beacon_data[5] = (t & 0xFF);
beacon_data[6] = (p >> 8);
beacon_data[7] = (p & 0xFF);
beacon_data[8] = (p1 >> 8);
beacon_data[9] = (p1 & 0xFF);
beacon_data[10] = ((chipId & 0xFF000000) >> 24);
beacon_data[11] = ((chipId & 0xFF0000) >> 16);
beacon_data[12] = ((chipId & 0xFF00) >> 8);
beacon_data[13] = (chipId & 0xFF);

BLEAdvertisementData advData = BLEAdvertisementData();
BLEAdvertisementData respData = BLEAdvertisementData();

respData.setFlags(0x06);
respData.setCompleteServices(BLEUUID("feaa"));
respData.setServiceData(BLEUUID("feaa"), std::string(beacon_data, 14));

advData.setName("pressuremon");
_advertising->setAdvertisementData(advData);
_advertising->setScanResponseData(respData);

_advertising->start();
delay(_beaconTime);
_advertising->stop();
}*/

void BleSender::sendCustomBeaconData(float battery, float tempC,
float pressurePsi, float pressurePsi1) {
Log.info(F("Starting custom beacon data transmission" CR));

_advertising->stop();

uint16_t p = pressurePsi * 100;
uint16_t p1 = pressurePsi1 * 100;
uint16_t p = isnan(pressurePsi) ? 0xffff : pressurePsi * 100;
uint16_t p1 = isnan(pressurePsi1) ? 0xffff : pressurePsi1 * 100;
uint16_t t = tempC * 1000;
uint16_t b = battery * 1000;
uint16_t b = isnan(battery) ? 0xffff : battery * 1000;
uint32_t chipId = 0;

for (int i = 0; i < 17; i = i + 8) {
Expand Down
2 changes: 0 additions & 2 deletions src/ble_pressuremon.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,6 @@ class BleSender {
void init();

// Beacons
/*void sendEddystoneData(float battery, float tempC, float pressurePsi,
float pressurePsi1);*/
void sendCustomBeaconData(float battery, float tempC, float pressurePsi,
float pressurePsi1);
};
Expand Down
8 changes: 4 additions & 4 deletions src/main_pressuremon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -421,12 +421,12 @@ void loopPressureOnInterval() {

#if defined(ENABLE_SECOND_SENSOR)
Log.notice(
F("Loop: Pressure=%F, Pressure2=%F, Battery=%F." CR),
myPressureSensor.getPressurePsi(), myPressureSensor1.getPressurePsi(), myBatteryVoltage.getVoltage());
F("Loop: Pressure=%F, Pressure2=%F, Temp=%F, Battery=%F." CR),
myPressureSensor.getPressurePsi(), myPressureSensor1.getPressurePsi(), myTempSensor.getTempC(), myBatteryVoltage.getVoltage());
#else
Log.notice(
F("Loop: Pressure=%F, Battery=%F." CR),
myPressureSensor.getPressurePsi(), myBatteryVoltage.getVoltage());
F("Loop: Pressure=%F, Temp=%F, Battery=%F." CR),
myPressureSensor.getPressurePsi(), myTempSensor.getTempC(), myBatteryVoltage.getVoltage());
#endif
}
}
Expand Down
4 changes: 3 additions & 1 deletion src/web_pressuremon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,9 @@ void PressuremonWebServer::doWebStatus(JsonObject &obj) {
temp = convertCtoF(temp);
}

obj[PARAM_TEMP] = serialized(String(temp, DECIMALS_TEMP));
if(!isnan(temp)) {
obj[PARAM_TEMP] = serialized(String(temp, DECIMALS_TEMP));
}

obj[CONFIG_PRESSURE_UNIT] = myConfig.getPressureUnit();
obj[PARAM_TEMP_UNIT] = String(myConfig.getTempUnit());
Expand Down
2 changes: 1 addition & 1 deletion src_docs/source/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Welcome to PressureMon
######################

.. note::
This documentation reflects **v0.6.0 - development**. Last updated 2025-06-08
This documentation reflects **v0.7.0**. Last updated 2025-12-28


What is PressureMon?
Expand Down
12 changes: 12 additions & 0 deletions src_docs/source/releases.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,18 @@
Releases
########

v0.7.0
======

* Fixed BLE data format when sensor is not available. When data is invalid send 0xffff in the ble payload to indicate that.
* Updated dependencies to latest versions.
* Fixed battery reading setup
* Added meta data to mDNS broadcast (app, version, id), used by GravityMon Gateway to map device id towards name when using BLE.
* Updated code to use NAN instead of -273 as invalid temperature
* Split hardware view into hardware and sensor view for better clarity.
* Updated file view to improve display of device files
* Added 3d model for a case that fits my PCB.

v0.6.0
======

Expand Down