EUROTronic CometBlue / Xavax Hama / Sygonix

@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 :wink:

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 :slight_smile:

The existing cometblue library is written around a BLE library with complex dependencies. We should do a rewrite with a simpler library, eg. bluepy.

1 Like

@Hy3n4 What do you think about using a different library?
Could that help to get a nativ HA component?

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.

configuration:

climate cb:
  platform: cometblue
  devices:
    thermostat1:
      mac: 11:11:11:11:11:11
      pin: 0
1 Like

Amazing! Will it be hard to support all the other functions?

HassIO has some issues with communication with Pi’s BTLE module. I tried that once but this solution you described is the most reliable solution yet.

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.

Hey Guys,

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)

Is there any way, we can install that on a hassio installallation?

@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.

@stefffen: Have a look at this post.

@neffs What do you mean by config.txt?
hcitool lescan and HA itself are reporting a list of btle devices just fine, including the thermostats.

If you don’t know the file, you probably didn’t modify it. When you put the SD card in your computer it should be there. You can modify some hardware settings there, such as the serial port used for bluetooth.
If you installed hassio it recently you should be fine. I‘m not sure about older default settings.

Now i understand what you are talking about. Havent touched config.txt forever. My main HA system has been running for months, mostly smooth. Mainly Cometblue thermostats are giving me headaches.

Last night, I quickly set up a new microsd with hass.io and just your cometblue.py component and the same error appeared. (fyi, hcitool and ble dev_tracker work just fine)
Are you sure you used this installation method (and not hassbian, venv, etc?)

Maybe it’s my just thermostats themselves that seem to cause problems… No idea.

I’m relatively new to HA and have just got a Xavax BT radiator valve (TRV). From this topic and; ‘ neffs ’ work I appear to have got the TRV communicating with Home-Assistant, although it is not appearing to regulate the temperature so far.

See below for what I see in HA with the TRV connected, my Raspberry Pi setup and how I installed the component.

I have some questions;

  1. With this basic control functioning, how can I use HA to have the room temperature scheduled at different times of day & temperatures. Is there a HA scheduling component or something else I can use?
  2. There is an Auto/ Manu mode – should it be in Manu mode for use with HA?
  3. I have the German/ English quick install guide (00111971man_de_en.pdf) which I find difficult to understand, is there a better source of information?
  4. I Live in medium size (block built) 3 Bed 2 story house; the Pi is placed close to centre of lower floor. it appears the Pi’s is not able to communicate (over BT) reliably with TRV placed on radiator on second floor. Anyone else experience this, is there a solution?

Thanks to all that have contributed so far- looking froward to responses.

image
Displayed on Overview
image


Developer tools - States

MY System Setup:
Software-

Home Assistant 0.87.0
Hass.io supervisor Version 148
System HassOS 2.8

Hardware-
Raspberry Pi3 B+

Cometblue Component Setup:
File ‘cometblue.py’ from ‘https://gist.github.com/neffs/da01ef5cd7ed7bb50f989898558616b8’ added to ‘climate’ custom component directory. \’My Pi IP Address’\config\custom_components\climate

Entry added to my ‘configuration.yaml’- (change for your MAC & PIN)

climate cb:
  platform: cometblue
  devices:
    thermostat1:
      mac: E0:E5:CF:B0:xx:xx
      pin: 0

Hello guys,

sorry for having being silent for so long and unfortunately also this post will not be of much help.
I’m currently living abroad where there’s no need for heater(s control) rather than AC :slight_smile:
However I’m not a big fan of forks and scattered repositories - so if it’s not too late I’m happy to hand over maintainership of this repo to whoever is willing to take care of getting it upstream ready and be more communicative than me.

1 Like

Are you guys still succesfully running this thermostat via HA? Especially joecoie?

It stopped working some time ago and I didn’t bother to fix it because the thermostat was turned off anyway.

I’ll look into it in the next few days

1 Like