Häfele BLE - Home Assistant Integration

Hello HA Ninjas,

I am a HA enthusiast for years and heavily rely on HA in my day-to-day operations. I plan use a system from Häfele in my “smart RV”. They have a system which runs for 12V or 24V. Very handsome with all the boxes checked for lights/locks/etc. Looks very promissing. The one thing which I dont see 8yet) is a blocking point for me. No HA integration.

Has anyone heard of/working on a solution to integrate such a BLE bridge and the devices behind the bridge? Anyone an idea what/how this can be achieved … if not yet available?

I did search here in the forum with little success. There are BT integrations for HA and OpenHab. Are those any useful?

I dont have access to a system yet and doing initial research what might be possible.

Yours sincerely.
Ralf

1 Like

I have some Loox5 lighting from Häfele that I would love to integrate into my HA. Loox 5 uses BLE Mesh. I’ve looked for possible integrations/projects using Google but can’t find much.

This but not touched in 2 years:

This but looks to be for one specific company’s products:

I dont have access yet to the system, but this looks very promising.

Gateway, Häfele Connect Mesh

This thing has an extensive API

If I have access to the system I will check.

Regards
Ralf

Today, my local Häfele representative paid me a visit, and I took the opportunity to inquire about a Gateway, Häfele Connect Mesh they offer. According to him, this device has been available since April 2023, likely starting its rollout in Germany. He elaborated on its functionalities, highlighting its compatibility with Amazon Alexa. Additionally, he mentioned it has to be connected as a sensor with a mesh box, implying the necessity of having one for each box for control purposes. However, upon examining the product visuals and manual, I couldn’t find any mention of this, it both has wifi and bluetooth capabilities. So it’s wise to approach this information with caution.

One particularly interesting piece of information he shared is that Häfele will start Matter support by 2025. Considering this, I’m inclined to wait until then before making any decisions. Moreover, I’ve built my own devices using ESPHome, providing an alternative solution to the mesh box dilemma.

Thanks for the update. I have ordered one for my RV installation and will test it out. Its only 85€. Will have it hopefully in august. Will let you know. Matter support looks good as well.

Great news! I recently bought Gateway, Häfele Connect Mesh and successfully connected it to HomeAssistant with the help of ChatGPT. While I’m not a programmer, I’ve put together a step-by-step guide to help others do the same.

Step-by-Step Guide

1. Install ‘Connect Mesh’ on your mobile device:

  • Create an account and go to Settings > Set up mode.
  • Click on the ‘+’ icon. If the gateway is powered and connected to the internet, it should appear on your device.

Troubleshooting:

  • Update all existing devices on your network if necessary.
  • If you encounter errors during the final step of connecting the gateway, note that the device might still connect to the app. The power and BLE lights on the gateway should turn green, though the network white light might keep flickering.
  • Change the mode to ‘Control Mode’ in the settings. On the home screen, a blue pop-up will ask you to connect the gateway to your account. Once connected, the white light should stop flickering.
  • Create a group in the app to control the lights.

2. Create an API Token:

  • Go to Connect Mesh Cloud and sign in with the account you created in Step 1.
  • Navigate to Developer Page (there’s no button, so use this link).
  • Create a new API token. Save it. It will look something like this (example token): CMC_ab12cd34_ef56gh78ij90kl12mn34op56qr78st90uv12wx34yz56ab78cd90ef12.

3. Use the API:

  • Visit Connect Mesh API. The ‘tutorial’ tab provides instructions, but here are my steps:
    • Click ‘Authorize’ on the right side of the screen and paste your token in the ‘bearer value box’, then click ‘Authorize’.
    • To fetch all networks: Go to Networks > Get /networks Fetch all the users networks > Try it out > Execute. If the server response is ‘200’, you will see all networks connected to your account. Copy the desired network ID.
    • To fetch all groups: Go to Groups > Get /groups Fetch all the users groups, paste the network ID in the description, and execute. Copy the ID of your preferred group.
    • To toggle a group on/off: Go to Groups > Put /groups/power Toggle a group on/off> Try it out > and change the following:
"networkId": "your_network_id",
"groupId": "your_group_id",
"power": "on" or "off"

Execute to turn the lights on or off.

4. Integrate with HomeAssistant:

  • Edit your configuration.yaml file and add the following code:
rest_command:
  control_device:
    url: "https://cloud.connect-mesh.io/api/core/groups/power"
    method: put
    headers:
      accept: "application/json"
      Authorization: "Bearer CMC_ab12cd34_ef56gh78ij90kl12mn34op56qr78st90uv12wx34yz56ab78cd90ef12"
      Content-Type: "application/json"
    payload: '{"power": "{{ power }}", "networkId": "your_network_id", "groupId": "your_group_id", "acknowledged": true, "retries": 0, "timeout_ms": 10000}'
  • Replace the Bearer token, networkId, and groupId with your own.
  • Go to Developer tools > Check configuration > Restart Home Assistant.

5. Create Scripts to Control Groups:

  • Navigate to Settings > Automations & Scenes > Add Script > Create New Script > Edit in YAML:
alias: TurnOffGroup
sequence:
  - service: rest_command.control_device
    data:
      power: "off"
  • Create another script to turn the lights on.

That’s it! There are more features like brightness and temperature control that I haven’t explored yet. I hope this helps anyone trying to set this up. If you have any questions, feel free to ask!

1 Like

Awesome! This requires access to internet. A local version using a local REST API on the häfele gateway itself is possible as well?

I’ve looked into the API further and made some changes. With the help of ChatGPT, I was able to create a custom integration for Häfele Connect Mesh. I’ve detailed the steps and provided explanations in a new post. Check it out here for more information: Custom Component: Häfele Connect Mesh.

Why would you refer to a mesh box as a dilemma, if you don’t mind me asking?

I’ve replaced all hafele BT mesh modules with zigbee controllers.
Easiest way to integrate the whole Hafele Loox ecosystem in my house.