BresserWeatherSensorLW
Bresser 868 MHz Weather Sensor Radio Receiver based on ESP32/RP2040 and SX1262/SX1276/LR1121 - sends data to a LoRaWAN Network
Loading...
Searching...
No Matches
LoadNodeCfg.h
Go to the documentation of this file.
1
2// LoadNodeCfg.cpp
3//
4// Load LoRaWAN node configuration 'node_config.json' from LittleFS, if available
5//
6// This configuration file is intended for hardware/deployment environment
7// specific settings (e.g. battery voltage thresholds, timezone)
8//
9// created: 07/2024
10//
11//
12// MIT License
13//
14// Copyright (c) 2024 Matthias Prinke
15//
16// Permission is hereby granted, free of charge, to any person obtaining a copy
17// of this software and associated documentation files (the "Software"), to deal
18// in the Software without restriction, including without limitation the rights
19// to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
20// copies of the Software, and to permit persons to whom the Software is
21// furnished to do so, subject to the following conditions:
22//
23// The above copyright notice and this permission notice shall be included in all
24// copies or substantial portions of the Software.
25//
26// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
27// IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
28// FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
29// AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
30// LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
31// OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
32// SOFTWARE.
33//
34//
35// History:
36//
37// 20240725 Created
38// 20240729 Added PowerFeather specific configuration
39// 20240804 Added max_charge_current
40// 20250827 Changed battery_low to voltage_critical
41// Changed battery_weak to voltage_eco_enter/exit
42// 20251017 Added soc_eco_enter/exit
43// 20251031 Added M5Stack configuration
44//
45// ToDo:
46// -
47//
49
56
57#include <Arduino.h>
58#include <LittleFS.h>
59#include <ArduinoJson.h>
60#include "../BresserWeatherSensorLWCfg.h"
61#include "logging.h"
62
94void loadNodeCfg(
95 String &tzinfo,
96 uint16_t &voltage_eco_exit,
97 uint16_t &voltage_eco_enter,
98 uint16_t &voltage_critical,
99 uint16_t &batt_discharge_lim,
100 uint16_t &batt_charge_lim,
101 struct sPowerFeatherCfg &powerFeatherCfg,
102 struct sM5StackCfg &m5StackCfg
103);
void loadNodeCfg(String &tzinfo, uint16_t &voltage_eco_exit, uint16_t &voltage_eco_enter, uint16_t &voltage_critical, uint16_t &batt_discharge_lim, uint16_t &batt_charge_lim, struct sPowerFeatherCfg &powerFeatherCfg, struct sM5StackCfg &m5StackCfg)
Load LoRaWAN node configuration 'node_config.json' from LittleFS, if available.
Definition LoadNodeCfg.cpp:55
Replacement for esp32-hal-log.h on RP20240.