esp32projects
20 months agoa few moderate changes
jweigele [Mon, 19 Feb 2024 21:39:56 +0000 (13:39 -0800)]
a few moderate changes

Features:
 * Support version string emission, once per hour to
   esp32/sensor_version
 * Set every PWM LED GPIO invididually if it's != -1 (now supports all 6
   channels)

Bugfix:
 * Never sleep negative time if you waited too long already (which since
   it's a uint I think just becomes very positive and sleeps almost
   forever)

Ehh:
 * Some attempted changes around repolling and rechecking motion
   settings
 * Pull-down back to enabled because we're using the big PIR sensors
 * Hysteresis enabled to prevent spamming of the channel

20 months agoSome random tune-ups for aqi
jweigele [Tue, 30 Jan 2024 01:14:42 +0000 (17:14 -0800)]
Some random tune-ups for aqi

 * BIG fix for openthread routing on FTDs - we just weren't configuring
   all the required parameters and so it would work fine as a child, but
   never promote.  To keep that from being hardcoded we're now using the
   menuconfig defines under "Openthread" platform data or whatever
 * Remove esp32-wifi-manager for now, it had its own mDNS implementation
   and I just didn't want to deal (will prob add it back later)
 * PWM features around tuning, both frequency and target parsed from
   JSON, auto-selects the widest duty resolution too
 * A messy recheck GPIO feature for motion detection. It doesn't really
   work and I need to figure a better way to drain spurious activations
 * Disabled CONFIG_PM_ENABLE temporarily but we can bring it back I'm
   sure

21 months agoVery simple PWM control over OT for esp32 device
jweigele [Mon, 15 Jan 2024 02:52:44 +0000 (18:52 -0800)]
Very simple PWM control over OT for esp32 device

 * Works for first set of RGB LEDs (control over mosfet)
 * Configurable for GPIO but second set not active yet
 * Needs conditional logic for which GPIO is enabled +
   some gamma correction probably

21 months agoAQI features and changes
jweigele [Sun, 14 Jan 2024 21:07:41 +0000 (13:07 -0800)]
AQI features and changes

Features:
 * Internal temperature sensor reporting
 * Uptime reporting
 * Motion sensor detect for 1 or 2 devices, interrupt triggered

Other changes:
 * Generic report framework
 * Report MAC addy at start
 * More configurable openthread params
 * Migrated some include defines to kconfig (still pretty messy)
 * Semaphore guarded send task, so we don't stomp on various reports
 * Tuning on connection/keepalive behavior in MQTT for better stability
 * Include MAC in MQTT ID for better remote identification

2 years agosome tuning for openthread loops
jweigele [Wed, 13 Sep 2023 21:37:25 +0000 (14:37 -0700)]
some tuning for openthread loops

2 years agoFirst edition of openthread for aqi!
jweigele [Tue, 5 Sep 2023 05:34:15 +0000 (22:34 -0700)]
First edition of openthread for aqi!

 * Connects through the same MQTT path as wifi
 * Lots of weirdly named and structured functions to support
 * Only uses the default "nvs" partition right now

However!
 * Reconnect works fine both taking down the BR and restarting rabbitmq
 * All the normal update functions work by default (because same as
   wifi)

2 years agotestot connects with MQTT directly over an IP, and just sends uptime
jweigele [Mon, 4 Sep 2023 17:48:51 +0000 (10:48 -0700)]
testot connects with MQTT directly over an IP, and just sends uptime

2 years agotest openthread - basic join/ping stuff
jweigele [Mon, 4 Sep 2023 15:43:16 +0000 (08:43 -0700)]
test openthread - basic join/ping stuff

2 years agolight sleep stubs and timing info
jweigele [Mon, 28 Aug 2023 05:11:24 +0000 (22:11 -0700)]
light sleep stubs and timing info

2 years agoand now, fix the bugs on the wifi side (mainly heap running out due to not freeing...
jweigele [Tue, 18 Jul 2023 14:57:34 +0000 (07:57 -0700)]
and now, fix the bugs on the wifi side (mainly heap running out due to not freeing a string)

2 years agoUptime reporting, bugfixes in zigbee erase, and optional router caps
jweigele [Mon, 17 Jul 2023 18:57:21 +0000 (11:57 -0700)]
Uptime reporting, bugfixes in zigbee erase, and optional router caps

2 years agofix some errors when compiling with zigbee
jweigele [Mon, 17 Jul 2023 14:50:11 +0000 (07:50 -0700)]
fix some errors when compiling with zigbee

2 years agoLED indicator for different AQI bands, and user erase button
jweigele [Sun, 16 Jul 2023 00:04:36 +0000 (17:04 -0700)]
LED indicator for different AQI bands, and user erase button

 * LED indicator does the green/yellow/orange/red according to air
   quality
 * user erase button wipes wifi data (always) and zigbee data (if
   configured)
 * requires a new component taken from the esp sdk "light_driver",
   included
 * partitions changed slightly in anticipation of eventual encryption

2 years agoBetter (best?) reconnect behavior on MQTT for wifi, and some very coarse allowed...
jweigele [Sat, 15 Jul 2023 19:34:00 +0000 (12:34 -0700)]
Better (best?) reconnect behavior on MQTT for wifi, and some very coarse allowed value ranges for reporting

ALSO, do not report the frickin SSID password on every boot because come
ON

2 years agoslight tuning on partition size and cleanup of some vars
jweigele [Sat, 15 Jul 2023 06:01:03 +0000 (23:01 -0700)]
slight tuning on partition size and cleanup of some vars

2 years agowifi component enabling for aqi
jweigele [Sat, 15 Jul 2023 05:47:27 +0000 (22:47 -0700)]
wifi component enabling for aqi

 * uses esp32-wifi-manager as a component
 * tries to connect through mqtt and publish to a topic
 * few more Kconfig items to match various options
 * probably not very robust yet, very little error handling

2 years agoRefactor to provide optional components, and add LED display functions
jweigele [Fri, 14 Jul 2023 20:11:31 +0000 (13:11 -0700)]
Refactor to provide optional components, and add LED display functions

 * Mostly, optional right now is CONFIG_TEMP_ENABLED
 * LED display took a huge amount of pain getting working, made a
   separate repo for the component mods

2 years agoReport both pm25 *and* pm10, and average temperature across time
jweigele [Thu, 13 Jul 2023 17:30:02 +0000 (10:30 -0700)]
Report both pm25 *and* pm10, and average temperature across time

 * add pm10 as a discrete value, and create an overall struct to hold
   both data types (pmbuffer) and average
 * make the temp list an actual ring buffer too, for use in
   flattening/averaging out temperature values like is currently done on
   pico
 * memmem for searching a value worked better, and the strstr variant
   was buggy for whatever reason

2 years agorename source files in aqi to better represent it
jweigele [Thu, 13 Jul 2023 15:13:30 +0000 (08:13 -0700)]
rename source files in aqi to better represent it

2 years agoreport and send average (over 1 min) pm25 for aqi
jweigele [Thu, 13 Jul 2023 15:06:53 +0000 (08:06 -0700)]
report and send average (over 1 min) pm25 for aqi

2 years agoNeeded to update submodule to track correct branch
jweigele [Thu, 13 Jul 2023 01:03:40 +0000 (18:03 -0700)]
Needed to update submodule to track correct branch

2 years agoBasic implemention of pm25 detection over uart
jweigele [Wed, 12 Jul 2023 07:51:20 +0000 (00:51 -0700)]
Basic implemention of pm25 detection over uart

 * Everything is very messy, function names, reports double, etc!
 * Does report both pm25 and temperature, but requires additions to
   zigbee2mqtt in order to function

2 years agocommented out some unused functions, and added currently disabled light sleep (waitin...
jweigele [Wed, 12 Jul 2023 03:02:42 +0000 (20:02 -0700)]
commented out some unused functions, and added currently disabled light sleep (waiting for support)

2 years agoInitial commit of esp32 zigbee codebase, just does simple temperature polling in...
root [Sun, 9 Jul 2023 18:13:42 +0000 (18:13 +0000)]
Initial commit of esp32 zigbee codebase, just does simple temperature polling in a sleep