EUROTronic CometBlue / Xavax Hama / Sygonix

@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

That would be super cool, thanks!

Hi, I too have lost the control of Xavax (Cometblue) TRV after an upgrade to HASIO- I did some work recently & I believe the control stops working on 0.96.0 release. It continues to work on 0.95.4 for me.
I checked the release notes for 0.96.0 & it references ‘All Changes’ — Climate 1.0 (@pvizeli - #23899) (climate docs) at https://github.com/home-assistant/home-assistant/releases?after=0.97.0b2
Afraid I don’t know what in that change may be the problem as I don’t understand the custom components & how it/they work. @neffs Neffs if you could do something to fix that would be really great.

1 Like

It works again, sort of… Bluetooth LE seems to be very unreliable and there are still some issues in my code. But at least we’ll be able to turn on the heating remotely…

the path has to be: custom_components/cometblue/climate.py

I just recently committed a fix into in https://github.com/Hy3n4/ha-cc-cometblue to work with current master.

Mirko, that doesn’t work in Hassio as I can’t install the required component via shell. I did try in Portainer’s console but no dice.

It is. Custom_components is by default in /config.

I’m terribly sorry, this is the real error message

Error while setting up platform cometblue
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 150, in _async_setup_platform
    await asyncio.wait_for(asyncio.shield(task), SLOW_SETUP_MAX_WAIT)
  File "/usr/local/lib/python3.7/asyncio/tasks.py", line 442, 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 88, in setup_platform
    dev = CometBlueThermostat(device_cfg[CONF_MAC], name, device_cfg[CONF_PIN])
  File "/config/custom_components/cometblue/climate.py", line 108, in __init__
    self._thermostat = CometBlue(_mac, _pin)
  File "/config/custom_components/cometblue/climate.py", line 206, in __init__
    self.update()
  File "/config/custom_components/cometblue/climate.py", line 251, in update
    data = self._conn.readCharacteristic(TEMPERATURE_HANDLE)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 530, in readCharacteristic
    resp = self._getResp('rd')
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 407, in _getResp
    resp = self._waitResp(wantType + ['ntfy', 'ind'], timeout)
  File "/usr/local/lib/python3.7/site-packages/bluepy/btle.py", line 368, in _waitResp
    raise BTLEGattError("Bluetooth command failed", resp)
bluepy.btle.BTLEGattError: Bluetooth command failed (code: 2, error: Attribute can't be read)

Hi, I have made the modifications @neffs suggested on my Pi3

  1. copied the file ‘cometblue–climate.py’ as ‘climate.py’ to the ‘\192.168.0.18\config\custom_components\cometblue’ folder on Pi. (screenshot 1)
  2. made a ‘manifest.json’ file with the contents below in same folder. (screenshot 1) [from HA doc not sure if this file is necessary for a custom component]

{
“domain”: “cometblue”,
“name”: “cometblue”,
“documentation”: “https://gist.github.com/neffs/da01ef5cd7ed7bb50f989898558616b8”,
“dependencies”: [],
“codeowners”: [],
“requirements”: [“bluepy”]
}

  1. restarted Pi a number of times; initially HA would not start at all- not sure why.

  2. it works on 100.02 (screenshot 2)

Thank you very much David.

Doesn’t work on mine. I always get either

bluepy.btle.BTLEGattError: Bluetooth command failed (code: 2, error: Attribute can't be read)

The entire error message is here

Are you guys who got it working running the typical Hassio docker setup (usually done with flashing an image onto a sd card) or some kind of Raspbian/generic Linux that hass Hassio installed on top of it?

At the time of my last commit I was running it on plain Debian on a Allwinner H3 SoC, as well as - again plain Debian - on x86

@Stooovie I believe so, initially installed from https://www.home-assistant.io/hassio/installation/ .

I fixed several bugs and connection errors are handled better. You can now use HACS to install it, just add neffs/ha-cometblue as a custom repository (integration).
I moved the plugin here:

@Stooovie: your error might indicate a wrong PIN. The attribute is read just after sending the PIN. The new version handles this better.

1 Like