sputnikdev / eclipse-smarthome-bluetooth-binding

Eclipse SmartHome Bluetooth Binding
46 stars 10 forks source link

Add support for the Smart Radiator Thermostat - eQ-3 #13

Open bademux opened 6 years ago

bademux commented 6 years ago

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!

eiGelbGeek commented 6 years ago

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

vkolotov commented 6 years ago

@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 commented 6 years ago

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

bademux commented 6 years ago

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

vkolotov commented 6 years ago

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 commented 6 years ago

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 commented 6 years ago

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

bademux commented 6 years ago

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 commented 6 years ago

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

RedPepper commented 6 years ago

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

bademux commented 6 years ago

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

tavalin commented 6 years ago

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

vkolotov commented 6 years ago

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

vcmorini commented 5 years ago

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.