eclipse-smarthome-bluetooth-binding icon indicating copy to clipboard operation
eclipse-smarthome-bluetooth-binding copied to clipboard

Add support for the Smart Radiator Thermostat - eQ-3

Open bademux opened this issue 7 years ago • 14 comments

Hello, I have several Smart Radiator Thermostat - eQ-3, Can you please guide me how to add basic functions to it like CurrentTemperature, homekit:HeatingCoolingMode, TargetTemperature ( HomeKit) There is library providing functionality, so lets assume we have documentation :)

Thanks!

bademux avatar Jan 12 '18 18:01 bademux

I think you're wrong here. This binding is for presence detection and not for controlling Bluetooth devices.

eiGelbGeek avatar Jan 12 '18 23:01 eiGelbGeek

@eiGelbGeek

I think you're wrong here. This binding is for presence detection and not for controlling Bluetooth devices.

This binding supports not only presence detection, but also controlling bluetooth smart devices. Some basic sensors like temperature, humidity and other "standard" BLE sensors must be supported out of the box.

vkolotov avatar Jan 13 '18 00:01 vkolotov

@bademux , I'll have a look what I can do here a bit later. In short, we will need to come up with our own custom GATT definition files to add support for your device. You can have a look at the standard definitions here: https://www.bluetooth.com/specifications/gatt/viewer?attributeXmlFile=org.bluetooth.service.environmental_sensing.xml. Similar to it, we will have to come up for your custom services and characteristics.

I'll have closer look this evening.

vkolotov avatar Jan 13 '18 00:01 vkolotov

@vkolotov thanks, for clarification. I'm currently trying understand GATT&Co

bademux avatar Jan 13 '18 11:01 bademux

Hi @bademux,

Ok. I had a look at some projects on github for your device. Looks like it should be easy to add support for your device. I don't have that device, but we can try anyway.

What I need is:

  1. OpenHab logs of the time period when you are switching "on" the connection control for that device ("Simple link mode" should be enabled).
  2. Take a screenshot of the "thing" for that device.

In order to get Bluetooth Manager logs you will need to run this simple command in the karaf terminal:

log:set DEBUG org.sputnikdev.bluetooth.manager.impl

So please before collecting any logs, run that command.

This would give me a complete list of GATT services and characteristics which we will be able to use to come up with a pair of XML files - GATT specifications.

I'm 100% sure we can easily implement getting/settings status of the device (window, valve, temp etc). Not sure about setting/getting schedules... will see.

vkolotov avatar Jan 13 '18 23:01 vkolotov

Ok, I have made a binding build where you can see all bt device attributes, even if they are "unknown". This should help us to create GATT definitions for your device. @bademux Could you please try to install this snapshot version? https://oss.sonatype.org/content/repositories/snapshots/org/sputnikdev/org.eclipse.smarthome.binding.bluetooth/1.1-SNAPSHOT/org.eclipse.smarthome.binding.bluetooth-1.1-20180114.100602-6.jar

You will have to uninstall the binding first (through ESH MarketPlace, please leave your transport binding installed).

Once that snapshot binding is installed, go to the binding settings and enable that experimental feature:

image

Then try to add your device and enable "connection control". Once the device is connected, refresh your browser window (F5), you should see then ALL characteristics listed for your device thing. The values of those characteristics are in RAW format, i.e. byte arrays which are represented as text, e.g. [123, 89]. Please take a screenshot.

Once I've got all UUIDs of the characteristics (thing channels), I will be able to create initial version of the definitions for you which you can try to install locally and test with your device.

vkolotov avatar Jan 14 '18 10:01 vkolotov

@bademux BTW, if you could also capture logs, that would be great! Thanks.

vkolotov avatar Jan 14 '18 10:01 vkolotov

Hello, You can find screenshot as well as copypaste values below. Imho device scheduler is something that can be (or even should be) replaced by OpenHab scheduling; getting/settings status of the device (window, valve, temp etc) only matters. I will send you log in private. Thanks for a helping me!

3fa4585a-ce4a-3bad-db4b-b8df8179ea09

[3, 17, 12, 30, 12, 1, 9, 0, 0, 0, 0, 0, 0, 0, 0, 0]
e3dd50bf-f7a7-4e99-838e-570a086c666b
347f7608-2e2d-47eb-913b-75d4edc4de3b

[0, 16, 2, 0]
92e86c7a-d961-4091-b74f-2409e72efe36

image

bademux avatar Jan 14 '18 13:01 bademux

current status: unfortunately my device doesn't follow specifications, so it needs custom bindings. We plan to build custom bindings atop of Vlad's bluetooth addon. to be continued...

bademux avatar Jan 16 '18 09:01 bademux

i recently found this and maybe that script that somebody wrote for gattool is somehow useful to create a template

https://github.com/Heckie75/eQ-3-radiator-thermostat

RedPepper avatar Feb 21 '18 15:02 RedPepper

@RedPepper please see https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/13#issuecomment-357909361 "unfortunately my device doesn't follow specifications, so it needs custom bindings."

bademux avatar Feb 21 '18 15:02 bademux

Has there been any progress on the work needed for a custom GATT profile to support the eQ-3 thermostat?

tavalin avatar Jun 18 '18 11:06 tavalin

Hi @tavalin, the progress is going on a parallel thread: https://github.com/sputnikdev/eclipse-smarthome-bluetooth-binding/issues/14

vkolotov avatar Jun 19 '18 19:06 vkolotov

Any problems on the date time sync ? Sometimes the device gets out of sync, I don't know why. Therefore I am adjourning it from time to time. Not very good, since it is battery powered.

vcmorini avatar Aug 22 '19 18:08 vcmorini