Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MaxCube reset to fatory defaults #12

Closed
dingusdk opened this issue Mar 28, 2018 · 11 comments
Closed

MaxCube reset to fatory defaults #12

dingusdk opened this issue Mar 28, 2018 · 11 comments

Comments

@dingusdk
Copy link

My Maxcube is loosing the configuration (reset to factory defaults) with and interval of about 3-6 weeks. It only happens when connected to HA. Other users are having the same issue:

https://community.home-assistant.io/t/maxcube-loosing-configuration/46663

It looks like a general problem with MaxCube and not just your maxcube-api. Openhab users have had the same problem. I have tried changing the polling interval from 1 minute to 5 minutes as suggested by other users:

home-assistant/core#12551 (comment)

  • and have not had the issue since (only about 14 days siince i did it, so not sure if it will actually fix it).
    It would be nice to be able to set this from the HA config, so i don't have to manually change the code each time HA is updated.

Another improvement (this was also done in openhab), was to be able to choose exclusive mode, so the maxcube-api does not close the connection.

@Ener-G
Copy link

Ener-G commented Apr 20, 2018

It would be nice to be able to set this from the HA config, so i don't have to manually change the code each time HA is updated.

Another improvement (this was also done in openhab), was to be able to choose exclusive mode, so the maxcube-api does not close the connection.

Yes, this would be an excellent solution

@cs42
Copy link

cs42 commented Sep 17, 2018

I had this problem (using FHEM FYI) too and was searching a cause for a long time. Reading many discussions I am sure now, that this is a connection handling problem of the max cube (some race condition/overflow).

The solution seems to be to use a "blocking" access (open connection once, never close it) instead of opening a new connection on every query from a home automation system, if that is possible. As there can only be one connection to the cube at a time you can't use EQ-3 cloud then or connecting with their windows software.

As EQ-3 never officially documented their protocol I'm almost sure that they see this as "non issue"...

@dingusdk
Copy link
Author

Making a longer polling interval only postponed the problem.
After a longer testing period of now about half a year, I am almost 100% sure the library should have a "exclusive" - keeping the connection mode, to solve the Max Cube resets.

@ghost
Copy link

ghost commented Jun 30, 2019

Hello,

Is there something new about this issue? I have the same problem with my setup ( home assistant and max cube ). I have pooling interval setup to 5 minutes and once about half a year max cube gateway is reset to factory settings.

@mike-k68
Copy link
Contributor

mike-k68 commented Dec 30, 2020

Hello,
The only solution is to use a keep-alive connection:
Connect to the cube and never release the connection.

Doing so, i am able to poll every second without any factory reset.
But I need to kill my daemon whenever I want to use the Max! Software and restart it when I’m done. (The cube only allows one connection at a time)

If interested I can post my code in a fork here, but you may need to make adaptations, since I’ve taylored my code for my own need with my MQTT daemon.

@mvzut
Copy link
Contributor

mvzut commented Jan 11, 2021

Hi mike-k68,

It would be great if you can share how you managed to change to a keep-alive connection! This would not only solve the issue of Cubes being reset, but would also enable us to have real-time updates. Using it as an MQTT daemon is also a really nice solution. Really interested!

@mike-k68
Copy link
Contributor

mike-k68 commented Jan 11, 2021 via email

@unaiur
Copy link
Collaborator

unaiur commented Jan 11, 2021 via email

@mike-k68
Copy link
Contributor

Ok, I did the fork.
You may find my code here: https://github.com/mike-k68/python-maxcube-api
Don't hesitate to ask questions if needed.

@unaiur
Copy link
Collaborator

unaiur commented Jan 13, 2021 via email

unaiur added a commit to unaiur/python-maxcube-api that referenced this issue Jan 23, 2021
Refactor connection handling to use persistent connections and
reduce the chance of hitting a known bug in the Max! Cube that
resets to factory setting once every 50,000 connections.

Issues fixed:
 - uebelack#12

Breaking changes:
 - MaxCubeConnection object removed. MaxCube constructor now receives
   the host and port parameters directly
 - The connection is not released after each command is send. This
   can block other applications to connect to the Max! Cube. You
   can call cube disconnect() method to release the connection
   manually.
unaiur added a commit to unaiur/python-maxcube-api that referenced this issue Jan 23, 2021
Refactor connection handling to use persistent connections and
reduce the chance of hitting a known bug in the Max! Cube that
resets to factory setting once every 50,000 connections.

Issues fixed:
 - uebelack#12

Breaking changes:
 - MaxCubeConnection object removed. MaxCube constructor now receives
   the host and port parameters directly
 - The connection is not released after each command is send. This
   can block other applications to connect to the Max! Cube. You
   can call cube disconnect() method to release the connection
   manually.
unaiur added a commit to unaiur/python-maxcube-api that referenced this issue Jan 23, 2021
Refactor connection handling to use persistent connections and
reduce the chance of hitting a known bug in the Max! Cube that
resets to factory setting once every 50,000 connections.

Issues fixed:
 - uebelack#12

Breaking changes:
 - MaxCubeConnection object removed. MaxCube constructor now receives
   the host and port parameters directly
 - The connection is not released after each command is send. This
   can block other applications to connect to the Max! Cube. You
   can call cube disconnect() method to release the connection
   manually.
unaiur added a commit to unaiur/python-maxcube-api that referenced this issue Jan 24, 2021
Refactor connection handling to use persistent connections and
reduce the chance of hitting a known bug in the Max! Cube that
resets to factory setting once every 50,000 connections.

Issues fixed:
 - uebelack#12

Breaking changes:
 - MaxCubeConnection object removed. MaxCube constructor now receives
   the host and port parameters directly
 - The connection is not released after each command is send. This
   can block other applications to connect to the Max! Cube. You
   can call cube disconnect() method to release the connection
   manually.
unaiur added a commit to unaiur/python-maxcube-api that referenced this issue Jan 24, 2021
Refactor connection handling to use persistent connections and
reduce the chance of hitting a known bug in the Max! Cube that
resets to factory setting once every 50,000 connections.

Issues fixed:
 - uebelack#12
 - [Unable to change back to scheduled temperature (auto mode)](uebelack#24

Breaking changes:
 - Increased minimum supported version of Python to >= 3.7
 - MaxCubeConnection object removed. MaxCube constructor now receives
   the host and port parameters directly
 - The connection is not released after each command is send. This
   can block other applications to connect to the Max! Cube. You
   can call cube disconnect() method to release the connection
   manually.
@unaiur
Copy link
Collaborator

unaiur commented Jan 24, 2021

Resolved in 0.4.0 version

@unaiur unaiur closed this as completed Jan 24, 2021
unaiur added a commit to unaiur/core that referenced this issue Mar 14, 2021
This new version implements a workaround for a hardware bug
that causes a factory reset of the full MAX! service.

See uebelack/python-maxcube-api#12
for more details.
balloob pushed a commit to home-assistant/core that referenced this issue Mar 15, 2021
This new version implements a workaround for a hardware bug
that causes a factory reset of the full MAX! service.

See uebelack/python-maxcube-api#12
for more details.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants