eQ-3 MAX! integration

i’d also try sending the command without the RF address, as i told you before. The protocol is ugly, but it’s quite open to creativity :smiley: it accepts a lot of different combination (sadly not for what concerns preset temperatures…)
If you reset the cube, please remember also to reset single devices (i had a problem i couldn’t fix resetting the cube, but got fixed resetting everything)

So… after the Wall thermostat arrived yesterday i tested it but did not work either.
So I deleted all Devices in the cube, did a reset of the cube and all devices and configured everything new.
And now its working!
Now it does not matter if I set the temperature for one of the thermostat or the wall thermostat, all is working and transmitted to the others.
The only thing is that stil when i change the value in HA it jumps back to the old value and after some time (seems to be your mentionied 30 seconds) it than shows the new value. Thats little bit confusing. As far as i understood this is because of your change of the timeouts. So its the same for you or is this still an issue only I have?
Nevertheless: Thank you again very much for your help and work on this integration!

Just to be complete here my latest logs. But as far as I understood even if it states “Error” it meens that al is fine?

Logger: custom_components.maxcube.maxcube.cube
Source: custom_components/maxcube/maxcube/cube.py:331
Integration: eQ-3 MAX!
First occurred: 17. November 2023 um 19:50:57 (20 occurrences)
Last logged: 09:52:00

Setting temperature 20.0 and mode 0 on device 0AF1A5! Room 01 - starting device mode 0 (command: 0004400000000AF1A50128)
Setting temperature 19.5 and mode 0 on device 0AF5FA! Room 02 - starting device mode 0 (command: 0004400000000AF5FA0227)
Setting temperature 20.0 and mode 0 on device 0AF544! Room 02 - starting device mode 0 (command: 0004400000000AF5440228)
Setting temperature 19.0 and mode 0 on device 0AF0D6! Room 02 - starting device mode 0 (command: 0004400000000AF0D60226)
Setting temperature 17.0 and mode 0 on device 0AF544! Room 02 - starting device mode 0 (command: 0004400000000AF5440222)

yes the reset of all devices is always a good solution lol
by points:

  • the update of values is another problem of the original integration, because entities (like climate) are updated by HA every 30 seconds if you do not implement a coordinator in the integration, and a coordinator there is not :slight_smile: So yes, it’s the same for me, but that’s not because of my modifications… please try my last code, it should update values of climate entities almost instantly (2 seconds, that empirically seems the time the cube needs to save new values). Now my user experience is quite good
  • your log has those lines because, if you remember, i asked you to change the level of the log reported, just because it was easier. If you update the code, it’s already back to debug. Otherwise, you just need to review that little line of text…

at the end of the day, this old system (i took it as soon as it came out, it’s around 10 years old) seems still quite good ald also working nicely with HA. It would be nice to rewrite the whole code with asyncio and a coordinator, but i’m not good enough to do that :slight_smile:

Please let me know if you have any more problem. Have you seen you also have a “cube” entity that changes all the rooms at once? :slight_smile:

Just wanted to be sure regarding this Error because i wondered why it is not “informational” or something like that.
You are right, changing it back to debug or uploading your new files lead to having no more entries in HA Logs, so looks pretty good now.

Regarding the change of temperature:
The sending to the device is working fine, its just the value shown in HA which is wrong for these 30 seconds. Not sure if i got you right that this should be fixed with your latest code or if this could only be fixed via this “coordinator”?

And yes I absolutely agree that (now with your integration) the old EQ3 Max System is working very well with HA. I just bought them last year because many people now want to get rid of them because the termination of the cloud service.
For me its more or less enough to have a system with time schedules and in some special situations to be able to change the temperature for one room remotely if i come home earlier.

it is, more or less, fixed, since the climate entities calls an update of the info 2 seconds after a change of mode or temperature.
Please remember to leave a short time in scan_interval, otherwise it’s useless…
i have this:

maxcube:
  gateways:
    - host: cube.lan
      scan_interval: 1

try and please let me know if this is ok for you :slight_smile:
without a coordinator we are not able to get climate entities to update faster than once every 30 seconds…

Great, with this change in the configuration.yaml its working perfect now for me.
Sorry but i was not aware that there is the possibility to change this interval there.

One question thats maybe not directly caused by your integration but maybe you have an idea if that would be easy to fix?
I wanted to use the corrent_temperature of the thermostats as value in a card via template. But creating this template gave back an error and as far as i understood thats because the value is not stored as numeric value but as string:

‘Sensor None has device class ‘temperature’, state class ‘measurement’ unit ‘°C’ and suggested precision ‘None’ thus indicating it has a numeric value; however, it has the non-numeric value: ‘“21.0”’ (<class ‘str’>)’

Is this correct?

i get a true with this

{{ is_number(state_attr('climate.camera_termostato_camera', 'current_temperature')) }}

would you post your code?

Thanks again very much. This worked and comparing your code with mine I recognized I used started and ended with " and that seemed to cause this issue.
As I only use examples I can find and do not really understand what I’m doing I did not understand that these " are wrong in this case…

Thank you for this great integration!
With this I managed to connect to my MaxCube. #all binary sensors (window contacts, battery state) are displayed.
But unfortunately the climate entities are not integrated. I get the following error message:

Error while setting up maxcube platform for climate
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 359, in _async_setup_platform
    await asyncio.shield(task)
  File "/usr/local/lib/python3.11/concurrent/futures/thread.py", line 58, in run
    result = self.fn(*self.args, **self.kwargs)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/maxcube/climate.py", line 80, in setup_platform
    devices.append(MaxCubeClimate(handler, handler.cube))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/config/custom_components/maxcube/climate.py", line 343, in __init__
    self._device.eco_temperature = max(self._device.eco_temperature, device.eco_temperature)
                                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: '>' not supported between instances of 'NoneType' and 'float'

I firmly believe that the code of the integration is correct. That’s why I’m surprised by the message and I don’t really know what to do with it.
Any idea?
I would be grateful for a little help

ahahah you should not!
i can understand from the line of code quoted what it is about: i added a “fake” climate entity for the cube itself, to allow centralized control of all the devices. For this, i needed to find some “fake” temperatures, through that function (basically, it should take all the eco temperatures of all devices an return the biggest one)
It seems one of your devices returns a “nonetype” in the eco_temperature, that is quite strange.
can you manage to add some debugging code just to understand which device has wrong info?

Edit to add: since i have no window contact sensors, i’m wondering:

  • if they work anyway :smiley:
  • if i put a strong filter to avoid the code to query window contact sensors for eco temperature (i think so, but who knows?)

if you can manage to read some code, i’d check this (since this is the structural difference)
Otherwise, maybe try to remove window contact sensors from your infrastructure and see :slight_smile:

I also have a few window sensors and for me its working without problems.
So it seems its not a general issue with the sensors.

Thanks for this custom component.
Will try to set this up!

Question in advance: What are the possibilities regarding to temperature updates?

  • In the original integration, the TRV’s update their current temperature too irregular to be usefull…

In the OpenHab integration there seems to be a possibility to set up the update interval (see Max EQ3 - Refresh temperature - #5 by mstormi - Bindings - openHAB Community)

please stop thanking me for the integration, i just fixed some bugs and added something :slight_smile:

for your question: the integration has a setting for the update interval, i use it set to 1 second. This is NOT the frequency temperatures are updated, this is the minimum interval between two queries to the cube.
For the rest, all climate entities update every 30 seconds if untouched, but they also update specifically every time you change something in the control window.
For my use this is enough, and also 30 seconds for a temperture update seems ok to me.
If you want more frequent updates, i fear you’ll have to learn how to code a proper coordinator :slight_smile:

Unfortunately, I only now get around to answering, I was incapacitated by a cold.

I must have had a “Schroedinger Cat” similar window sensor. He was paired and at the same time he wasn’t. Unfortunately, he didn’t have it deleted.

I decided to reset the cube and just connect the thermostats. It worked without any problems!

Then I added a window contact again and it came back to the same error message.

For now, I’m omitting the window contacts. A warm house is currently more pleasant than a recognized, open window :slight_smile:

My legendary coding skills are on the level of an 8-year-old script kid.
I’m happy to try to help though.

i have no idea how, but try resetting also the window contact sensor. Look on the manual, as i already reported i had a problem that could be solved only resetting all the devices (not only the cube)

@MassiPi
Hello there!
Looks like an improvement to the original integration.
However, I did follow your instructions, placed everything in custom_components\maxcube dir but it doe snot work.
I’m getting this in the log file

File "/config/custom_components/maxcube/__init__.py", line 7, in <module>
    from .maxcube.cube import MaxCube
ModuleNotFoundError: No module named 'custom_components.maxcube.maxcube'

However, in the States, I see attributes are now changed and different from original ones:

restored: true
hvac_modes: off, auto, heat
min_temp: 5
max_temp: 30.5
preset_modes: none, boost, comfort, eco, away, on
friendly_name: Livingroom Wall thermostat
supported_features: 17

any idea why HA can’t read the module in question?

you should have, in custom components, a folder “maxcube” (and i see you have it) and also another folder inside maxcube that is called again maxcube (sorry about that, lol, but i kept the original names of integration and cube library) (basically, you should have /config/custom_ components/maxcube/maxcube)
the error seems saying that you have not the second one (or, at least, that there is no cube.py file.
Can you check?

Thanks for the prompt response! Really appreciate it.

I already do have exactly as you described and that’s why I’m confused by the error.
image

damn honestly i have no idea at all. This i basic python, i’m not the king of the mountain but at least it seems to work for me :slight_smile: i can just suggest to start back from scratch, but i can’t expect the cube.py file not to have contents.
Are ACL ok on files?

@MassiPi I changed from the official integration to yours for the reason, that independent of what I enter as scan_interval, I end with my window sensor not beeing updated more often than every 30 second. Do you, or somebody else, have different behavior, or can guide me on how to get lower update rates?
It seems like independent of when I close or open the sensor, every 30 s the value is sampled… this stays the same with the official and with yours.
PS: Thanks for the integration :smiley: