Alright, apologies for my earlier post, I jumped the gun too soon. But the below config appears to work for the light sensor. It seems it takes a while for the BH1750 to show up on the i2c bus and ESPHome boot timing will miss it unless you use the setup_priority function on a few components.
I’m using a 1000mAh lipo on these. While the config posted (60s on, 1h off) wouldn’t last much more that a day or so, I am currently doing some power testing on a 60s on, 4hr off config and it looks like I’m getting about 1-2 weeks of battery life.
I’m currently building a little solar charging setup to attach to the sensor so that it tops off the sensor battery during the day so that it can run it continuously.
I’m looking to do an improved version of this board, i2c everything where possible and support better (100% RH) and additional external sensors (ds18b20 or another sht30/31/35) and maybe swap lux sensor for LDR, and inspired by the feather S2 im going to have the power supply to sensors controlled to off by using a second dedicated sensor LDO with enable pin tied to gpio.
My needs also tempt me to add a low current relay with power sense for DC up to ²⁶volt using the INA219 to control a valve per device.
Will keep you in the loop as am on nodered right now but wish to get HA running comfortably
how would it be with more deep sleep sets??
Is this possible?
Like set deep_sleep1 4h if soil 70%
and deep_sleep2 2h if soil 40% and so on…
but this should be automated from ha or node red I guess so the deep_sleep trigger comes from outside esp?
Dont know how to code it, Im relative new in this area…
I imagine that you could use a combination of global variables and lambdas to make updates to the sleep interval during each wake period. That’s my unofficial guess just by looking at the docs. You might try hitting up the Discord channel.
On the one i have, the sensors are directly attached to power and not controlled by the ESP. this is the main cause of power loss. No matter how much you put it to sleep, the battery drops like a rock. i would suspect this might be suffering from a similar issue.
On the ESP32, you have the option of waking up on any RTC pin. However, there’s one scenario that you need to tell ESPHome how to handle: What if the wakeup pin is already in the state with which it would wake up when the deep sleep should start? There are three ways of handling this using the wakeup_pin_mode option:
IGNORE (Default): Ignore the fact that we will immediately exit the deep sleep mode because the wakeup pin is already active.
KEEP_AWAKE : Keep the ESP32 awake while the wakeup pin is still active. Or in other words: defer the activation of the deep sleep until the wakeup pin is no longer active.
INVERT_WAKEUP : When deep sleep was set up to wake up on a HIGH signal, but the wakeup pin is already HIGH, then re-configure deep sleep to wake up on a LOW signal and vice versa. Useful in situations when you want to use observe the state changes of a pin using deep sleep and the ON/OFF values last longer.
…On the ESP32, you additionally have the option to wake up on any RTC pin ( GPIO0 , GPIO2 , GPIO4 , GPIO12 , GPIO13 , GPIO14 , GPIO15 , GPIO25 , GPIO26 , GPIO27 , GPIO32 , GPIO39 ).
I think this might be the earlier version? The version of the board that I have has an enable pin on one of the 3.3v regulators that feeds the sensors. It’s connected to GPIO4, referred in the config above as Sensor Power/spower. I make sure to turn that off before shutting down.
Thanks for the info
I don’t know about the others in this thread, but my goal is to use the higrow with esphome and not have to manage a clean code by ardruino ide…
would be nice if it work to convert the orginal bin of the seller to a esphome yaml, so we could see what are the breaking differences
I did look into the ESPHome, but that was too Chinese to me.
I and BeardedTinker is working on to get the mqtt autodiscover to work with the module, so all the configuration yaml code will disappear.
This will be the version 2.0.
Version 2.0 of the INO sketch will be a one only, meaning, that no matter how many modules you have, you only need one sketch.
For anyone reading this trying to get this to integrate with HA, I have this specific YAML working in Oct 2022 with a few small adjustments. I had to change the ‘60m’ notation to ‘360s’ and comment out the ‘INPUT_PULLUP’ line, and once that was done, the device flashes & is integrating into HA without any issue
this is better than the definition that I have, and I also still need to integrate my pump. Thanks for sharing, I will integrate some of your deep sleep stuff into mine today.