-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
eQ-3 Bluetooth Thermostat support #87
Comments
There is a esp firmware that does exactly this: |
This would be a great addition. I have esphome nodes with sensors in almost every room. Currently I have everywhere a second ESP32 for only controlling the eq3 thermostats. Would nice to merge the sensors-nodes with the eq3-controlling nodes |
Just for more context on this - there's also an ESP32 implementation here: https://github.com/softypit/esp32_mqtt_eq3 |
I would love to have EQ3 integrated with esphome in order to easily expose it to Home Assistant. Being not familiar with esphome architecture, does it take a lot of work to integrate aforementioned ESP32 implementation (https://github.com/softypit/esp32_mqtt_eq3) with it? |
I'm not 100% familiar with the inner workings of ESPHome but I think the integration I mentioned would more be for reference than directly porting it into ESPHome. I was thinking that the Xiaomi MiFlora implementation in ESPHome (covered by the BLE Tracker code: https://github.com/esphome/esphome-core/blob/dev/src/esphome/esp32_ble_tracker.h) could serve as a starting point - that at least shows how a BLE device can be integrated in ESPHome. The major difference is that it only reports received values, whereas the EQ3s require two-way communication. |
Just to add even more background info (sorry for not having a solution as yet) - a Home Assistant component exists for the EQ3 thermostats but of course that only works if the home assistant server (e.g. an RPi 3) is in range of all of the heaters. I guess that, like me, that's not the case for you and the dream would be to have ESP32s around the house, each running ESPHome and acting as bridges to Home Assistant. If so then I think we need to consider that ESPHome would present a "Climate" component to Home Assistant, in the same way that it can currently present a "Fan" component. So I assume we'd need to create a thermostat/TRV "Core" in ESPHome and then have eq3 TRVs as an extension of that...anyone think that's a good or bad idea? I'll keep thinking myself and try and flesh out the idea! |
@inforsgit This integration would be a lot of work, first a new esp32_bt base would need to be created (for communicating with normal BT devices) with an API that several devices like the EQ3 could hook into. I would not recommend creating a climate component in esphome - the HA model of a climate entity is seriously broken from an architecture standpoint (there are tons of properties that are improperly documented). Plus adding a new component to esphome is a whole bunch of work because the base component would need to be created, then MQTT and native API layers, then aioesphomeapi needs to be updated and finally HA - a whole bunch of work. So I would highly recommend exposing everything as individual switches/sensors/etc. If the user wants they can still make a template in HA that converts these to a climate entity. |
Maybe just add custom component: Custom BLE device, this component will have BLE read characteristic and BLE write characteristic function. This can be enough to create eQ-3 (or any other ie. Sygonix) thermostat template |
Hi @OttoWinter, i saw that you inplement climate components in ESPHome, do you have intention of develop integration for eQ-3 TRV platform in the future? Thank you very much. |
@Ilpredatore tbh, I don't have any plans for this device in particular. I have no need for a bluetooth thermostat and also don't own this unit. If someone implements it, I would be happy to accept it though. |
I've started implementation of a library that can control the EQ3 thermostats here: https://github.com/pieter/ESP-EQ3 It's fairly simple (depends on Arduino & a BLE library) and incomplete, but should be easy to expand with the necessary functionality for ESPHome. Here is the header -- you initialise it with a MAC address, then call getTemperature/setTemperature and getMode/setMode. I hope to create a custom component for this at some point once I find some more time, if nobody beats me to it. |
You might look at my custom components. I spend last week on trying to get this working: https://github.com/ayufan/esphome-components. It seems to be. So any feedback is welcome. Maybe we could upstream that if it proves to be fairly stable. |
Hi @ayufan - I'm really keen to test out your code, it looks really good. I'm struggling to get it running though - I've used the config entry on your link but it won't compile - always says |
I add installation section: https://github.com/ayufan/esphome-components#1-installation @inforsgit. Not all controls are exposed, as I plan to expose all controls including schedules to easily reconfigure the device given what is available. |
Great...thanks - that's amazing - initial test has the basics working 👍 👍 👍. I'll try and run through some proper testing with it and then let you know on your github if I find bugs (and solutions!). Cheers!! |
@inforsgit I still see some problem with time configuration. Not sure why, something is broken there. |
I fixed a bug with time. Update is on GitHub. |
Ideas whats wrong here? MAC from the valve is 00:1A:22:0E:14:73 and ESP32 is next to the valve [10:22:47][C][template.switch:058]: Template Switch 'Refresh Bedroom EQ3' YAML: ota: logger: time:
|
It seems to be missing WiFi connection. Eq3 requires valid time source, and
this has to be taken from somewhere
…On Sun, 8 Dec 2019 at 10:36, konzolec ***@***.***> wrote:
Ideas whats wrong here? MAC from the valve is 00:1A:22:0E:14:73 and ESP32
is next to the valve
[10:22:47][C][template.switch:058]: Template Switch 'Refresh Bedroom EQ3'
[10:22:47][C][template.switch:059]: Restore State: NO
[10:22:47][C][template.switch:060]: Optimistic: NO
[10:22:47][C][logger:175]: Logger: [10:22:47][C][logger:176]: Level: DEBUG
[10:22:47][C][logger:177]: Log Baud Rate: 115200 [10:22:47][C][logger:178]:
Hardware UART: UART0 [10:22:47][C][ota:029]: Over-The-Air Updates:
[10:22:47][C][ota:030]: Address: 192.168.1.80:3232
[10:22:47][C][mqtt:051]: MQTT: [10:22:47][C][mqtt:053]: Server Address:
192.168.1.10:1883 (192.168.1.10) [10:22:47][C][mqtt:054]: Username:
[redacted] [10:22:47][C][mqtt:055]: Client ID: [redacted]
[10:22:47][C][mqtt:057]: Discovery prefix: 'homeassistant'
[10:22:47][C][mqtt:058]: Discovery retain: YES [10:22:47][C][mqtt:060]:
Topic Prefix: 'eq3bt' [10:22:47][C][mqtt:062]: Log Topic: 'eq3bt/debug'
[10:22:47][C][mqtt:065]: Availability: 'eq3bt/status'
[10:22:47][C][sntp:043]: SNTP Time: [10:22:47][C][sntp:044]: Server 1: '
0.pool.ntp.org' [10:22:47][C][sntp:045]: Server 2: '1.pool.ntp.org'
[10:22:47][C][sntp:046]: Server 3: '2.pool.ntp.org'
[10:22:47][C][sntp:047]: Timezone: 'CET-1CEST-2,M3.5.0/2,M10.4.0/3'
[10:22:47][C][mqtt.switch:038]: MQTT Switch 'Refresh Bedroom EQ3':
[10:22:47][C][mqtt.switch:039]: State Topic:
'eq3bt/switch/refresh_bedroom_eq3/state' [10:22:47][C][mqtt.switch:039]:
Command Topic: 'eq3bt/switch/refresh_bedroom_eq3/command'
[10:22:47][C][mqtt.sensor:024]: MQTT Sensor 'Bedroom EQ3 Valve State':
[10:22:47][C][mqtt.sensor:026]: Expire After: 3660s
[10:22:47][C][mqtt.sensor:028]: State Topic:
'eq3bt/sensor/bedroom_eq3_valve_state/state' [10:22:47][C][eq3:272]:
EQ3-Max Thermostat 'Bedroom EQ3' [10:22:47][C][eq3:273]: Update Interval:
1800.0s [10:22:47][C][eq3:274]: Mac Address: 1a220e1473
[10:22:47][C][eq3:275]: Valve 'Bedroom EQ3 Valve State'
[10:22:47][C][eq3:275]: Unit of Measurement: '%' [10:22:47][C][eq3:275]:
Accuracy Decimals: 0 [10:22:47][C][eq3:275]: Icon: 'mdi:percent'
[10:22:49][I][eq3:042]: Requesting update of 1a220e1473...
[10:22:50][E][eq3_cmd:144]: Clock source for 1a220e1473 is not valid.
[10:22:50][W][eq3:051]: Update of 1a220e1473 failed. Tries left: 1.
[10:22:53][I][eq3:042]: Requesting update of 1a220e1473...
[10:22:56][E][eq3_cmd:144]: Clock source for 1a220e1473 is not valid.
[10:22:56][W][eq3:056]: Update of 1a220e1473 failed. Too many tries.
[10:22:56][D][sensor:092]: 'Bedroom EQ3 Valve State': Sending state nan %
with 0 decimals of accuracy [10:24:32][I][ota:046]: Boot seems successful,
resetting boot loop counter.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87?email_source=notifications&email_token=AASOSQNFRMHMXJYXNKGFQ7TQXS53HA5CNFSM4G2WFSJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGGZVKI#issuecomment-562928297>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQPK4TG7U5AV3JUSVIDQXS53HANCNFSM4G2WFSJQ>
.
|
Has to be specified somewhere else? wifi: not enough? Complete YAML config > https://pastebin.com/EkR7WQDD |
You seem to miss dns, because of manual ip.
…On Sun, 8 Dec 2019 at 11:06, konzolec ***@***.***> wrote:
Has to be specified somewhere else? wifi: not enough?
Complete YAML config > https://pastebin.com/EkR7WQDD
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87?email_source=notifications&email_token=AASOSQJWI3LFRHGH3Q5HUFDQXTBKNA5CNFSM4G2WFSJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGG2IQY#issuecomment-562930755>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQL22MFPBR2I7DY36CDQXTBKNANCNFSM4G2WFSJQ>
.
|
Ok, let me try without that |
Issue remains, looks like it cannot connect to my valve. Do i need to set up anything extra on the valve? MAC is correct ( 00:1A:22:0E:14:73) cuz it was working with this plugin https://github.com/softypit/esp32_mqtt_eq3. Wanted to test this solution [13:42:08][I][eq3:062]: Requesting ID of 1a220e1473... |
It can be other problem. Can you look in logs in verbose? It might not be
supported maybe.
…On Sun, 8 Dec 2019 at 13:45, konzolec ***@***.***> wrote:
Issue remains, looks like it cannot connect to my valve. Do i need to set
up anything extra on the valve? MAC is correct ( 00:1A:22:0E:14:73) cuz it
was working with this plugin https://github.com/softypit/esp32_mqtt_eq3.
Wanted to test this solution
[13:42:08][I][eq3:062]: Requesting ID of 1a220e1473...
[13:42:13][W][eq3_cmd:052]: Cannot connect to 1a220e1473.
[13:42:13][W][eq3:071]: ID of 1a220e1473 failed. Too many tries.
[13:42:13][I][eq3:076]: Requesting Schedule of 1a220e1473...
[13:42:18][W][eq3_cmd:052]: Cannot connect to 1a220e1473.
[13:42:18][W][eq3:091]: Schedule of 1a220e1473 failed. Too many tries.
[13:42:18][I][eq3:042]: Requesting update of 1a220e1473...
[13:42:23][W][eq3_cmd:052]: Cannot connect to 1a220e1473.
[13:42:23][W][eq3:051]: Update of 1a220e1473 failed. Tries left: 2.
[13:42:26][I][eq3:042]: Requesting update of 1a220e1473...
[13:42:31][W][eq3_cmd:052]: Cannot connect to 1a220e1473.
[13:42:31][W][eq3:051]: Update of 1a220e1473 failed. Tries left: 1.
[13:42:34][I][eq3:042]: Requesting update of 1a220e1473...
[13:42:39][W][eq3_cmd:052]: Cannot connect to 1a220e1473.
[13:42:39][W][eq3:056]: Update of 1a220e1473 failed. Too many tries
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87?email_source=notifications&email_token=AASOSQI3KXTRSG4QIIBWMFDQXTT5HA5CNFSM4G2WFSJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGG5S2I#issuecomment-562944361>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQILI7IU2UGFDUTPI2TQXTT5HANCNFSM4G2WFSJQ>
.
|
I tried to compile with verbose but couldn't. Im getting a weird error. This kind of logging compiles fine But this one doesnt, might be a esphome error? logger: |
I pushed a fix for |
Great, here is now the VERBOSE log. If you can get anything useful from it |
No idea. Can you run `esp32_ble_tracker` to scan all devices with their
signal strength from ESP32?
…On Mon, Dec 9, 2019 at 12:22 PM konzolec ***@***.***> wrote:
Great, here is now the VERBOSE log. If you can get anything useful from it
https://pastebin.com/MkjMfWzz
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#87?email_source=notifications&email_token=AASOSQLMAALGMHZQLSKBX2LQXYTADA5CNFSM4G2WFSJ2YY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOEGIZ7JQ#issuecomment-563191718>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AASOSQPAAHVHUUM4KZVRCQLQXYTADANCNFSM4G2WFSJQ>
.
|
Hi! Is there any reason why MQTT is mandatory for this component? I'm using the Home Assistant API connection so I don't actually need the MQTT but it won't compile without it. In addition I'm having some issues with MQTT, as reported in esphome/issues#951. |
Hello everybody! any news regarding developing eq3 integration? |
MQTT is mandatory only if you have expire_after setting:
|
It is already working with custom_component made by @ayufan. |
@ayufan Your component works really well. Does this happen for anyone else? Is there any configuration that would help prevent this as it's not really viable for me to set up one esp32 board for every EQ-3 in the house? |
Can we implement a custom Bluetooth sensor that can be associated with the esp32 Bluetooth module and read its values. |
I tried to use one esp as 'bridge' for one eq3 and few miflora devices but esp32 ble tracker is required to do so. Any way to bypass that limitation? |
In order to do so (multiple functionalities on esp32), and as I had some stability issues with https://github.com/softypit/esp32_mqtt_eq3, I decided to rewrite it in python (I am less bad at python :D). |
With the new bluetooth proxy support, would it be possible to just forward the eq3 bluetooth data to home assistant via proxy? |
Sorry if I ask you @OttoWinter , but is this something which Home assistant has to implement or is there a support code required in esphome to make eq3 bt thermostat running via bluetooth proxy? |
The Bluetooth proxy of ESPHome currently only provides Home Assistant with passive sensor data that is advertised by certain devices. Not all devices are supported and ESPHome does not decode or keep a list. To find out if your device is supported, please search for it in the Home Assistant Integrations list. The Individual device integrations in Home Assistant (such as BTHome) will receive the data from the Bluetooth Integration in Home Assistant which automatically aggregates all ESPHome bluetooth proxies with any USB Bluetooth Adapters you might have. |
Ok, so I guess to make the eq3 thermostat running Home Assistant would have to add some code for it as far as I understood? At least to get the passive sensor data (temperature)? Active control is not possible then I guess? |
I'm really hopeful that the bluetooth proxy function will one day allow for EQ3 control via home assitant but indeed, my understanding is that it's not currently there. In the Home Assitant release notes it mentions indeed that
So I assume this means that EQ3 control would need this future release to make it happen. In terms of an EQ3 integration for Home Assitant, I believe it's already there: https://www.home-assistant.io/integrations/eq3btsmart/ - it would just be a case of this using the proxies. |
So you think the passive temperature transmission should be working already with the bluetooth proxy? |
I'm not sure, I've not tested it, but if someone has a Pi running HA then they could give it a go. In any case I don't think it would be so useful because the eq3 doesn't acutally report its sensed temperature AFAIK, as it mentions in the HA integration:
|
Wow that's a really smart one! A thermostat without a built-in temperature sensor! Who would have thought... Anyway, ESPHome's bluetooth proxy is not yet ready to replace a full-featured USB Bluetooth dongle, but hopefully in the near future it will be. |
It has sensor, but it is not exposed via BT since the control of thermostat is done on separate IC while BT is after-though on separate IC. |
Ahhhh damn, forgot about this. Yeah, then the bluetooth proxy is no solution at all at the moment unfortunately :( Maybe then when the active bluetooth relaying comes in HA... |
As the newest Homeassistant release supports Active Bluetooth Proxy and the eq3 thermostats are already available as a component in hass it could work as of now. |
In home assistant eq3 component is broken now |
Is there a issue already created on github? If yes, could you link it? |
I tried Active Bluetooth Proxy - no success :( |
Me too, didnt work. |
Here's a new custom component that does work with the newer Home Assistant https://github.com/dbuezas/eq3btsmart
|
Hello, I am very interested in this component too. I have tried the custom component from @ayufan, but it gives me an error when imported and compiling climate.py, so I could not test it. I have opened an issue. I will try the component from you, @dbuezas to see if it works for me. |
I leave this here if it helps to anybody. This is not actually related to EspHome, sorry for that. |
Hi everyone, |
Describe the problem you have/What new integration you would like
Support for forwarding bi-directionally data from/to the eQ-3 Bluetooth Thermostat
Please describe your use case for this integration and alternatives you've tried:
Been using bt-mqtt-gateway which does exactly what the name states
Additional context
Python library and command-line tool for EQ3 Smart Bluetooth thermostats
The text was updated successfully, but these errors were encountered: