Hello guys,I’m building project of weather station solar powered with an esp32 on esphome.
But I have one issue at this time, maybe someone of you could help me, I searched a lot on google, but nothing worked…
So, I have a rain gauge sensor (https://cdn.sparkfun.com/assets/d/1/e/0/6/DS-15901-Weather_Meter.pdf) :
Then I want that when it’s raining, and when my rain meter measure 0,3mm (one gauge), it wake up my ESP32, for send this data to my home assistant
I tried the wakeup_pin_mode, the esp32_ext1_wakeup but nothing worked… maybe I did something wrong with mode of them…
It would help if you shared the yaml with wakeup_pin or similar configured - it’s a bit hard to tell were you may have gone wrong without the code.
I assume you only what to know “it’s raining”, not how much rain you are actually getting. Deep sleep sensors are not a good choice for monitoring continuous events like rainfall.
Hello buddy, Yes my device fully come up in 5sec, actually i’m on wifi, but after I want to made it in 4G/5G LTE.
Yep, I’m running on batterie with solar cell. I tried with KEEP_AWAKE too. and doesn’t work.
I want that when it’s raining, and my gauge mesuring his first bucket, thats wake up my esp32 to send data of this measurement to my home assistant
Ok - so what isn’t actually “working”? Is the device not waking? Or not counting? It won’t count the wake tip as part of the sensor and as defined above will only stay awake for 10 secs before shutting down again. So if you are getting light rain (less than one tip per second) then it won’t increment the sensor at all.
Yep sorry, When I said not working, is because the esp32 doesn’t waking up when the rain gauge is activated, when it measures its volume of rain to activate the pendulum
When I put off the deep sleep system, and activate the rain gauge, thats work, it measure well.
But I want the device to be in deep sleep when it’s raining hard enough to activate the pendulum, it must wake up the esp32 so that these measurements can be added to my home a
I didnt tested it but I think it is, cause when I disable the deep sleep module, that works very well.
But I want it to work as wake up pin when its raining and my ESP32 is in deep_sleep
Ah yes - of course. Well you are using the correct pin, your yaml looks correct - so I am out of ideas. My only sensor that uses pin wakeup leaves out the inverted: true line. It works fine:
I am also thinking to add a rain gauge in the back yard which will need to be battery powered.
In the case of a rain gauge, it is impossible to predict when the rain might start, or how heavy the rain will be - ie how long between the pulses generated as the bucket empties and the next bucket fills up.
I have been wondering if this is feasible … so thanks Daryl for confirming this works for you.
As you say, it wont count the bucket tip which does the waking up, or any before the ESP32 is fully up.
Which started me thinking that really I am after the number of tips per minute (or per hour for long-term statistics) rather that recording each individual bucket tip with millisecond timing.
I really am not into electronics, but am assuming there may be a simple electronic circuit which can count the number of pulses received, and which can be read and reset (say every minute) by the microcontroller.
I personally think that battery powered wifi sensors using deep sleep have limited use cases. They are good for event sensors (a mailbox sensor like my snippet above) or for sensors that don’t require continuous data (I have a lux sensor for outside light control that wakes every 10 minutes).
I use a lot of 433MHz sensors and my weather sensors are Ecowitt brand. The rain sensor has been running for over 2 years on a single AA battery. You do need one or more 433MHz base stations running on permanent power though.
BUT - this is just my opinion, other users may have differing experience.
Hey thanks guys for all your answers. But still not working, I tried with deleting “inverted mode : true”.
I don’t know if it’s really possible to wake up ESP32 by pulse counter…
Hello back there, keep trying to make it worth last week but still nothing…
Maybe I can’t made a wakeup by pin, when the default wake up is on too ?
Only one mode of wake up can be enabled?
I am having a go at this, and seen another thread suggesting adding “allow_other_uses: True” to both the deep-sleep and the sensor … except that when I add it to my yaml pulse_counter like
and removing that line compiles OK … which sounds like allow_other_uses isn’t valid for a pulse_counter, but is for other types.
FYI: “allow_other_uses” is ONLY described in the Pin Schema section of the Configuration Types documentation page, and doesn’t indicate which components it is valid for.
Why would it only apply to certain components when its just a simple configuration option that allows you to manually specify 2 uses and stops duplicate pin use warnings during compile.
Now if you would quit taking it upon yourself to decide for everyone else which parts of the config are relevant and deciding what people do or dont need to see, well that would be super helpful for the people you’re asking to help you!
Would you take your car to a mechanic and make him fix your car with one hand tied behind his back?
Of course not so, why do that to the group and only post one little part of your config? Hell, you didn’t even post the other half of the
allow_other_uses: true
Where’s the second gpio entity that’s also supposed to be using GPIO7?? He call in sick today or what? I know my GPIO7 is a lazy bumb and always calls in sick too!
Whenever you see GPIO7, you might ask him what hes sharing his pin with and if we could get some security clearances in here mucho rapido and see the config, that sure would be spectacular and mighty helpful!
I did a trial test on one of my
pulse_meter:
configs and it compiled with 0 issues or errors so, i cant imagine why your
pulse_counter:
is failing for any other reason than you didnt specificy what the second GPIO7 use is, or you made a syntax error. Couldn't tell you which one it is or how to fix it untill I get my security clearance and can cast my eyes on those state secrets!!
You are right. I didn’t specify that my objective is to use the pulse from the rain gauge on GPIO7 to also wake the ESP32 from deep_sleep … probably because that is the topic of this thread
Thinking back the 23 days to when i posted that comment, I wasn’t asking for help - just mentioning that allow_other_uses hadn’t worked for me.
I had (and still have) other aspects I am working on, and so just commented out the deep_sleep: code intending to came back to it later. FYI, the the “other half” was
deep_sleep:
# wake up if it starts raining while asleep
wakeup_pin: GPIO7 # wake up if a rain gauge pulse is detected
allow_other_uses: true
wakeup_pin_mode: KEEP_AWAKE # stay awake if rain is happening when otherise would sleep
Do you really want to work through my 584 lines of yaml, for a problem I am not actively looking at currently ? But when I do do the research, describe the things I have tried, provide all code and results … most often there is no reply. Such is the nature of Open Source Community - and (before you get all upset again) I understand the motivations and am okay with that.