Git Product home page Git Product logo

pentair-pool-controler's Introduction

Pentair Pool Controller

Code for reading and controlling Pentair EasyTouch via RS485/RS232

This utility is meant to be run as a service on a system utilizing a RS485 reader. In my case, it's a Rasberry Pi 3 with a USB RS232/RS485 connector. A single CAT5 line (using only 2 wires) extends from the pool controller to the Rasberry Pi.

This service integrates with a SmartThings driver to allow controlling the Pentair equipment via the SmartThings app. You can activate pool features simply by issuing GET requests to the correct endpoints.

NOTE: since the services are exposed on port 8080, you will need to take care that this port is not exposed to the outside world on your router. Also, there's no authentication mechanism - anyone on your home network could control your pool if they knew how.

The service assumes your COM port is /dev/ttyUSB0 so you will need to modify this depending on your system and OS.

When you run the service, pool controller endpoints will be exposed:

/pool/status Returns all features and their statuses

Example:

$ curl http://192.168.1.13:8080/pool/status
Response: {
  "air_blower": "off",
  "air_temp": 74,
  "aux": "off",
  "cleaner": "on",
  "destination": "Broadcast",
  "last_update": "Sun, 09 Apr 2017 10:24:33 GMT",
  "pool": "on",
  "pool_light": "off",
  "source": "Main",
  "spa": "off",
  "spa_light": "off",
  "spillway": "off",
  "time": "11:00",
  "water_feature": "off",
  "water_temp": 74
}

Set a feature to an on/off state using /pool/-feature-/-state-
Examples:
Turn the spa on
$ curl http://192.168.1.13:8080/pool/spa/on
Response: {
  "spa": "on"
}

Turn the spa off
$ curl http://192.168.1.13:8080/pool/spa/off
Response: {
  "spa": "off"
}

Turn the pool light on
$ curl http://192.168.1.13:8080/pool/pool_light/on
Response: {
  "spa": "on"
}

The list of features can be found above in the /pool/status response.

Wiring

You can tap into the RS485 BUS on the controller and wire as follows

Controller ==> RS485/RS232 Converter ==> Raspberry Pi

I used CAT5 to run the wires but you only need 2 for RS485. Pool Controller Wiring

RS485/RS232 converter wiring

pentair-pool-controler's People

Contributors

michaelusner avatar triorbonk 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.