Code Monkey home page Code Monkey logo

chemdoserproxy's Introduction

ChemDoserProxy

Proxy tool converting TCP stream from Aseko Doser systems to HTTP API

Disclaimer

Everything the proxy does was reverse engineered from observing the values sent to pool.aseko.com. Note that connection is unencrypted.

Due to the nature of the process, some things could be wrong. No responsibility will be accepted for any issues resulting of the use of this tool.

OpenHab

This can be used to integrate the Aseko Doser systems with OpenHab by connecting via HTTP binding.

Following steps are required:

Connecting Doser to Docker container

  • Copy docker-compose.yaml to a folder of your choice
  • Adapt environment configuration to your needs
  • Go to your Aseko doser web interface (it's a simple RS232 to IP converter, identifies as USR-K5 in DHCP)
    • Default username/password is admin/admin
    • Select serial port in the menu and change remote server address to the IP of the machine running the Docker container.
  • docker compose up to start the container
  • Check http://<your-ip>:47525/state and verify values match what the Aseko app on your phone/and or the screen on the doser is showing

Configure OpenHab

  • Install the http binding, if not already installed
  • Create aseko.things file:
Thing http:url:doser-proxy "Aseko Doser" [
    baseURL="http://<your-ip>:47525",
    refresh=10,
    commandMethod="POST"]
    {
        Channels: 
            Type number : WaterTemperature  "Water temperature" [ stateExtension="state", stateTransformation="JSONPATH:$.state.waterTemp", mode="READONLY" ]
            Type number : clFree            "cl Free"           [ stateExtension="state", stateTransformation="JSONPATH:$.state.clFree", mode="READONLY" ]
            Type number : clFreeMv          "cl Free (mV)"      [ stateExtension="state", stateTransformation="JSONPATH:$.state.clFreeMv", mode="READONLY" ]
            Type number : pH                "pH"                [ stateExtension="state", stateTransformation="JSONPATH:$.state.pH", mode="READONLY" ]

            Type number : LevelChlorPure    "Level ChlorPure"   [ stateExtension="state", stateTransformation="JSONPATH:$.levels.chlorPure", mode="READONLY" ]
            Type number : LevelpHMinus      "Level pH Minus"    [ stateExtension="state", stateTransformation="JSONPATH:$.levels.pHMinus", mode="READONLY" ]
            Type number : LevelpHPlus       "Level pH Plus"     [ stateExtension="state", stateTransformation="JSONPATH:$.levels.pHPlus", mode="READONLY" ]
            Type number : LevelFlocPlusC    "Level Floc+C"      [ stateExtension="state", stateTransformation="JSONPATH:$.levels.flocPlusC", mode="READONLY" ]

            Type switch : FillChlorPure     "Refill ChlorPure"  [ commandExtension="chemical/%2$s/fill", onValue="ChlorPure", offValue="noop", mode="WRITEONLY" ]
            Type switch : FillpHMinus       "Refill pH Minus"   [ commandExtension="chemical/%2$s/fill", onValue="pHMinus", offValue="noop", mode="WRITEONLY" ]
            Type switch : FillpHPlus        "Refill pH Plus"    [ commandExtension="chemical/%2$s/fill", onValue="pHPlus", offValue="noop", mode="WRITEONLY" ]
            Type switch : FillFlocPlusC     "Refill Floc+C"     [ commandExtension="chemical/%2$s/fill", onValue="FlocPlusC", offValue="noop", mode="WRITEONLY" ]
    }
  • Create aseko.items file:
Number      pH               "pH Value [%.2f]"                      {channel="http:url:doser-proxy:pH"}
Number      clFree           "Concentration Chlorine [%.2f mg/l]"   {channel="http:url:doser-proxy:clFree"}
Number      clFreeMv         "Measurement Chlorine [%d mV]"         {channel="http:url:doser-proxy:clFreeMv"}
Number      temp             "Temperature [%.1f °C]"                {channel="http:url:doser-proxy:WaterTemperature"}

Number      level_ChlorPure  "Level Chlor Pure [%d ml]"             {channel="http:url:doser-proxy:LevelChlorPure"}
Number      level_pHMinus    "Level pH Minus [%d ml]"               {channel="http:url:doser-proxy:LevelpHMinus"}
Number      level_pHPlus     "Level pH Plus [%d ml]"                {channel="http:url:doser-proxy:LevelpHPlus"}
Number      level_FlocPlusC  "Level Floc+C [%d ml]"                 {channel="http:url:doser-proxy:LevelFlocPlusC"}

Switch      refill_ChlorPure "Refilled Chlor Pure"                  {channel="http:url:doser-proxy:FillChlorPure"}
Switch      refill_pHMinus   "Refilled pH Minus"                    {channel="http:url:doser-proxy:FillpHMinus"}
Switch      refill_pHPlus    "Refilled pH Plus"                     {channel="http:url:doser-proxy:FillpHPlus"}
Switch      refill_FlocPlusC "Refilled Floc+C"                      {channel="http:url:doser-proxy:FillFlocPlusC"}

chemdoserproxy's People

Contributors

cguedel avatar

Watchers

 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.