Code Monkey home page Code Monkey logo

hotwaterselector's Introduction

Hot water selector

The purpose of this project is to build a hot water selector for a house using a three-way valve, a dual relay module and an ESP01 module.

Use case

A house has 2 hot water accumulators used on different situations:

  • Electric water heater. The source of power is surplus energy of a solar PV system.
  • Gas water heater. Only used when there is no enough solar power to heat water.

This system allows an automatic hot water source selection based on the temperatures of water in both tanks.

This repository does not cover the automation system as this depends on the particular implementation. This ESP01 module only exposes a MQTT interface for changing the source of water.

Components

  • Three-way valve. 2 input, 1 output Example
  • LCTech dual relay module based on STM chip Example
  • ESP01/ESP01S module. Often included with the relay module. Example
  • AC-DC 5v power supply Example

Schematic

Customizations

These are the default values that can be changed using the substitutions block on the yaml.

  • devicename: by default, the device is called hotwaterselector. This is also the base MQTT path.
  • opentime: Time needed to open/close the valve. By default, the time is set to 12 seconds.
    • Careful: if time is set too low the valve won't fully open.

MQTT

  • Monitor position [0-100]: hotwaterselector/cover/valve3w/position/state
  • Set position: Send 1 or 0 to hotwaterselector/cmd/goto

Build with ESPHome

I use the docker image method because it does not need any setup steps. If you want to use other build method, please refer to ESPHome build guides

Create the secrets.yaml file with the required configuration variables for your configuration.

wifi_ssid: MY_WIFI_NAME
wifi_pass: my_wifi_password

mqtt_ip: 192.168.0.11
mqtt_port: 1883
mqtt_user: mqtt_user
mqtt_pass: mqtt_user_pass

ota_pass: some_random_password_or_string
api_pass: some_random_password_or_string

Build and run

$ docker run --rm -v "${PWD}:/config" --device /dev/ttyUSB0 -it esphome/esphome:latest run hotwatervalve_esp01.yaml

Licensing

Arturo Casal

Shield: CC BY 4.0

This work is licensed under a Creative Commons Attribution 4.0 International License.

CC BY 4.0

This software uses ESPHome

Copyright (c) 2019 ESPHome

hotwaterselector's People

Contributors

berfenger avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.