48 Commits

Author SHA1 Message Date
Will Miles
4f48ddfaec Replace SET_F with F in usermods
Since oappend() is now strongly typed, pass the correct type.  This is a
step towards removing the extra shim logic on ESP8266.
2024-10-23 21:35:30 -04:00
Will Miles
2e01fe0b5b Revert "Replace SET_F with F in usermods"
This reverts commit 7d067d8c305c3c6f397b6863f6849659a0aadd24.
2024-10-23 21:34:35 -04:00
Will Miles
7d067d8c30 Replace SET_F with F in usermods
Since oappend() is now strongly typed, pass the correct type.  This is a
step towards removing the extra shim logic on ESP8266.
2024-10-23 21:28:21 -04:00
Blaz Kristan
b50e6e0d90 Static PinManager & UsermodManager
- saves a few bytes of flash
2024-09-19 21:44:11 +02:00
Maximilian Mewes
2d6365dc6a Add HA-discovery as config option 2024-08-20 12:37:01 +02:00
Maximilian Mewes
cc24119a59 remove unnecessary comments 2024-08-19 22:22:46 +02:00
Maximilian Mewes
b8f15333d8 update readme.md 2024-08-19 22:12:21 +02:00
Maximilian Mewes
e5a426419c Improve mqtt support, add battery percentage and voltage 2024-08-19 22:07:08 +02:00
Niklas Fäth
f6ed3bc9db
Fix typo in "Battery" usermod (Build Failed) 2024-07-11 13:56:33 +02:00
Adam Matthews
19ccff9ff1
Merge branch '0_15' into 0_15_battery_usermod_readme 2024-05-15 22:15:18 +01:00
Adam Matthews
6b8d8bf735 Update Battery usermod documentation
Improved wiring, installation and calibration instructions.

Example screenshots added.

Minor grammar improvements.

Heading visual consistency improved.

Improved vertical separation between sections
(separator lines added).

Thankyou!
2024-05-11 13:34:35 +01:00
Adam Matthews
bc5aadff7d Update Usermod: Battery
Issue:
When taking the initial voltage reading after first powering on, voltage hasn't had chance to stabilize so the reading can be inaccurate, which in turn may incorrectly trigger the low-power preset. (Manifests when the user has selected a low read interval and/or is using a capacitor).

Resolution:
A non-blocking, fixed 10 second delay has been added to the initial voltage reading to give the voltage time to stabilize.

This is a reworked version of the (now closed) PR here:
https://github.com/Aircoookie/WLED/pull/3959

- Rebased the update for 0_15.

- Added a constant so the delay can be modified via my_config.h.

- Small adjustments to make the PR compatible again after the recent restructuring in this PR: (https://github.com/Aircoookie/WLED/pull/3003).

Thankyou!
2024-05-09 23:09:45 +01:00
Maximilian Mewes
52020cbe26 CP fix 2024-05-06 17:46:26 +02:00
Maximilian Mewes
d33651c25b Update setup method 2024-05-06 17:45:02 +02:00
Maximilian Mewes
18e9f9c304 Rename Battery classes 2024-05-06 17:39:40 +02:00
Maximilian Mewes
05a8c692f2 read initial voltage correctly 2024-04-30 18:11:18 +02:00
Maximilian Mewes
2245ee6fce bugfixes 2024-04-30 17:02:57 +02:00
Maximilian Mewes
a13f1a9bee bug fixes 2024-04-30 15:24:02 +02:00
Maximilian Mewes
3cc60fa4d4 Merge branch 'main' into usermod-battery-update2023 2024-04-30 15:01:23 +02:00
Maximilian Mewes
bd69c24231 intermediate update 2024-04-30 14:54:53 +02:00
Frank
dbe8554724 code spell checking - part3 (usermods)
if you can spell Fahrenheit, you can't spell Celsius. And vice versa :-)
2023-12-14 03:52:06 +01:00
Maximilian Mewes
a9d6a15924 Update Classes 2023-09-09 21:50:30 +02:00
Maximilian Mewes
b8c61b5236 Move battery types to a separate folder 📁 2023-09-09 21:01:55 +02:00
Maximilian Mewes
b77e1eb94b Merge remote-tracking branch 'origin/main' into usermod-battery-update2023 2023-09-08 23:17:23 +02:00
Frank
52c4093fb0
minor bugfix for usermod_v2_Battery.h
missing semicolon - caused compile errorsin debug mode.
2023-05-08 20:59:57 +02:00
Erwin Repolust
2c3fa0fd8f added function for voltage reads 2023-03-16 01:33:57 +01:00
Erwin Repolust
ec08432f92 added voltage multiplier to gui and set defaults 2023-03-14 01:44:41 +01:00
Erwin Repolust
8b61b9ebfe Added code for esp8266 2023-03-10 01:28:04 +01:00
Erwin Repolust
e00e778bce Less operations and better readable 2023-03-08 03:54:48 +01:00
Erwin Repolust
81e70925c4 Changed to running average to improve accuracy 2023-03-08 03:24:16 +01:00
Maximilian Mewes
f78f8b6b12 Exposing the Battery state to JSON API - Part 2 2023-01-21 01:44:50 +01:00
Maximilian Mewes
f97b79bc16 Exposing the Battery state to JSON API - Part 1 2023-01-21 00:39:51 +01:00
Maximilian Mewes
42c8a77755 Merge branch 'main' into usermod-battery-update2023 2023-01-20 23:25:13 +01:00
Maximilian Mewes
bb82bf762f Update Readme, my_config type config options with examples 2023-01-12 21:50:46 +01:00
Blaz Kristan
d78bef72ea Disable MQTT more.
Disable Alexa more.
2023-01-12 20:35:34 +01:00
Maximilian Mewes
d16f9efeec Added forgotten file 😥 2023-01-06 19:09:12 +01:00
Maximilian Mewes
8ba5dfe447 Another Bugfx 🧑‍🔧 2023-01-06 19:07:39 +01:00
Maximilian Mewes
3759071449 Fix previous bug again 🐛, Add Type Dropdown to config page 2023-01-06 17:00:29 +01:00
Maximilian Mewes
85d59945a0 runtime exception fix 🐛 2023-01-06 00:19:16 +01:00
Maximilian Mewes
4c8b490c89 minor changes 2023-01-05 20:38:55 +01:00
Maximilian Mewes
8dd1745149 Add base battery 🔋 class, Add Lipo, Lion class 2023-01-05 19:48:53 +01:00
Frank
35832b07b9 UM Battery: basic support for LiPo cells
* Lipo cells (1S) should not be discharged below 3V
* LiPo cells have a different voltage/discharge rate curve
2023-01-04 19:57:33 +01:00
Frank
357683cbb9 UM Battery: more bugfixing, and improvements for esp32
- improved support for esp32 (read calibrated voltage)
- corrected config saving (measurement pin, and battery min/max were lost)
2023-01-04 17:30:08 +01:00
Frank
15bc6159f9 UM Battery: fix for deprecated function call
wled00/../usermods/Battery/usermod_v2_Battery.h:446:48: warning: 'void PinManagerClass::deallocatePin(byte)' is deprecated: Replaced by two-parameter deallocatePin(gpio, ownerTag)
2023-01-04 12:54:02 +01:00
Frank
7cdafa76a5 UM Battery - improvements for esp32
* added missing pinMode(.., INPUT) on esp32
* do not try reading from pin = -1 (ESP32-S2 shows very allergic reactions to this)
* Info page - show "n/a" when pin = -1
* readme: esp32 default pin = 35
2023-01-04 12:32:31 +01:00
Blaz Kristan
90463d8613 Battery UM fix for MQTT voltage topic. 2023-01-03 17:14:24 +01:00
Frank
4a09e18d9a
UM Battery: fix compilation error + bad snprintf 2023-01-02 22:52:37 +01:00
Maximilian Mewes
73440e2287
Update Usermod Battery (#2975)
* auto-off feature and usermod rename
* low-power-indicator, voltage fine tuning, clean-up

* corrected small mistakes
* Bugfixes, added usermod logo, update readme
* minor changes, implemented change requests, optimizationz
2022-12-28 22:40:13 +01:00