HOWTO: Reflash MAX!Cube to CUL/CUNx and use with homegar and homematic binding

There are many posts in the community about MAX!Cube looses it’s configuration from time to time, which was also an issue I faced many times. I tried with a second cube and several power supplies, but could not get a stable solution.

I then found some interesting posts about reflashing the MAX!Cube to be a CUL or even while using the network Interface act as a CUNx device.

I hope you will find the following tutorial useful.

Reflashing the MAX!Cube

I followed these instructions for Windows (German)

but there is also a good tutorial in English for Linux users

Install homegear
Please select the correct method according to Your OS following these instructions.

You don’t need to install all family module, just the MAX! family

apt install homegear-max

Edit /etc/homegear/families/max.conf like the following

################ CUNX  ################

## The device family this interface is for

## Specify an unique id here to identify this device in Homegear
id = My-CUNX

## When default is set to "true" Homegear will assign this device
## to new peers.
default = true

## Options: cul, cc1100, coc, cunx, hmcfglan, hmlgw
deviceType = cunx

## IP address of your CUNX -> Match your network settings

## Port number your CUNX listens on. Normally 2323.
port = 2323

## Default: responseDelay = 95
## Should be "40" for CUNX
responseDelay = 40

You should now be able to connect to homegear and check the MAX! module by entering

openhab@openNUC:~$ sudo homegear -r
Connected to Homegear (version 0.7.30-1900).

Please type >>help<< to list all available commands.
> ls
   ID ¦ Name
    4 ¦ MAX!
  254 ¦ Miscellaneous

Before starting to pair any MAX! device within homegear, please do factory reset them

Pairing MAX! Devices in homegear
In homegear console select the MAX! family

> fs 4
For a list of available family commands type >>help<<

Start pairing by typing

> pon

set your MAX! device to pairing mode and check succsessfull pairing with

> ls

which should give you something like this:

Family 4> ls
      ID ¦ Name                      ¦ Address ¦ Serial Number ¦ Type ¦ Type String               ¦ Firmware ¦ Unreach
         ¦                           ¦         ¦               ¦      ¦                           ¦          ¦
       1 ¦ Fensterkontakt Schlafz... ¦  084F89 ¦    KMD4011252 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.4 ¦      No
       2 ¦ Fensterkontakt Schlafz... ¦  0C2883 ¦    KEQ0756709 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.4 ¦      No
       3 ¦ Fensterkontakt Arbeits... ¦  0C28CC ¦    KEQ0756624 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.4 ¦      No
       4 ¦ Fensterkontakt Gästezi... ¦  01843D ¦    JEQ0325644 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.3 ¦      No
       5 ¦ Thermostat Arbeitszimmer  ¦  0C85C8 ¦    KEQ0718527 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
       6 ¦ Thermostat Gästezimmer    ¦  0C854A ¦    KEQ0718641 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
       7 ¦ Türkontakt Terrasse       ¦  0C3508 ¦    KEQ0755499 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.4 ¦      No
       8 ¦ Thermostat Wohnzimmer     ¦  0D6097 ¦    KEQ0920808 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
       9 ¦ Thermostat Esszimmer      ¦  0AD734 ¦    KMD3036051 ¦ 01FF ¦ BC-RT-TRX-CyG             ¦      1.8 ¦      No
      10 ¦ Türkontakt Haustür        ¦  056C01 ¦    JEQ0506224 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.3 ¦      No
      11 ¦ Thermostat Hausflur       ¦  0A33F3 ¦    KMD3040396 ¦ 01FF ¦ BC-RT-TRX-CyG             ¦      1.8 ¦      No
      12 ¦ Fensterkontakt Küche      ¦  0FABD9 ¦    LEQ1108974 ¦ 0400 ¦ BC-SC-Rd-WM-2             ¦      1.0 ¦      No
      13 ¦ Fensterkontakt GästeWC    ¦  0C3393 ¦    KEQ0755234 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.4 ¦      No
      14 ¦ Thermostat GästeWC        ¦  0D6015 ¦    KEQ0920933 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
      15 ¦ Thermostat Küche          ¦  0D1634 ¦    KEQ0996896 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
      16 ¦ Thermostat Schlafzimmer   ¦  0D16D1 ¦    KEQ0996737 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
      17 ¦ Fensterkontakt Kinderz... ¦  056DD7 ¦    JEQ0506185 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.3 ¦      No
      18 ¦ Fensterkontakt Kinderz... ¦  056A17 ¦    JEQ0505569 ¦ 040F ¦ BC-SC-Rd-WM               ¦      1.3 ¦      No
      19 ¦ Thermostat Kinderzimmer   ¦  0D1618 ¦    KEQ0996922 ¦ 01A0 ¦ BC-RT-TRX-CyG-3           ¦      1.0 ¦      No
      20 ¦ ECO-Switch Schlafzimme... ¦  0F9460 ¦    LEQ1158670 ¦ 0500 ¦ BC-PB-2-WM                ¦      1.0 ¦      No
      21 ¦ ECO-Switch Schlafzimme... ¦  0F9241 ¦    LEQ1147639 ¦ 0500 ¦ BC-PB-2-WM                ¦      1.0 ¦      No
      22 ¦ Thermostat Badezimmer     ¦  0AD72B ¦    KMD3036062 ¦ 01FF ¦ BC-RT-TRX-CyG             ¦      1.8 ¦      No
      23 ¦ Wandthermostat Kinderz... ¦  1A568E ¦    OEQ1825960 ¦ 03FF ¦ BC-TC-C-WM-4              ¦      1.0 ¦      No
Family 4>

Now it’s time to install homematic Binding in openHAB.
When activated, homegear should be automatically discovered as your bridge and after confirmation in your inbox, a device scan should find all your paired devices.

For the rest, proceed with the homematic Binding documentation.


Hi @hmerk,

thank you for the tutorial!
Am I understanding it correctly that I don’t need a MAX! cube for controlling the MAX! actuators?
I was thinking about switching to MAX! and I already have a CUL from my fhem days, so this would be interesting if I could just buy the actuators and skip the cube…

That is not what the tutorial is about, but yes, You can use a CUL for controlling MAX! actuators.
In homegear’s max.cfg you just need to edit the CUL part, not the CUN like described above.

Hi Hans,

Sorry to bug again. So ive been reading through these threads and thinking of converting my Max!Cube to a CUL device…Why?Well I want to control the boiler and the max! cube suffers from memory loss, which means it doesnt really work…

So ive understood about putting the new firmware on the Cube
Understood I can use Homegear to integrate with the max! devices
but what about “wife” friendly stuff like

Setting schedules, mobile phone integration etc? Is this all DIY via openhab/home assistant, node red etc?

Indeed, using the homematic Binding, homegear will be found as a Bridge and everything else can be done via openHAB.

Hi all,

is someone experiencing the same issue?
I paired my window sensors with homegear running on an openhabian system (rpi3) with a cul. the status changes are visible in my system like a charm.

but the curious thing is:
the window sensors blink 3x after i have e.g. opened the window, but not 1x as expected. but the status changes are correct transfered to my openhab system.

anyone got an idea?

This is normal, seems that some ACK packets are not send to the sensors, so they do a resend twice.

Hi hmerk,

I’m having the same problem with my eco switch. (flashed MAX Cube to CUN)
Is homegear responsible for sending the ACK packets? As it works with the heating thermostat (assuming it works the same way) it does not sound unsolvable. Any hints on were to look for this?

I try to use the switch in a rule but it behaves very strangely because of this issue.

I have no clue, guess it is the same for the heating thermostats, there is just no LED indicating.

The press is shown multiple times in the events in homegear, the messages from the heating thermostat aren’t. That makes me believe it is a homegear issue, I’ll try ask over there and report back if I find out anything.

It is definitely a homegear issue, as homegear should send ACK to the device.

Hi all.

After asking in the homegear forums my solution was to connect the flashed Cube via USB to the Pi and configure it as [CUL] in Homegear’s max.conf instead of CUNX. More details in the post.

@anon71383850 If you’re already having an USB-Connection this unfortunately won’t help you.


am thinking also on reflashiung of cube.
How it works on Homegear and OH? Everythinh good, found not visible problems, better then normal Cube? What would you say after some time of using it.

Thanks a lot!

I see no issues after reflashing, aüart from ECO Switches. You just jave to get used to homegear for configuration of devices.

And can you configure there also as in cube

  1. Weekprogramm
  2. Add windowsensors
  3. And one more important question - about cube polling. In OH2.4 Max biding it can be set uo to 1 sec refresh rate. Can it be also made in homegear?


Hi @thisisIO .

To clarify this:
If you flash the Cube none of the functionality the cube offered out of the box (Heating Schedule, Set Heating to “window open” automatically when the windows contact changes, Vacation Mode and so on) via the MAX Software will be available anymore because the MAX Software gets deleted by flashing. (and, most important, there is no way back after flashing once)

If you go that way, you would have to implement all those features by yourself using Items and Rules in Openhab. If you’re fine with the given functionality or aren’t willing to learn a lot of new stuff and fiddle around with a texteditor in rule and item-files you should not do it.

1 Like

You can set weekly schedules in homegear and create assosiations between devices.
Did not see anything about refresh intervall or pulling, so I think homegear informs oh about state changes immediately.

1 Like

Thanks a lot!

And if i unserstand right, with CUL FW Max will never loose its setting like with original FW?

Most of these functions can be configured in homegear, so no need for rules in openhab.
I created associations between Window Contacts and Thermostats, and it is working like with original MAX! software. Also have my week schedules defined in homegear.
And not to forget, the schedules can be set in openhab through thing properties/config. It is just not as comfortable as using original software.

1 Like