This commit is contained in:
2025-01-29 02:03:00 +01:00
parent 3f63b3ed98
commit 1741bb0b53
42 changed files with 278 additions and 194 deletions

View File

@@ -3,13 +3,26 @@ title: "Firmware Upload"
date: 2025-01-27
draft: false
description: "a description"
tags: ["example", "tag"]
tags: ["firmeware", "upload"]
---
an example to get you started
# This is a heading
## This is a subheading
### This is a subsubheading
#### This is a subsubsubheading
This is a paragraph with **bold** and *italic* text.
Check more at [Blowfish documentation](https://blowfish.page/)
undefined
# Prebuild
1. Download image from
2. todo something espflash tool here
# From source
## Preconditions
* rustup with current version
* espup with current version
* npm /npx
* Connect the board via usb to the computer
* Ensure the esp is running (eg not in deepsleep if prior version was installed)
# Compiling and uploading
1. Clone the gitea
2. go to the rust/src_webroot
3. npm -i
4. cd ..
5. cargo run
Depending on the setup of the cargo runner, either a OTA image is build or the firmware is directly flashed to the esp.
Note: If the bootloader is currently booting from ota_2, flashing ota_1 via usb will not make it switch. You might need to manually erase it in this case prior.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 247 KiB

View File

@@ -3,13 +3,27 @@ title: "ConfigMode"
date: 2025-01-27
draft: false
description: "a description"
tags: ["example", "tag"]
tags: ["config", "wifi"]
---
an example to get you started
# This is a heading
## This is a subheading
### This is a subsubheading
#### This is a subsubsubheading
This is a paragraph with **bold** and *italic* text.
Check more at [Blowfish documentation](https://blowfish.page/)
undefined
# Initial
If the config file is missing, or invalid the Emergency Rescue mode is started
In this case multiple Fault LEDS will be flashing and the esp will open an AccessPoint.
Connect to the AccessPoint and browse to http://192.168.71.1 to set it up
# During normal operation
1. Press the boot button untill the ESP shows that it is active.
2. The General fault LED will flash, keep pressing the button untill it stops
3. The ESP will now try to connect to a WIFI station if configured and start the webserver, if the connection to the station cannot be made, it will open an AccessPoint instead.
# MQTT
It is possible to use the topic /stay/alive to enter the config mode.
If this topic contains a retained message with the value true, the ESP will enter ConfigMode during it's next cycle and stay there.
Note: You must set /stay/alive to retained false again after this, otherwise it will always enter configmode, even if you exist it via the webui.
# USB reboot
By connecting to the USB Terminal via a Serial Monitor, the ESP is reset and will enter configmode as if the button for normal operation was pressed
# Reboot
When pressing reboot in configmode website, the esp will restart into the configmode newly saved settings. To exit configmode the exit button must be used.

Binary file not shown.

Before

Width:  |  Height:  |  Size: 98 KiB

After

Width:  |  Height:  |  Size: 165 KiB

View File

@@ -3,13 +3,25 @@ title: "MQTT"
date: 2025-01-27
draft: false
description: "a description"
tags: ["example", "tag"]
tags: ["mqtt", "esp"]
---
an example to get you started
# This is a heading
## This is a subheading
### This is a subsubheading
#### This is a subsubsubheading
This is a paragraph with **bold** and *italic* text.
Check more at [Blowfish documentation](https://blowfish.page/)
undefined
# MQTT
An Mqtt server can be configured and will be used to dump all kinds of statistical data.
|Topic|Example|Description|
|/firmware/address|
| Topic | Example | Description |
|----------------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------------------------------------------|
| firmware/address | 192.168.1.2 | The Ip address in station mode |
| firmware/githash | feature/esp32c6@1ce4d74a | The branch and hash during build time |
| firmware/buildtime | 2025-01-21T20:56:18.168163570Z | Compile time |
| firmware/last_online | 2025-01-22T08:56:46.664+01:00 | Last time this board was online |
| firmware/ota_state | Partition state is ESP_OTA_IMG_VALID | The OTA state, relevant for rollback |
| firmware/partition_address | 0x10000 | The OTA partition used, 0x10000 is ota_1 |
| state | online | Current State, expected are online or sleep |
| battery | {<br/>"voltage_milli_volt":"12860",<br/>"current_milli_ampere":"-16",<br/>"cycle_count":"12",<br/>"design_milli_ampere":"6000",<br/>"remaining_milli_ampere":"806",<br/>"state_of_charge":"15",<br/>"state_of_health":"93",<br/>"temperature":"2957"<br/>} | Dump of battery data |
| water | {<br/>"enough_water":true,<br/>"warn_level":false,<br/>"left_ml":1337,<br/>"sensor_error":false,<br/>"raw":0,"water_frozen":<br/>"tank sensor error"<br/>} | Water Status dump |
| plant1 | {<br/>"a":"disabled",<br/>"a_raw":"0",<br/>"b":"disabled",<br/>"b_raw":"0",<br/>"mode":"OFF",<br/>"consecutive_pump_count":0,<br/>"dry":false,<br/>"active":false,<br/>"pump_error":false,<br/>"not_effective":false,<br/>"cooldown":false,<br/>"out_of_work_hour":false,<br/>"last_pump":"N/A",<br/>"next_pump":"N/A"<br/>} | Plant status dump |
| light | {<br/>"active":false,<br/>"out_of_work_hour":true,<br/>"battery_low":true,<br/>"is_day":false<br/>} | Light status dump |
| deepsleep | night 1h | Why and how long the ESP will sleep |

View File

@@ -2,14 +2,13 @@
title: "Software"
date: 2025-01-24
draft: false
description: "a description"
tags: ["example", "tag"]
description: "Information about the Firmware"
tags: ["software"]
---
an example to get you started
# This is a heading
## This is a subheading
### This is a subsubheading
#### This is a subsubsubheading
This is a paragraph with **bold** and *italic* text.
Check more at [Blowfish documentation](https://blowfish.page/)
undefined
* esp-idf-hal based rust project
* can be run standalon or with wifi
* MQTT
* SNTP to sync the RTC/Clock
* Abitrary file upload and download into SPIFS volume
* Flash Battery Controller from file in Flash
* Flash Firmware via OTA directly from website

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.5 MiB