based on the work of of Xrucka[1] which is based on the work of im-0[2] which is based on the work of Thorsten Traenkner[3], I created a component for controlling the Bluetooth thermostats created/distributed by EUROTronic / Xavax / Sygonix / alike - found here[4].
It’s very basic for now, but you can already reliably track resp. change the current resp. target temperature of multiple devices.
Feedback is welcome. Development is ongoing. Thanks!
Great work! I recently bought a Eurotronic CometBlue radiator valve because I wasn’t completely happy with the EQ3 BT version I had before (quite noisy and cheap feel to it). I already like this new one better but haven’t been able to get it to work with Home-Assistant yet.
I found your custom component and added it to the custom components folder. I don’t know how to configure this in the configuration.yaml;
In your GitHub repository I see the following code:
In the error log of Home-Assistant I get this message:
starting version 3.2.4
Testing configuration at /config
Failed config
General Errors:
- Platform not found: climate.cometblue
Successful config (partial)
Therefore I think i forgot something. Do you know what I’m missing? I’m trying to run this on RPi3 with Hass.io
I got the same issue.
Logs says
Error loading custom_components.climate.cometblue. Make sure all dependencies are installed
Traceback (most recent call last):
File “/srv/homeassistant/lib/python3.5/site-packages/homeassistant/loader.py”, line 94, in get_component
module = importlib.import_module(path)
File “/usr/lib/python3.5/importlib/init.py”, line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File “”, line 986, in _gcd_import
File “”, line 969, in _find_and_load
File “”, line 958, in _find_and_load_unlocked
File “”, line 673, in _load_unlocked
File “”, line 673, in exec_module
File “”, line 222, in _call_with_frames_removed
File “/home/homeassistant/.homeassistant/custom_components/climate/cometblue.py”, line 66, in
from cometblue import device as cometblue_dev
ImportError: No module named ‘cometblue’
So i think the cometblue lib is not installed correctly.
Line 38 in the git says
#REQUIREMENTS = [‘cometblue’]
so the requirement is commented out.
Anyway, removing the ‘#’ did not worked also, i think pip3 cannot install cometblue out of the box.
You need to install cometblue from xrucka.
Afaik this will not work with Hass.io. You wont be able to install custom dependencies on hass.io unless these guys makes it official or there is an official addon.
I have tried it on a fresh Raspbian with HA in a venv and I am getting following error:
I was able to bypass this error but hit another one:
2018-11-27 16:45:22 WARNING (MainThread) [homeassistant.components.climate] Setup of platform cometblue is taking over 10 seconds.
2018-11-27 16:46:12 ERROR (MainThread) [homeassistant.components.climate] Setup of platform cometblue is taking longer than 60 seconds. Startup will proceed without waiting any longer.
@Hy3n4 Looks amazing! Can you maybe create a PR and add this directly to home assistant? So people do not have to do the custom component installation process
@Zoker I believe in this phase it wouldn’t be possible. Those manual steps are required and everyone has to do them. Especially allowing org.bluez destination for homeassistant user. Right now I have no idea how to accomplish all theese steps within HA installation.
Maybe when HA is not running in venv, but this option was not tested yet. Look at Github and feel free to test it
Interesting. I’m currently using the EQ3 Bluetooth Smart Thermostats which also use BLE and they don’t need any additional config. Why is this additional config necessary anyway? I’m pretty new to python and did not look at the code yet. But maybe we can find a solution to avoid this additional config
hi , have 3 of these and they are quite popular arround germany and otherEU countries (price arround20usd )sold under different names. it was painfull process to get them working (for me blen ble to mqtt gw solution provide best results) still it is not perfect (mqtt often crash ) but that could be finetuned.
will be great to have Hassio plugin but mean time my solution is :
1, install clean rassbian , and then follow how to install hassio on generic linux - you end up with raspi running hassio in docker but you still going to be able to access fully featured shell of raspbian
2, setup mqqt in hassio (simple plugin install) , configure permissions and account.
3, follow ble to mqtt igw installation manual ( you will do this in raspbian shell not in docker ) target mqtt and user name which you set in hassio
5, upload custom component to hassio config folder
6, simply folow instructions to finish configuration configure
great is you still have hassio with all benefits like plugins
I created a simple component for hassio based on the bluepy library. Just put this file in custom_components/climate/cometblue.py. It currently only supports current and target temperature.
This is definitely a right path. Not the easy one I chose :). There will be a lot of work on this. If you want I cloud help you on that in my free time which is kind of rarity lately.
I’ve got a running integration of those thermostats based on the code of xrucka.
I did not manage to add the necessary packages to the hass dependencies and therefore have not added a pull request, yet.
Since I’ve not the time to complete this now - does anyone want to take a look at the code and perhaps use some parts of it to complete this component?
Im getting an error adding your component (using hassio). Only added your file and config entry.
Any idea why?
Error while setting up platform cometblue
Traceback (most recent call last):
File “/usr/local/lib/python3.7/site-packages/homeassistant/helpers/entity_platform.py”, line 128, in _async_setup_platform
SLOW_SETUP_MAX_WAIT, loop=hass.loop)
File “/usr/local/lib/python3.7/asyncio/tasks.py”, line 416, in wait_for
return fut.result()
File “/usr/local/lib/python3.7/concurrent/futures/thread.py”, line 57, in run
result = self.fn(*self.args, **self.kwargs)
File “/config/custom_components/cometblue/climate.py”, line 62, in setup_platform
dev = CometBlueThermostat(device_cfg[CONF_MAC], name, device_cfg[CONF_PIN])
File “/config/custom_components/cometblue/climate.py”, line 83, in init
self._thermostat = CometBlue(_mac, _pin)
File “/config/custom_components/cometblue/climate.py”, line 153, in init
self.update()
File “/config/custom_components/cometblue/climate.py”, line 189, in update
data = self._conn.readCharacteristic(TEMPERATURE_HANDLE)
File “/usr/local/lib/python3.7/site-packages/bluepy/btle.py”, line 489, in readCharacteristic
resp = self._getResp(‘rd’)
File “/usr/local/lib/python3.7/site-packages/bluepy/btle.py”, line 369, in _getResp
resp = self._waitResp(wantType + [‘ntfy’, ‘ind’], timeout)
File “/usr/local/lib/python3.7/site-packages/bluepy/btle.py”, line 332, in _waitResp
raise BTLEException(BTLEException.COMM_ERROR, “Error from Bluetooth stack (%s)” % errcode)
bluepy.btle.BTLEException: Error from Bluetooth stack (comerr)
@thawizard: Did you modify the config.txt file? Are you sure that bluetooth works on your raspi?You can enable ssh and check with hcitool lescan that bluetooth works.