I have recently managed to successfully flash my Max! EQ3 Cube with a a-culfw firmware.
Once running the new firmware, I expose my EQ3 radiator thermostats to Home Assistant via homegear and the built in component.
This guide will talk through the steps involved - but please heed the warnings, I take no responsibility if you break your kit!
-
Note that flashing the Max Cube is a one way deal, there isnāt currently any way to restore the default firmware.
Having said that, my cube forgot its configuration often (a common issue) - so it was mostly paper weight anyway. -
The firmware I link to on Google Drive is an edited version of the latest a-culfw and compiled by me to remove the credit restrictions.
If you are uncomfortable with this, simply use the prebuilt firmware from the official github page: https://github.com/heliflieger/a-culfw (the Mediafire link in the readme)
Otherwise - the firmware with no credits is here; https://drive.google.com/file/d/1y1L2Tt1iHgdyodw9M-Yxvy0niRtOXEQ2/view?usp=sharing -
As I note in the guide, pairing with HomeGear will fail if the device was not unpaired before flashing the cube.
The fix is to factory reset the device, but save yourself some hassle and unpair everything before proceeding
Ok - so on to the good stuff
First, download and install ATMEL SAM-BA 2.x (I used 2.18) from here:- http://ww1.microchip.com/downloads/en/DeviceDoc/SAM-BA%20v2.18%20for%20Windows.exe
Next, either grab the creditless firmware or use the offical firmware with credit restrictions mentioned above.
Lastly, grab Tera Term and install it on your PC: https://osdn.net/projects/ttssh2/releases/
Now, pop open your Cube - this should be fairly easy, just prise a small screwdriver at the notches in the bottom and it should pop right off.
Next you want to take a look at the board and find the two contacts on the board marked J1 - you need to use a paper-clip, or a small bit of wire to short these contacts together.
With the contacts shorted, plug in the USB for the Cube and apply power - count to 5 and remove the power again.
Your cube has now lost itās mind (literally) - the firmware is gone, and itās ready to accept a new one.
Remove whatever you used to short the J1 contacts, so that they are no longer connected.
Connect the USB cable back to the cube, and hook it up to your PC that has SAM-BA installed.
If using Windows, wait a moment for it to install the newly detected device - you should see a new COM port in device manager.
Now, start the SAM-BA software and pick your newly added COM port.
Pick your chip type - at91sam7x256-ek
Press the connect button, then click on the āFlashā tab.
Find the section 'Send File Name'
and point it at the bootloader_CUBE.bin
file.
Press Send File, and wait with excitementā¦
Once completed, youāll be prompted with a question asking if you want to lock the flash - Answer āNo
ā to this.
In the scripts drop down, ensure you have 'Boot from Flash (GPNVM2)'
selected, and press execute.
Close the ATMEL software and disconnect the USB.
At this point you have the new bootloader flashed to your Cube and it should be ready to accept the a-culfw firmware.
Flashing the a-culfw Firmware
The bootloader is activated by pressing the button located on the bottom of the cube while applying power.
So, press the button and insert the USB cable again - now release the button.
The D1 LED on the cube should be flashing 4x a second if the Cube successfully entered the bootloader, and you should see another new device appear in device manager.
Start Tera Term and pick File -> New Connection -> Serial
- Pick the COM port labelled 'AT91 USB to Serial Converter'
, and press OK.
Select File -> Transfer -> XMODEM -> Send
and pick the CUBE_BL.bin
file.
It should take less than a minute to flash the firmware - once completed the Cube will reboot and the light flashes 1x per second.
Well done - you now have a CUL/CUN device
The unit can be used via USB (Iāve not tested this) as a CUL, or in the same fashion as the original cube (using the network connection) acting as a CUN device.
HomeGear
Home Gear will act as a layer between the Cube and HomeMatic component for Home Assistant, and will be used to setup the devices you add to the cube.
You have a number of options here :-
A) There is an official image on dockerhub https://hub.docker.com/r/homegear/homegear/
I had a quick play with this, but couldnāt get homegear to load any of the modules - there seemed to be a permission issue inside the container, but Iām no docker expert so I gave up on that and just installed directly.
B) Install on a Linux machine natively (this is what I did as I have a Linux server running 24x7)
Follow the guidance at www.homegear.eu on how to install.
C) @AndrejDelany has kindly put together a preview Hassio add-on for Raspberry Pi - see Converting a MAX! Cube to CUL/CUN to use with Home Assistant
Once you have Home Gear installed you will need to configure it to talk to the cube - to do this, inspect your router/DHCP server and find out what IP has been issued to your Cube.
When you have determined the Cube IP go to your HomeGear install and edit the file /etc/homegear/families/max.conf
Add the following to the config (or uncomment the sample data and edit appropriately)
[CUNX]
id = Max-CUNX
default = true
deviceType = cunx
host = <CUBE_IP_ADDRESS>
port = 2323
responseDelay = 40
This is the config I use for connecting the the Cube via the network connection, if you are going down the USB route, you should use the CUL sample instead - but as previously mentioned, I havenāt tested this option.
Now restart HomeGear so that the new configuration takes effect.
We can use the homegear cli to add a user for HomeAssistant - execute āhomegear -rā on your homegear server.
Type: users create <USERNAME> "<PASSWORD>" "1"
(Include those quotes around password and 1ā¦)
At this point it is worth hitting http://<HOMEGEAR_IP>:2001
to make sure you are greeted by the HomeGear RPC Server page, if you are then carry on
Now you need to link your devices to the Cube using homegear - for this I used HomeMatic Manager (https://github.com/hobbyquaker/homematic-manager/releases)
So Iāll talk through the process for using that, but there are a number of clients you can use to manage HomeGear.
Unfortunately the HomeMatic Manager software is in German, and I couldnāt see any way to switch to English, so iāll include exact steps for the english speakers.
Start up HomeMatic Manager - you should be greeted with a connection screen - input your HomeGear server IP in to the 'CCU Adresse'
field and press 'Speichern und Neustarten'.
Note - you may get an error message when the app restarts (I did) but if it shows the IP of HomeGear with a green tick next to the row of tabs, then it should work OK.
Now we need to add the devices you own so they are paired to the cube - to do this, on the āGerate
ā tab press the ā+
ā at the bottom of the window.
Next press 'Aniermodus Aktivieren'
- this enables pairing mode on the cube, now go to your Max! device and put it to pairing mode as well.
I use the Max! Radiator thermostats, which are put into pairing mode by pressing the adjustment wheel for a few seconds.
After a few seconds of being in pairing mode, your device you show as detected in HomeMatic Manager.
I found it helps to dismiss the pairing screen once a device is paired and right click it on the list, then choose āUmbenennen
ā then enter a name for the device and press āSpeichern
ā.
Now repeat the process for all of your devicesā¦
- TIP! - If your device doesnāt appear to be pairing, it is worth taking a look at the HomeGear log - if the device already thinks it is paired, then the log will tell you and reject pairing with the device.
The Max devices can be factory reset using a combination of button presses which should allow it to re-pair - check the manual for your specific device.
Home Assistant Configuration
Now all your devices are added in HomeGear, we can finally get them into HomeAssistant - you should also see them listed if you hit the HomeGear server again at http://<HOMEGEAR_IP>:2001
Add the following to your Home Assistant configuration.yaml:-
homematic:
local_ip: <HOME_ASSISTANT_IP>
local_port: 36845
interfaces:
wireless:
host: <HOMEGEAR_IP>
port: 2001
callback_ip: <HOME_ASSISTANT_IP>
callback_port: 36845
resolvenames: json
username: <HOMEGEAR_USER>
password: <HOMEGEAR_PASS>
Restart Home Assistant once added - you should now magically see a bunch of homematic devices appear which correlate with your HomeGear devices.
Note, my device friendly names didnāt pull through from HomeGear to HA - Iāve not looked into this yet, but I simply used the serial numbers to determine which device was which (since the serial is displayed next to the friendly name I assigned in HomeMatic Manager).
Then I added a friendly name using the UI in Home Assistant.
I hope this guide helps someone, please let me know if this works for you, or if Iāve missed anything from the guide!