GithubHelp home page GithubHelp logo

freekeys / galconirrigationpi Goto Github PK

View Code? Open in Web Editor NEW

This project forked from suborb/galconcontroller

0.0 0.0 0.0 20 KB

Python script to control a Galcon 9001BT Irrigation Controller

License: GNU General Public License v3.0

Python 100.00%

galconirrigationpi's Introduction

GalconController

The Galcon 9001BT is a cheap-ish irrigation controller that communicates with iOS and Android apps using Bluetooth LE.

As you'd expect there's minimal security, the pairing procedure is client side - the pin code is generated by the client app and sent to the controller which then simply displays it. As long as everyone uses the app....

Script

At present it's just a simple script demonstrating usage. It takes one argument which is the bluetooth address of the controller.

Domoticz Plugin

A domoticz plugin which presents the controller as a switch is available. Installation is a per normal domoticz python plugins.

Message

???? (write)

"Logs in" to the device, this message seems to be required before the status returns a sensible value:

Characteristic UUID: e86802019c4b11e4b5f70002a5d5c51b Payload: \x01\x02

Controlling the valve (write)

Characteristic UUID: e86801039c4b11e4b5f70002a5d5c51b

Bit 0 = close valve Bit 8 = open valve Bit 9 = use duration in payload Byte 3 = Duration in hours Byte 4 = Duration in minutes Byte 5 = Duration in seconds Byte 6 = unknown

If bit 9 isn't set then the pre-programmed default duration is used.

A simple open valve message:

\x00\x01\x00\x00\x00\x00\x00

A simple close valve message:

\x01\x00\x00\x00\x00\x00\x00

Get Status (read)

Characteristic UUID: e86801029c4b11e4b5f70002a5d5c51b

Response (valve closed): \x98\x00\x00\x00\x00=\x00 Response (valve open): \x99\x01\x00\x04<=\x00

Byte 0

The bit 0 first byte determines whether the valve is opened or closed. The remaining fields do have meaning.

Byte 1

Is set if the valve has been opened manually (rather than by an irrigation program).

Bytes 2,3 4

Hours, Minutes, Seconds how long the program has to run

Byte 5, 6

Unknown at the present

Display a pin number on the device (write)

Characteristic UUID: e86804019c4b11e4b5f70002a5d5c51b Payload: 4 bytes of pin

For the pin 1234 the payload will be \x01\x02\x03\x04

As mentioned above, this is a fairly pointless message.

Other messages

There are other messages to set the irrigation timings, as yet I've not documented them.

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.