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....
At present it's just a simple script demonstrating usage. It takes one argument which is the bluetooth address of the controller.
A domoticz plugin which presents the controller as a switch is available. Installation is a per normal domoticz python plugins.
"Logs in" to the device, this message seems to be required before the status returns a sensible value:
Characteristic UUID: e86802019c4b11e4b5f70002a5d5c51b
Payload: \x01\x02
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
Characteristic UUID: e86801029c4b11e4b5f70002a5d5c51b
Response (valve closed): \x98\x00\x00\x00\x00=\x00
Response (valve open): \x99\x01\x00\x04<=\x00
The bit 0 first byte determines whether the valve is opened or closed. The remaining fields do have meaning.
Is set if the valve has been opened manually (rather than by an irrigation program).
Hours, Minutes, Seconds how long the program has to run
Unknown at the present
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.
There are other messages to set the irrigation timings, as yet I've not documented them.