Mitsubishi Heavy Industries air conditioning with WF-RAC binding development

I’m going to port Mitsubishi Heavy Industries air conditioning code from HA. Is there a binding template that I could use?

So far I found this:

  1. Bindings | openHAB
  2. Developer Guide | openHAB

Creating skeleton from scratch using maven. Starting point: openhabian:

git clone https://github.com/openhab/openhab-addons.git
$cd openhab-addons/bundles/
./create_openhab_binding_skeleton.sh <BindingIdInCamelCase> <Author> <GitHub Username>

Related topic: MHI (Mitsubishi Heavy Industries) AC control through build in WF-RAC module

Reference code from HA: GitHub - jeatheak/Mitsubishi-WF-RAC-Integration: WF-RAC homeassistant integration
HA topic about MHI WF-RAC: Mitsubishi Wifi Module WF-RAC (Smart M-Air) - Feature Requests - Home Assistant Community

2 Likes

Either create an empty skeleton with the maven script or take a look at the intesis Binding, which was written for intesis/AirConWithMe WiFi adapters used in MHI and several other aircon devices.

1 Like

I know from experience that the Daikin AC binding worked very well: Daikin - Bindings | openHAB

I have not looked at the code, so I cannot comment on suitability from that angle.

1 Like

@ bartsnijder I feel you might be interested in this topic :slight_smile:
Nothing to test yet, but I’ll need your help once I have something ready for tests.

Is nagios something that can be leveraged? Those 4 IPs are my MHI AC units with RAC-WF modules. I have the Home Assistant code (using python zeroconf for discovery) and I’m working in that direction as well.

$ nmap -sV 192.168.1.0/24 -p 51443
Starting Nmap 7.93 ( https://nmap.org ) at 2024-03-22 20:24 CET
Nmap scan report for _gateway (192.168.1.2)
Host is up (0.0040s latency).

[..]
Nmap scan report for 192.168.1.110
Host is up (0.053s latency).

PORT      STATE SERVICE     VERSION
51443/tcp open  nagios-nsca Nagios NSCA

Nmap scan report for 192.168.1.111
Host is up (0.079s latency).

PORT      STATE SERVICE     VERSION
51443/tcp open  nagios-nsca Nagios NSCA

Nmap scan report for 192.168.1.112
Host is up (0.014s latency).

PORT      STATE SERVICE     VERSION
51443/tcp open  nagios-nsca Nagios NSCA

Nmap scan report for 192.168.1.113
Host is up (0.048s latency).

PORT      STATE SERVICE     VERSION
51443/tcp open  nagios-nsca Nagios NSCA

[..]
Service detection performed. Please report any incorrect results at https://nmap.org/submit/ .
Nmap done: 256 IP addresses (18 hosts up) scanned in 17.41 seconds

I have discovery working for the RAC-WF :heart_eyes: Thanks for all heavy work done by authors of other bindings, obviously! All I had to do was put together a binding skeleton, copy over Daikin binding (and modify the naming, trim some stuff) and copy over the zeroconf discovery from MPD binding.

I’d appreciate help with naming - are there any rules I should stick to? I tried to use the best guess so the binding name is mhiaircon, but should it be just the brand name? Without the aircon part?

Edit:
Update:

I missed the trigger (space between @ and bartsnijder :-))… Was by accident checking out how this was going. Good to see that there is good progress. Is anything open yet to try?

1 Like

Ohhh… my coding skills are hopefully better than the forum skills. If you like dirty code… Only the discovery works, the rest is just copy from Daikin binding, so obviously not working.
The code is here:

If you need detailed download/compilation/installation instruction let me know.

Edit: Rough guide here: Amending existing binding code - what is the "right" way to install it? - #7 by PrzemoF

1 Like