@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;
- 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?
- There is an Auto/ Manu mode â should it be in Manu mode for use with HA?
- 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?
- 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.
Displayed on Overview
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
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.
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
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.
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
- copied the file âcometblueâclimate.pyâ as âclimate.pyâ to the â\192.168.0.18\config\custom_components\cometblueâ folder on Pi. (screenshot 1)
- 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â]
}
-
restarted Pi a number of times; initially HA would not start at all- not sure why.
-
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.