Eq3 Max! Cube and thermostat integration via Mqtt and Max Home Automation

Hi all,

I have a question to eq3 Max integration. Like most I have my Max cube integrated into Home Assistant, however update intervals and requests to thermostats are unstable and periodic.

Has anyone considered/implemented the interface from
http://www.dmitry-kazakov.de/ada/max_home_automation.htm and redirected (or bridged) the Mqtt server to that of home assistant? Then HA should be able to interface directly via Mqtt to the thermostats using the home automation interface. Further, there are many more options such as valve positions, battery status and thermostat conditions. What also drew my attention is the monitoring of the RF trafic to prevent congestion, which may solve the config issues with the cube?

I suppose the main question is has anyone got any experience with using the the interface with home assistant?

I will install the Max Home Automation Interface in a seperate pc and let the values track for some time to determine if it’s more stable given the same hardware and locations.

I’ve tried to bridge the max_home_automation MQTT server with mosquitto.
This works if you subscribe to all topics. Mosquitto config:

connection max_home_automation
address 192.168.0.2:1883
topic 162BEC/# both 0

I can’t get hassio to use those bridged topics.
I guess it’s because max_home_automation uses a space in some topics.

I have switched to using the software (running on a PC within the LAN) and then bridging the MQTT brokers. Seems to work great so far and much more stable than the integrated solution but have only been monitoring so far (subscribing to 4 different radiator thermostats). Will be looking at integrating some update/scheduling functions soon though so will see how that goes

I have also had good experience sofar with the integration, seems much more stable with faster polling intervals possible.
I also determined that with the home-assistant built-in integration, the configuration is reset if the official windows application (daemon) is running at the same time in the same network. I now always ensure that I have closed the official application after setting up the temperature profiles for automatic mode on the thermostats.

I want to know try installing max_home_automation on my ubuntu server (same machine as home assistant) and then linking my mosquitto Mqtt server.

how to connect it to the home assistant? is there a way to control it with max home automation?

Hi everyone,

Home Assistant MQTT integration unfortunately doesn’t work with MAX Home Automation. Even with mosquito in between.
But the MAX Home Automation HTTP API works fine. Here is freshely publised integration I just made for myself https://github.com/koleo9am/hass_max_home_automation/tree/master . Feel free to try.

looks great
I’d be glad to try it (and I have wall thermostats) when I have time
however I tried to install the max home automation on my raspberry pi but have been facing issues (plus it seems to slow the pi quite much so I’m not sure if it is a long term solution)

What was the problem? Instalation of Max! Home Automation or Home Assistant?
For Installing Max! Home Automation you have to upgrade Raspbian to Buster - as described here: https://sourceforge.net/p/max-home-automation/wiki/Raspberry%20installation/.
When I was installing the HA to raspberry, I had to install the wheel and home assistant python packages outside the virtual environment first. Than I had run HASS also outside the virtual environment. I was able to run it in virtual environment after finishing first setup.

Yes the issue was installing max home automation on a stretch hassbian
Two questions: did upgrading hassbian to buster provoke any issue? Also didn’t you have any slowing issue?

Well, I have started with freshly installed Raspbian Stretch Lite. The upgrade was without any issues. I wrote a guide for it, which is published by Dimitri Kazakov on sourceforge: https://sourceforge.net/p/max-home-automation/wiki/Raspberry%20installation/.
Problem of running max_home_automation on Stretch is, that it needs libgnat-8 which has no packages for Stretch.
I really don’t know if there is some slowing issue.

“top” output - hope this helps a bit:

Tasks: 106 total,   1 running, 105 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4.0 us,  1.2 sy,  0.0 ni, 94.9 id,  0.0 wa,  0.0 hi,  0.0 si,  0.0 st
MiB Mem :    927.2 total,    353.1 free,    115.2 used,    458.9 buff/cache
MiB Swap:    100.0 total,    100.0 free,      0.0 used.    742.8 avail Mem

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+ COMMAND
 1240 pi        20   0  131836  38180  22124 S  11.3   4.0  20:43.44 Xvfb
 1247 pi        20   0  259040  73596  60260 S   7.9   7.8  13:13.90 max_home_automa
 1756 root      20   0       0      0      0 I   0.3   0.0   0:03.64 kworker/u8:1
 2516 pi        20   0   10596   3064   2548 R   0.3   0.3   0:00.40 top
    1 root      20   0   30960   7332   5872 S   0.0   0.8   0:08.76 systemd

There is running HA, max_home_automation, headless X11 (xvfb) on the RPi. It is model 3B+.

So far I have not encounter any slow responses.

I had some minor problems when installing HA in virtual python environment. It was some perrmisions issues. I solved it by installing and first run of HA without virtual environment. After that I was able to run HA in virtual environment.

Ok I just tried to switch to Buster following your instructions, it broke my HA install :expressionless:
I have to get revert to my backup now…

Any way to install MHA on Rpi running HASSIO? through out an add-on maybe?

I am realy sorry to hear that. As I wrote, I made a clean instalation.
Can you tell what went wrong?

Hope You didn’t lose any crucial settings.

not your fault!
I did a backup before, but now I can’t get my Zwave stick to work on the backup… I don’t understand why! -> Issue after restoring a backup

I might start from scratch with a docker container this time…

Ok my problem is solved and I’m back to my previous configuration
So I might give another try with a spare Pi (1) I have!

so I tried again to install max home automation on a spare Pi, followed your instructions and everything seemed fine
the only (big) problem I have is that the X11 forwarding does not work (neither on a Mac or Windows) so I cannot set up the software :face_with_symbols_over_mouth:

With windows I use MobaXterm https://mobaxterm.mobatek.net/download.html. Home edition is sufficient.

The integration is using JSON API for whole cube from max_home_automation. I encounter, that sometimes, usually after restart of RPi, some windows sensors and eco button get to some strange state, that max_home_automation is not able to process. Unfortunatelly the JSON API returns empty device list.

Open&close window and clicking the button usually helps to resolve the issue.

I plan to read list of devices via another max_home_automation API, that does’n suffer this issue and use JSON API for separate devices. Hope I will finish this by end of week.

I used Moba Xterm! and confirmed it worked with xclock, so not a set up issue between server and client…

So your setup is as follows?
Two RPis, one with HA and second with MHA.
MHA with HTTP API enabled and set to be available not on localhost and port 8080, but on IP of your RPi with MHA.

Did you try to call MHA with wget or curl?
Something like: http://192.168.1.123:8080/get-status-json?cube=ABCDEF
It should return JSON with devices. If this doesn’t work, then there is problem with MHA configuration.

Run MHA X11 forwarded. Look in the “trace”. To run HTTP API on port 80 may return in error, if ths port is already used.