Bonaire MyClimate Integration

I wondering if someone may be able to help. I'm trying to setup a driver for the Bonaire MyClimate system but have hit the wall with a specific problem. Basically I'm stuck in a situation where I need to setup a TCP listener on a specific port (port 10003).

The method of interfacing with the MyClimate device is to send a UDP message to port 10001, then the device will open a connection back to specified IP as broadcast on TCP port 10003. Once this connection is established another TCP connection can be opened to the device on TCP port 10002 and command issued.

I'm aware of Maker API as well as port 39501 but I believe both these ports are fixed. All I need is a listener on port 10003 and I'd be right, I don't even need to interact with it. If anyone could help with some outside of the box ideas that would be great.

I'll post the working network protocol/interactions below.

LOCAL DIRECT COMMS

Local IP: 192.168.0.10
MyClimate IP: 192.168.0.11

To establish comms, first you have setup a TCP listener on the Local IP for port 10003 (i.e. TCP 192.168.0.10:10003). Check your inbound firewall rules.

When the listener is listening, send a UPD packet containing the following to the MyClimate IP on port 10001. Change the IP address below to match your Local IP.

<myclimate><get>discovery</get><ip>192.168.0.10</ip><platform>android</platform><version>1.0.0</version></myclimate>

What I can gather from here is that the MyClimate interface establishes a TCP connection back to your Local IP listener on port 10003.

Importantly this connection should be left open as subsequent communication seems to require this connection remain open. If the connection closes, you'll will need to perform the discovery again. Also note; the connection will timeout after a period of no activity (no rush though, it's a minute or two)

From here you should have an open and established connection to the MyClimate WiFi unit to which you can issue commands. See some example commands below.
Of note with this connection established, you can optionally open a second TCP connection to the MyClimate IP on TCP port 10002 where the same commands can be issued. Note that issuing a disconnect as per the example below will close all connections.

To get the current settings of your Bonaire, send the following data over the open connection (i.e. from your listener port 10003 or the optional second connection connected to the MyClimate WiFi on TCP port 10002).

<myclimate><get>getzoneinfo</get><zoneList>1,2</zoneList></myclimate>

The return will be something like this:

<myclimate><post>postzoneinfo</post><system>on</system><type>heat</type><zoneList>Common</zoneList><mode>program</mode><setPoint>22</setPoint><roomTemp id="Common">22</roomTemp></myclimate>

To change the settings of your Bonaire simply resend the same response with your altered settings, but with the roomTemp parameter removed. For example:

Set Temperature to 21

<myclimate><post>postzoneinfo</post><system>on</system><type>heat</type><zoneList>Common</zoneList><mode>program</mode><setPoint>21</setPoint></myclimate>

To Turn On

<myclimate><post>postzoneinfo</post><system>on</system><type>heat</type><zoneList>Common</zoneList><mode>program</mode><setPoint>23</setPoint></myclimate>

To Turn Off

<myclimate><post>postzoneinfo</post><system>off</system><type>heat</type><zoneList>Common</zoneList><mode>program</mode><setPoint>23</setPoint></myclimate>

And so on.

When finished and you wish to disconnect, send the following command:

<myclimate><delete>connection</delete></myclimate>

The TCP connection will drop and you can move on.

Hopefully this is of help. Ohh and if anyone knows much about Hubitat comms, particularly TCP listeners, please feel free to chime in.

CLOUD COMMS AKA MYCLIMATE API
I have also been able to get to the bottom of cloud comms by examining packets using a MIM approach. As a result I have been able to successfully reissue commands via the MyClimate API using curl.
The basic steps are as follows.

  1. Set a lock
  2. Get status (optional)
  3. Send an instruction or series of instructions
  4. Delete lock.

Example commands:

Set Lock

curl -H "X-Authentication-Key: 12345678901234567890123456789012" -H "User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.2; SM-P900 Build/LRX22G)" -H "Connection: Keep-Alive" -H "Accept-Encoding: gzip" -X GET https://myclimate.bonaire.com.au/Api/Lock

Get Status

curl -H "X-Authentication-Key: 12345678901234567890123456789012" -H "User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.2; SM-P900 Build/LRX22G)" -H "Connection: Keep-Alive" -H "Accept-Encoding: gzip" -X GET https://myclimate.bonaire.com.au/Api/State

Change Setting

curl -H "X-Authentication-Key: 12345678901234567890123456789012" -H "User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.2; SM-P900 Build/LRX22G)" -H "Connection: Keep-Alive" -H "Accept-Encoding: gzip" -H "Content-Type: application/x-www-form-urlencoded" -X POST -d @C:\Test\Bonaire_POST.txt https://myclimate.bonaire.com.au/Api/Instruction

Example Bonaire_POST.txt Content (as per Change setting above)
Turn On

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>econ</mode><setPoint>15</setPoint><fanSpeed>8</fanSpeed></myclimate>

Turn Off

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>off</system><type>heat</type><mode>econ</mode><setPoint>15</setPoint><fanSpeed>8</fanSpeed></myclimate>

HEAT MODE

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>thermo</mode><setPoint>15</setPoint><fanSpeed>8</fanSpeed></myclimate>

Change Fan Speed

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>fan</mode><setPoint>15</setPoint><fanSpeed>2</fanSpeed></myclimate>

Set Economy Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>econ</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Set Thermo Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>thermo</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Set Boost Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>heat</type><mode>thermo</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Set Manual Only Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>manual</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

EVAP/COOL MODE

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>manual</mode><setPoint>15</setPoint><fanSpeed>8</fanSpeed></myclimate>

Change Fan Speed

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>manual</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Set Thermo Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>thermo</mode><setPoint>1</setPoint></myclimate>

Set Fan Only Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>fan</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Set Boost Mode

<myclimate><post>postzoneinfo</post><zoneList>Common</zoneList><system>on</system><type>evap</type><mode>boost</mode><setPoint>15</setPoint><fanSpeed>1</fanSpeed></myclimate>

Delete Lock (when finished controlling unit)

curl -H "X-Authentication-Key: 12345678901234567890123456789012" -H "User-Agent: Dalvik/2.1.0 (Linux; U; Android 5.0.2; SM-P900 Build/LRX22G)" -H "Connection: Keep-Alive" -H "Accept-Encoding: gzip" -X DELETE https://myclimate.bonaire.com.au/Api/Lock

Hey mate, bit late to the game but I have written a functioning component for Home Assistant, please find it here. This is for local access, not via their cloud. Feel free to borrow any of my code if you want to build something for Hubitat.

I am a new user so can't post links, but search on github for bremor/bonaire_myclimate

Thanks for sharing. I'll have a look at the code and see how I may be able to adapt aspects of it across to Hubitat.
I have a cloud based driver that I wrote that seems to work reasonably well, but it would be better to have something running locally.
FWIW I'll share what I have as well as it may be usefull to others.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.