Git Product home page Git Product logo

pool_controller's Introduction

Pool Controller

PH and ORP monitor/control for ESP32

To use, you'll need to flash an ESP32 module with micropython. See: https://micropython.org/download/esp32/. Version must be May 20,2020 or later.

You must update the conf-example.sample file:

  1. edit wifi information and mqtt server information as noted in the file. All values need to be in quotation marks as in the example file.
  2. save the file with exactly this filename: conf.txt

After saving the conf.txt file, upload conf.txt, config.py, mqtt_as.py and main.py to the ESP32. If you are unfamiliar with how to do this, check out https://github.com/BetaRavener/uPyLoader

The sensors configured in the conf.txt file represent IO ports on the ESP32-DEVKITC board. They are designed to work with isolated carrier boards from Atlas Scientific (for example https://www.atlas-scientific.com/carrier-boards/electrically-isolated-ezo-carrier-board-gen-2/). You will need to purchase the carrier boards, EZO modules, and probes from Atlas.

Outputs are provided on the IO ports noted in the conf.txt file for Ph Pump (i.e. acid) and ORP Pump (i.e. bleach). These pins can be connected through appropriate isolation and relays to peristaltic pumps used to dispense the required chemicals into the pool.

This system was designed to work with Home Assistant, although in principle any MQTT-enabled controller should work. Configuration files for Home Assistant are in the directory "Home Assistant." The .yaml package goes into your packages directory and the pool_fc.py is an appdaemon file and should go in the appropriate appdaemon folder.

pool_controller's People

Contributors

smurry avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

pool_controller's Issues

Free Chlorine stopped working

Hi,
Thanks for the highly detailed guidance.
I have been using the pool_fc.py app in AppDaemon without any issues. Recently I have updated my hassio and AppDaemon to the latest releases, and for some reason I stopped getting the FC readings!
Not sure if it has anything to do with the upgrades, but those are about the only changes I've made recently.

The Error log in AppDaemon shows the following:
2021-04-24 00:03:19.031463 WARNING free_chlorine: ------------------------------------------------------------ 2021-04-24 00:03:19.031384 WARNING free_chlorine: Worker Ags: {'id': '808d559799674797b7b88deea12a8df5', 'name': 'free_chlorine', 'objectid': '572efedf5c354bd9a20f99ec18ac0fe3', 'type': 'state', 'function': >, 'attribute': 'state', 'entity': 'sensor.swimming_pool_ph', 'new_state': '11.77', 'old_state': '11.71', 'pin_app': True, 'pin_thread': 0, 'kwargs': {'__thread_id': 'thread-0'}} 2021-04-24 00:03:19.031280 WARNING free_chlorine: Unexpected error in worker for App free_chlorine: 2021-04-24 00:03:19.031169 WARNING free_chlorine: ------------------------------------------------------------ 2021-04-24 00:02:26.272568 WARNING free_chlorine: ------------------------------------------------------------ 2021-04-24 00:02:26.272460 WARNING free_chlorine: Traceback (most recent call last): File "/usr/lib/python3.8/site-packages/appdaemon/threading.py", line 903, in worker funcref( File "/config/appdaemon/apps/pool_fc.py", line 33, in calc_fc for k,v in ch[last_orp].items(): KeyError: 0

I have copied your pool_fc.py as is, therefore this is what I have at line 33:
for k,v in ch[last_orp].items():

I am wondering if anyone else is having the same problem, and if anyone has figured out how to fix it.
Any help would be greatly appreciated.

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.