This post has been de-listed
It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.
A year or so ago I made this beautiful device. It lives under my kitchen counter. The wire with the green heat-shrink leads to a button. Pressing the button starts the water. The water comes in from the white tube on the right, the round thing is a little flowmeter waterwheel that measures the water, and the solenoid controls the flow.
The code is here: https://pastebin.com/1xPHa6NM
The problem is that once in a while, about one time in 100, the water doesn't stop.
It is supposed to stop after the "requested_amount" is reached. In case it doesn't, it's also supposed to stop if the button is pressed again. This works most of the time, but not always. Sometimes it just keeps going and I have to use a little manual valve to physically stop the water flow. No good.
I can't figure out how to save the logs so that I can read them later. But I have just figured out how to capture the "status" updates that get sent via MQTT. It looks like this when the water starts and stops correctly:
So... troubleshooting. How do I go about figuring out what the problem is?
- How can I read the logs after the fact? Would that help?
- How can I send more useful information via mqtt?
- Are there any flaws in my code that would somehow cause this?
- What else would you recommend?
Are my expectations too high? I mean, there must be millions of beverage dispensers out there that start at the push of a button, measure out a pre-determined amount of liquid and then shut off reliably.
Flowmeter: https://www.amazon.com/gp/product/B08ZD85CSK
Solenoid Valve: https://www.amazon.com/gp/product/B016MP1HX0
I'd appreciate any advice. I've come so far with this project, but this is a pretty fatal flaw. Thank you!
If you're curious, it takes 3200 pulses to fill my coffee machine. The reason I have it as a variable coming from home assistant instead of hard-coded is that I want to build a v2 of the device where I can request any amount of water. (I can calculate for example that a cup of water would be 448 pulses of water).
Post Details
- Posted
- 1 year ago
- Reddit URL
- View post on reddit.com
- External URL
- reddit.com/r/Esphome/com...