esphome / esphome/feature-requests
Sprinkler component to be compatible with H Bridge for Solenoid Valves
- Dominant language
- No language data
- Stars
- 450
- Forks
- 29
- PR merge metrics
- No merged PRs in 30d
Description
**Describe the problem you have/What new integration you would like**
There are two types of solenoid valves in the market that could be used to manage sprinklers. Normally Open and bistable solenoids.
Since the first type can be easy managed with sprinkler component that uses switch to drive the relay wich open and closes the solenoid, **bistable solenoids** need to reverse their polarity to change their state, so the **HBridge component** would suit better for them.
**Please describe your use case for this integration and alternatives you've tried:**
Unfortunately the sprinkler component can't manage outputs in place of switch and you need to complicate your yaml config to make them work.
Of course there is a way to make them work with actual switch but if you could implement the use of outputs this could be managed with less configuration moreover gpio output component has the vantage of being hidden by default in the frontend so you won't have a duplicated switch for each sprinker.
I imagine something like this:
```
output:
- platform: sprinkler
id: valve_A_on
pin: GPIO5
- platform: sprinkler
id: valve_A_off
pin: GPIO4
sprinkler:
- platform: hbridge
id: garden_valve
name: "Garden Valve"
pin_a: valve_A_on
pin_b: valve_A_off
```
**Additional context**
Bistable solenoids are necessary when you plan to use a solar-battery powered sprinkler controller because those solenoids do not consume energy during the irrigation process. They change state in 800ms then they keep the state until you provide another short signal with reversed polarity and to manage this H-bridge would be the best approach.
With bistable solenoids if during the irrigation process there’s a power interruption, the water would keep flowing, but Hbrighe has the perfect solution that can manage this problem:
```
on_boot:
then:
- sprinkler.hbridge.brake: all_valves
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Review the existing sprinkler component's switch-based configuration and the HBridge behavior first; the request names no source files or tests. Done means defining how bistable solenoid polarity reversal, output-based configuration, and the proposed on_boot brake action should work together.
Written by the indexing model from the issue text.
Assessment
- Domain
- embedded-iot
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100