Giter Site home page Giter Site logo

in.touch2's Introduction

in.touch2 wireless remote control for your spa

Simple Python class for controlling spa with an in.touch2 device (https://geckointouch.com/).

Experimental Code!

Experimental code based on analysis of mobile app network traffic.

Example

# ./spa.py

Channel: 30<br>
Setpoint: 70.  Current Temperature: 90.  Lights: 0.  Version: inYT 177 v3.0.  Base config: 5.

# ./dumpall.py

...
256 0x12 Hours, 
257 0x0 QuietState, 
258 0x0 UdP5(0),UdBL(1), 
259 0x0 UdP1(0),UdP2(2),UdP3(4),UdP4(6), 
260 0x20 P5(0),BL(1),CP(2),O3(3),L120(4),MSTR_HEATER(5),SLV_HEATER(6),Waterfall(7),Heating(5), 
261 0x2 P1(0),P2(2),P3(4),P4(6), 
262 0x5 FilterAccess(0),EconomyAccess(2),OnzenAccess(1), 
263 0x0 RemoteFiltAction, 
...

For 260, value is 0x20 => 0010 0000 => 5th bit is set and thus MSTR_HEATER(5) is on
For 261, value ix 0x02 => 0000 0010 => 1st bit is set and thus P1 is on

# ./dumpreminders.py

Connected.  ('192.168.2.231', 10022)
RinseFilter 30 days
CleanFilter 60 days
ChangeWater 90 days
CheckSpa -38 days

TODO

  • Figure out initial handshake mechanism to obtain Source Connection(?) value.
  • Incorporate set functions:
    # Set Watercare
    spack = '<PACKT><SRCCN>xxx</SRCCN><DESCN>yyy</DESCN><DATAS>SPACK#SEQ#\x0a\x07\x46\x35\x35\x00\x01#TEMP#</DATAS></PACKT>'
    def setWatercare(value):
            msg = setwc.replace('#WC#', struct.pack('>B', value))   # one bytes
            send(msg)
            data = recv()
            return ''
    
    # Set Target temperature
    setwc = '<PACKT><SRCCN>xxx</SRCCN><DESCN>yyy</DESCN><DATAS>SETWC#SEQ##WC#</DATAS></PACKT>'
    def setTargetTemp(temp):
            value = (temp - 32) * 10
            msg = spack.replace('#TEMP#', struct.pack('>H', value))   # two bytes
            send(msg)
            data = recv()
            return ''
    

Contributing

Contributions are welcome!

in.touch2's People

Contributors

chicago6061 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.