E-thermostaat | ICY

I have the same issue

Hmm, I havenā€™t followed the latest developments on home assistant. But from the logs it looks as if they might have converted all components to asynchronous updates and stopped supporting the way I was using here.
When I implemented the component, I used the generic thermostat as template, so maybe you can have a look there and compare the versions. The basic protocol should probably still work. As I said I donā€™t have the thermostat anymore so itā€™s difficult to debug for me.

I think you are pointing in the right direction. There are some changes, to start with the setup of the platform.

Iā€™ve tried to deal with them but since Iā€™m not a programmer itā€™s mainly trial and error without knowing what Iā€™m doing. Someone else working on it?

Iā€™ve tried this:

@asyncio.coroutine
def async_setup_platform(hass, config, async_add_devices, discovery_info=None):
    """Setup the e thermostat."""
    name = config.get(CONF_NAME)
    saving_temp = config.get(CONF_SAVING_TEMPERATURE)
    away_temp = config.get(CONF_AWAY_TEMPERATURE)
    comfort_temp = config.get(CONF_COMFORT_TEMPERATURE)
    username = config.get(CONF_USERNAME)
    password = config.get(CONF_PASSWORD)

    yield from async_add_devices([EThermostaat(
        name, username, password, saving_temp,
        away_temp, comfort_temp)])

But getting the error:

2017-12-09 13:31:09 ERROR (MainThread) [homeassistant.components.climate] Error while setting up platform e_thermostaat
Traceback (most recent call last):
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 171, in _async_setup_platform
    SLOW_SETUP_MAX_WAIT, loop=self.hass.loop)
  File "/usr/lib/python3.6/asyncio/tasks.py", line 352, in wait_for
    return fut.result()
  File "/usr/lib/python3.6/asyncio/futures.py", line 244, in result
    raise self._exception
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/config/custom_components/climate/e_thermostaat.py", line 84, in async_setup_platform
    away_temp, comfort_temp)])
TypeError: 'NoneType' object is not iterable
2017-12-09 13:31:09 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/lib/python3.6/asyncio/tasks.py", line 179, in _step
    result = coro.send(None)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 399, in async_process_entity
    new_entity, self, update_before_add=update_before_add
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity_component.py", line 247, in async_add_entity
    yield from entity.async_update_ha_state()
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 231, in async_update_ha_state
    attr)
  File "/usr/lib/python3.6/site-packages/homeassistant/helpers/entity.py", line 333, in _attr_setter
    value = getattr(self, name)
  File "/usr/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 736, in supported_features
    raise NotImplementedError()
NotImplementedError

That issue is caused by this PR https://github.com/home-assistant/home-assistant/pull/10658.

I have updated the e-thermostaat custom component and itā€™s working now on v0.59.2.
You can find this version here https://github.com/gerard33/home-assistant/blob/master/e_thermostaat.py.

I have justed changed it, so itā€™s not quite tested yet.
I noticed the following:

  • the Away switch has disappeared
  • when choosing operation mode Comfort, the correct temperature is choosen (from configuratio.yaml), but operation is shown as Away
  • when choosing operation mode Saving, the correct temperature is choosen, but operation is shown as Comfort
  • the other 2 operations are looking good

Could you please also test it and let me know if you have the same. If so, I will try to fix that.

1 Like

The away switch is probably gone, since you should enable ā€œSUPPORT_AWAY_MODEā€.

See:
https://github.com/home-assistant/home-assistant/blob/dev/homeassistant/components/climate/ecobee.py#L49

Regarding the away/comfort issue:
These values are rather arbitrarily.

I had better luck with these:

FIXED_TEMP = 160
COMFORT = 32
AWAY = 64
SAVING = 24
1 Like

Good work!
Iā€™ll update mine this afternoon to see if it works.

Before the update, the thermostat already falsely indicated the Away/Comfort mode.

It was also hopping between the two modes randomly, this could also be related.
Everyone left home during the example below.

Yeah the ā€œmodeā€ number is probably some kind of ā€œbit-codeā€. It changes depending on the other settings of the thermostat. As I said before try changing the SAVING number to 24, that solved the issue for me when I still had the thermostaat. But it could be the same for AWAY and COMFORT, that you have to change the numbers a bit there.

You can add a debug statement

   _LOGGER.debug("configuration number: {}".format(self._old_conf[0]))

here to see what number you are getting.
I match the number to the closest value and return the operation mode here:

But maybe the check should better be a range, i.e. number 0-31 is SAVING, 32-63 is COMFORT, 64-127 is AWAY and > 128 is FIXED_TEMP.

2 Likes

Thanks! Was already trying to change this values a bit based on some other Icy plugins on Github.
Will add your logger to see which values to use.
Appreciate your help, especially now you donā€™t have this thermostat anymore :slight_smile:

Other question: in my latest version (which is not on Github yet) I have changed the Away mode to ā€œlang-wegā€ and the Saving mode to ā€œbespaarā€ as that makes more sense to me.
Any specific reason you had to link the ā€œbespaarā€ mode to Away?

1 Like

Great job for this fix. At my system itā€™s working again. The away switch is shown at my place, and it seems the Away/Comfort mode are both working fine after the config suggestion of @daenny

What exact values did you use?

I managed to retrieve the ā€˜away modeā€™ by adding the suggested code, but Iā€™m not sure what values to change to fix the Away/Comfort settings.

I currently have:

# Personal settings in e-thermostaat.nl
DEFAULT_SAVING_TEMPERATURE = 15
DEFAULT_AWAY_TEMPERATURE = 12
DEFAULT_COMFORT_TEMPERATURE = 18.5

And

# Values reverse engineered for settings
FIXED_TEMP = 160
COMFORT = 32
AWAY = 64
SAVING = 0

Should I match the ā€˜reversed engineeredā€™ settings to my preferences, or are they used elsewhere?
Sorry, Iā€™m not that familiar with Python :sweat_smile:

Thanks!

Thanks for your suggestion! I have implemented this in a new version which is available here home-assistant-archive/e_thermostaat.py at master Ā· gerard33/home-assistant-archive Ā· GitHub.
With the previous method I had a value of 60 for the Comfort state, which however was mapped to the Saving state, but with the new method this is now mapped correctly.

@sharki and others, if you want to use this version, there are some changes you need to take into consideration:

Your configuration.yaml could look like this:

# E-Thermostaat Icy
climate:
  - platform: e_thermostaat
    username: !secret icy_username
    password: !secret icy_password
    comfort_temperature: 18.5
    saving_temperature: 15
    away_temperature: 12
2 Likes

Great work on the code!

The issue remains the same, the only two options my GUI can display is the ā€˜vaste temperatuurā€™ (fixed temperature) or ā€˜bespaarstandā€™ (savings mode). Both comfort and ā€˜lang-wegā€™ directly jump to ā€˜bespaarā€™ after setting them.

The int to operation mode you wrote does look like it should have solved that. I have no idea where it goes wrong. After adding the debug line mentioned by daenny it complains that ā€˜selfā€™ is non-existing.

That is strange as all four options are working here.
Did you copy my complete code? Because I have made a lot of changes, also again to these values

# Values reverse engineered for settings
COMFORT = 32
SAVING = 64
AWAY = 0
FIXED_TEMP = 128

And what I did to easily track the values of the thermostat, I changed

_LOGGER.debug("E-Thermostaat configuration number: {}".format(self._old_conf[0]))

to

_LOGGER.error("E-Thermostaat configuration number: {}".format(self._old_conf[0]))

so that the values are shown in the log, without needing to change the logger component.

Thanks for the quick replies!

Yes, I copied the whole code. Iā€™ll try later if changing the default temperatures (those I did change slightly) solves the problem.

Edit:
@gerard33 After using your code without alterations it works perfectly.
Thanks again!

1 Like

Hi Guys,
I am new to home assistant and wanted to add this script to read and control my ICY Thermostat.
It loads the component but gives the error:
Config validating

Config error. See dev-info panel for details.

If i look in the dev log i only can see:

starting version 3.2.4
Testing configuration at /config
2018-02-09 21:51:42 ERROR (MainThread) [homeassistant.bootstrap] Unable to setup error log /config/home-assistant.log (access denied)
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up recorder
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up http
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain recorder took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain http took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up history
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up websocket_api
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up api
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up system_log
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain history took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain websocket_api took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain api took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain system_log took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up frontend
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain frontend took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up updater
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up discovery
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up map
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up sun
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up group
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up sensor
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up climate
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain updater took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain discovery took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain map took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain sun took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain group took 0.4 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain sensor took 0.1 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain climate took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up conversation
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up logbook
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up tts
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up config
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up cloud
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up panel_iframe
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain conversation took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain logbook took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain tts took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up automation
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setting up script
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain config took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain cloud took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain panel_iframe took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain automation took 0.0 seconds.
2018-02-09 21:51:44 INFO (MainThread) [homeassistant.setup] Setup of domain script took 0.0 seconds.

Can someone please help me?
Thanks in advance.

Just added the custom component by creating a file called : e_thermostaat.py in directory /config/custom_component/climate/
Latest code can be retrieved from :

Added the following in configuration.yaml :

climate:
      - platform: e_thermostaat
        username: !secret icy_username
        password: !secret icy_password
        comfort_temperature: 20
        saving_temperature: 15
        away_temperature: 12

Et voila, I just added a thermostat to my Hass.io setup.
I can confirm this custom component works on version : v0.81.2

Thanks to @daenny & @gerard33 for your code & alterations!

1 Like

Anyone else having trouble controlling this component through Google Assistant via Nabu Casa?
I could control the thermostat through google assistant before a while ago. Iā€™m not sure what changed. I tried updating my e_thermostaat.py, no go unfortunately.

The thermostat shows up in my google home app, but it cannot be controlled.
If I try to control it by voice (Hey Google, set the thermostat to 20 degrees), the response is: ā€œThat mode isnā€™t available for {{name}}ā€.

Any ideas?

I donā€™t use Nabu Casa but I have the same problem.

1 Like

Hi there,

Iā€™m pretty new with this. Does this also still work on 0.82.1. I donā€™t get it to work. I donā€™t know what I have done wrong.

Thanks in advance
Ivo Frenken