Häfele BLE - Home Assistant Integration

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.

Do you have a link for where it’s 89€. Here is 133€ + vat

where are you from?

Hi, do you have a link to a product that does this? And/or an example of how to replace Bluetooth Mesh control with Zigbee?

Thanks

That’s easy. You replace the mesh controller with a common zigbee led controller you can find anywhere on AliExpress for example. Either it’s a dimmable, CW, RGB, or anything else, it’s okay.
You give it 220v dc, then its output goes into the Hafele driver, and led strips will be connected to the driver in the end.

It’s difficult for me to provide a photo since everything is behind a wall but the concept is simple.

If you need help please contact me! :slight_smile:

Thanks. I didn’t even know these things existed!

1 Like

got it shipped from germany, 95 euro inc vat + delivery :slight_smile:

1 Like

Hi there, great to read your post. I intended to do the same thing but even simpler: taking the loox led strip and connecting it directly to a Zigbee controller. I.e. not even having the Loox/Hafale driver in between. Did you consider this?

My reasoning is that the led strips are 12 volt and they don’t know which device is giving them 12 volts. And it’s DC so there’s no frequency issue I figured. Only need to cut the original Hafale led strip connector off and plug the wires straight into the Zigbee controller.

But reading your post I’m doubting whether to go my route or go yours.

My Loox5 led strips are connected through this splitter:

So intend to cut off the yellow connector and connect those wires straight into a Zigbee controller, which is then attached to a 230V power supply.

My zigbee controller has an input of 24V so I just can’t simply connect it directly to 230V.
If you find a zigbee controller/dimmer with 230V input, yes then I guess you’re free to use it!

Aah, mine does have 230V input. I tried and it worked. Pictures below for anyone interested.

One of the two Loox5 splitters:

The two Loox5 splitters connected to the Zigbee controller and power supply:

To be honest, your ac adapter’s output is 12v not 230v. Same as having an hafele 833.95.003 Loox5 driver then.

Ah yes of course, I was mistaken. Yes you can choose what type of power supply that transforms 230V AC to 12 or 24 volt DC, be it from Hafale or a different supplier. My point was that I wanted to plug the Loox5 led strips straight into a 3rd party zigbee controller (that then needs 12 or 24 volts DC power input) and that indeed works.