Support for AVM Fritz! Smart Home Components

Hi Folks,

in the Components Section I found some Support for the AVM Fritz!Box and for Fritz!Callmonitor but none Support for the Fritz! Smart Home Components.
I wonder if they can be supportet? Especially the Fritz! Radiator Thermostat DECT300: https://avm.de/ratgeber/smart-home/heizkosten-reduzieren-mit-fritzbox-und-fritzdect-300/

They are very common in Germany and would be a great addition to Home Assistant.

When I used FHEM they where supportet via this module: http://fhem.de/commandref.html#FBAHAHTTP

Ist something similar possible for HA?

Thanks in advance

I have installed platform: fritzdect
And using 2 Fritz!Dect 200 switches.
Can see the temparature, power usage and can them switch on/off

I didn’t talked about the DECT200 Switches. I was talking about the DECT300 and COMET Radiator Thermostats :wink:

They don’t work with Home Assistent at the moment.

You said:

So that is not true. There is support for the DECT200 pretty well working. Hopefully for the DECT300 in the near future.

The Fritzdect 200 (and maybe 210) work. But support for CometDECT and Fritzdect 300 is sadly missing. I hope this can be implemented soon.

Hi, i’m working on a prototpye that supports DECT300/CometDECT as custom component … if someone is willing to test it please let me know. I think I will have a running version in the next days …

1 Like

Wow, that sound pretty cool!
I would be glad, if I’m can help you testing it in some way.

I just pushed an early version that seems to do basic stuff …

please check:

This custom component needs the pyfrithome module from pypi https://pypi.python.org/pypi/pyfritzhome/.

2 Likes

Wow, that was fast. Thank you very much!

I first installed pyfritzhome (using python 3.6), configured my configuration.yaml according to your github page an restarted my Home Assistant Server.
But unfortunately I can’t see any Fritz Home entities

What are those id’s that you are using in the configuration on yout github page?
Do they correspond to the identification numbers (IPEI) on the Fritz web interface?

Sadly the HA error log doesn’t give any usefull information…

Can you please check if you can login and list the devices by using the fritzhome cli tool included in the pyfritzhome python package. This should be installed in your PATH when you installed with pypi.

I think you mean the IDs that are mentioned in the lacrosse section?! If so this is only related to the lacrosse compnent and does nothing to do with the fritzhome component.

As said it is an early version and I have to add more debug stuff.

–
Heiko

Ahhh, maybe thats the problem. I didn’t install pyfritzhome with pypi.
I just installed it with

sudo pip3 install pyfritzhome

My system is running on debian jessie amd64 with python 3.6.2

No that is correct . Pip uses pypi.

Ok, seems my problem was that I configured the lacrosse platform somwhow.
After deleting the lacrosse stuff and rebooting Homeassistant I now can see my COMET thermostats via HA :slight_smile:

That’s fantastic!

But setting a temperature doesn’t seem to work for now.
In the HA error log I get something like:

2017-10-25 20:49:04 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1026, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 332, in async_temperature_set_service
    yield from climate.async_set_temperature(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 608, in set_temperature
    raise NotImplementedError()
NotImplementedError

Hi @hthiery,

thanks for the update on the fritzhome component files on github.
Sadly I still have no luck to set any temprature over the HA webinterface with it.

The HA error looks now like this for me:

2017-10-31 15:27:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1026, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 332, in async_temperature_set_service
    yield from climate.async_set_temperature(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/root/.homeassistant/custom_components/climate/fritzhome.py", line 91, in set_temperature
    self._device.set_temperature(temperature)
AttributeError: 'Device' object has no attribute 'set_temperature'
2017-10-31 15:28:31 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 434, in start
    yield from resp.prepare(request)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 240, in prepare
    return (yield from self._sendfile(request, fobj, count))
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 61, in sendfile
    yield from orig_sendfile(request, fobj, count)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 121, in _sendfile_system
    writer = yield from self._sendfile_fallback(request, fobj, count)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 149, in _sendfile_fallback
    yield from writer.write(chunk)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/http_writer.py", line 295, in drain
    yield from self._stream.drain()
  File "/usr/local/lib/python3.6/site-packages/aiohttp/http_writer.py", line 128, in drain
    yield from self._protocol._drain_helper()
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 211, in _drain_helper
    yield from waiter
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
concurrent.futures._base.CancelledError
2017-10-31 15:28:31 ERROR (MainThread) [aiohttp.server] Unhandled exception
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_protocol.py", line 434, in start
    yield from resp.prepare(request)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 240, in prepare
    return (yield from self._sendfile(request, fobj, count))
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/http/static.py", line 61, in sendfile
    yield from orig_sendfile(request, fobj, count)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 121, in _sendfile_system
    writer = yield from self._sendfile_fallback(request, fobj, count)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/web_fileresponse.py", line 149, in _sendfile_fallback
    yield from writer.write(chunk)
  File "/usr/local/lib/python3.6/site-packages/aiohttp/http_writer.py", line 295, in drain
    yield from self._stream.drain()
  File "/usr/local/lib/python3.6/site-packages/aiohttp/http_writer.py", line 128, in drain
    yield from self._protocol._drain_helper()
  File "/usr/local/lib/python3.6/asyncio/streams.py", line 211, in _drain_helper
    yield from waiter
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
concurrent.futures._base.CancelledError

BTW I’m using a FRITZ!Box 6490 Cable with FRITZ!OS: 06.85 and a Comet DECT Thermostat with Firmware/Version 03.68

the issue is not related to your fritzbox. it comes from the pyfritzhome package. what package version is installed? maybe i should do a version check.

nethertheless i will upload/release a new version with set temp in the next days.

Seems my installed pyfritzhome version was 0.1.
After updating it to 0.2.4 I still can’t set the temperature, but the error log looks a bit different:

2017-10-31 16:13:51 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1026, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 332, in async_temperature_set_service
    yield from climate.async_set_temperature(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/root/.homeassistant/custom_components/climate/fritzhome.py", line 91, in set_temperature
    self._device.set_temperature(temperature)
AttributeError: 'Device' object has no attribute 'set_temperature'

try to update using pip

1 Like

sorry but I overlook the info in your last post … you have the latest released version and there is still an issue :frowning:

I will work on that and let you know when it is fixed

so … new version available with hopefully fixed set temperature

Thank you very much @hthiery.

I updated to the latest pyfritzhome Version 0.3.1 and yournew component files from github.

After restarting HA I tried to set the temperatur, but still getting an error.
Now it looks like this to me:

2017-11-01 17:34:48 ERROR (MainThread) [homeassistant.core] Error doing job: Task exception was never retrieved
Traceback (most recent call last):
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 182, in _step
    result = coro.throw(exc)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/core.py", line 1026, in _event_to_service_call
    yield from service_handler.func(service_call)
  File "/usr/local/lib/python3.6/site-packages/homeassistant/components/climate/__init__.py", line 332, in async_temperature_set_service
    yield from climate.async_set_temperature(**kwargs)
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 332, in __iter__
    yield self  # This tells Task to wait for completion.
  File "/usr/local/lib/python3.6/asyncio/tasks.py", line 250, in _wakeup
    future.result()
  File "/usr/local/lib/python3.6/asyncio/futures.py", line 245, in result
    raise self._exception
  File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
    result = self.fn(*self.args, **self.kwargs)
  File "/root/.homeassistant/custom_components/climate/fritzhome.py", line 91, in set_temperature
    self._device.set_target_temperature(temperature)
  File "/root/.homeassistant/deps/lib/python3.6/site-packages/pyfritzhome/fritzhome.py", line 297, in set_target_temperature
    return self._fritz.set_target_temperature(self, self.ain, temperature)
TypeError: set_target_temperature() takes 3 positional arguments but 4 were given