MaxCube loosing configuration


#5

How you do this?


#6

It is hardcoded in the maxcube component, so I have changed it directly in the code - the file is
components/maxcube.py
line 72 change 60 to 300
(This is of cause a temporary solution until I know if this will actually help. The change will be overwritten each time HA is updated)


#7

You use hassio?


#8

No I use an odroid xu4 with ubuntu.


#9

I see. I use HASSIO and don’t know how to to change (or even find) the file to change


#10

I too interested to know how to change py files in HASSIO. I use MAX but it looks like it is abandon by hass developers. Few key missing features.


#11

Im going to try and update the file to 10min intervals (HA doesnt need it that accurate). if it works then I’ll try and create a patch for the HA MaxCube component… wish me luck!

Edit
FYI the file to update is https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/maxcube.py and its now line 83


#12

Thanks, but where to put that file in a HASSIO installation?


#13

Im not using HASSIO (raspberryPI) but using docker. the file is in this location on my image

/usr/src/app/homeassistant/components

one thing to note is there are two maxcube.py files, one in the above location and one in the climate subdirectory. the one to modify is in the components directory


#14

I had a quick look on the haasio page and I think you need to install the SSH AddOn

https://www.home-assistant.io/addons/ssh/

Once installed you should be able to ssh into your haasio filesystem and make modifications

One word of caution… When you update HaasIO, or even my docker image, you need to redo the change. If the changes work then I’ll modify the code and put in a PullRequest allowing us to control the polling from a parameter in configuration.yaml


#15

You can override a build in component with a custom component in the HA configuration folder. This way you don’t have to make your changes each time HA is updated.

I have done that and you can get it here if you want to test it:

  • Create a “custom_components” folder in your HA config folder.
  • Place the maxcube.py file in the folder
  • Add the “update_interval” to you configuration.yaml file

I have been using it now for about 5 weeks, and it has been working fine so far - no resets to factory defaults!


#16

Thanks a lot, will try. under custom_components or under custom_components/climate??

I tried 600 (10 minutes), I think its ok from a user point of view (you do not need to change temperature or read it that often …)

EDIT now I will have to wait until next october to test it though, today we have 30 degrees :slight_smile:


#17

I receive this:
2018-04-30 10:55:55 ERROR (MainThread) [homeassistant.config] Invalid config for [maxcube]: [host] is an invalid option for [maxcube]. Check: maxcube->maxcube->host. (See /config/configuration.yaml, line 437). Please check the docs at https://home-assistant.io/components/maxcube/
2018-04-30 10:55:55 ERROR (MainThread) [homeassistant.setup] Setup failed for maxcube: Invalid config.

I am on 0.68. Shall I use this

maxcube:
  gateways:
    - host: 192.168.1.99
    - update_interval: 600

or this

maxcube:
  host: 192.168.1.99
  update_interval: 600

#18

with first I get

2018-04-30 11:02:02 ERROR (MainThread) [homeassistant.config] Invalid config for [maxcube]: required key not provided @ data[‘maxcube’][‘gateways’][1][‘host’]. Got None. (See /config/configuration.yaml, line 437). Please check the docs at https://home-assistant.io/components/maxcube/
2018-04-30 11:02:02 ERROR (MainThread) [homeassistant.setup] Setup failed for maxcube: Invalid config.


#19

I guess this

maxcube:
  gateways:
    - host: 192.168.1.99
      update_interval: 600

#20

Now no error, but where are the entity_id?

should be sensor.xxxxxx or ?


#21

If you are on HA 0.68 you get the latest one I made on github. The first one did not work with 0.68 - because 0.68 now support more than one maxcube. (Was release about the same time as i uploaded the first version)

In the next HA version the pull request is merged .so you can get it here if you can’t wait:

(You place it in custom_components, And when you update to next HA version you can remove it)

Note that “update_interval” has been renamed to scan_interval to be more consistent with other components.


#22

thanks, Im trying this out… Also thanks for the hint about “custom components”

Im also using the lightwaverf custom component which isnt part of the standard build, this technique should work there too!

thanks


#23

guys,

Just wanted to update all. I have my interval now set to 10mins on HA and 6Mins on a different project (https://github.com/asantaga/PiHeating) and so far so good no issues…

I dont think HA needs to be kept up to date that often, i might even change HA to be every 15mins. My boiler controller does need to be a little more responsive but every 6mins is fine, and I have a physical/web button which overrides this…

so far so good, no resets…


#24

guys,

Alas i found out today that my settings disappeared on the 31st Mar 2018. it appeared to work fine for 1.5months… :frowning:

I have two systems querying the radiators, one was 10mins seconds and the other one 6mins

I’ll increase HA to 30mins and the boiler control to 15mins… lets see how long that takes… :frowning: