3rd Party Bluetooth Binding. Beta testers needed

HI Vlad, Not sure about the 21degrees. It could be correct as it might be the temperature while the water was heating up. I looked at the log files again and could only find the status going from on to off, nothing else.

All the other devices are working fine, just the kettle stays offline. There’s a setting that allows you to keep your water warm for a set period of time which you then monitor in the iphone app. So when I took the screenshot it was set for 80 degrees for 1 hour.

Here’s the screenshot for the scale, let me know if it’s too small.

I wonder if you are getting any errors for the kettle… Could you please enable DEBUG level?

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

Please see if you’ve got anything strange there.

Also, if you remove the Kettle thing from OH, does it get added to the inbox again?

Hi @druciak, I finally found some time to have a look at your log file. Could you please confirm something for me?

  1. What is MAC address of your weather station? From the logs, I can see two devices: ED:XX:XX:XX:50:3A (getting online) and 0C:XX:XX:XX:89:20 (always offline).

  2. I can clearly see from the logs that ED:XX:XX:XX:50:3A becomes online

2018-03-01 21:04:49.562 [DEBUG] [ooth.manager.impl.DeviceGovernorImpl] - Notifying device governor listener (online): /00:XX:XX:XX:71:11/ED:XX:XX:XX:50:3A : 1 : true

Do you see this for your “thing” in PaperUI? The “online” channel should have been changed to “ON”.

  1. It also discovers a bunch of characteristics and creates channels for them (I guess those ones that you’ve shown on the screenshot)

  2. It is also quite clear that “tinyb” transport enables notifications for those channels.

  3. Also I can see that the binding schedules a task to update those channels (reading from the device).

  4. There is not any error there…

So from my perspective the binding does what it should…

What we also can do is… We could enable INFO level for all items:

log:set INFO smarthome.event.ItemStateChangedEvent

I also suggest you to remove the device form OH and add it back again from the inbox.

Thanks

I’ve enabled the debug level and there wasn’t anything strange showing up.

I did manager to find some changes once I turned the kettle on
bluetooth_ble_087CBE809FDD_FE95_FE95_messagenumber changed from 98.0 to 5.0
bluetooth_ble_087CBE809FDD_FE95_FE95_messagenumber changed from 5.0 to 10.0
and so on till 35.

First I thought it was the temperature but I’ve seen numbers up to 238 in there before.

I will add some screenshots in a sec.

It does seem that from the moment I connect to the kettle via my iphone app, the device will go offline in the binding.1

Hey @Pim_Verschueren, what did you select in that new config (“GATT services and characteristics parsing strategy”) for the binding? Looks like you have enabled “Recognised + unrecognised as binary”, could you please change it to “All as binary” and then remove and re-add your kettle? This will give us a binary channel (there won’t be “message number channel and others”).

It will go offline, because your cattle can have only one simultaneous connection and it also will stop advertising once connected. So make sure your phone is not connected to your kettle :slight_smile:

That’s what I thought as well :slight_smile:

got some channels popping up again:
[71, 20, 83, 00, 3c, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 5a]
[71, 20, 83, 00, 46, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 59]
[71, 20, 83, 00, 55, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 58]
[71, 20, 83, 00, 5f, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 57]
[71, 20, 83, 00, 69, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 57]

The kettle was set to boil and then let the temp go down and stay at 90 degrees for one hour

Cool, thanks. Looks like the kettle reports temperature only? 0x57 = 87 degrees. Is this right?

Does the app show anything else? What app are you using?

that’s possible, I just checked the app and it said 91 but that temperature will drop and then the kettle with heat the water again. I am using the Mi Home app.

The last message was [71, 20, 83, 00, 9b, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 5b] and it also says it was keeping the water warm for about 16 minutes.

Yeah, looks like it is temperature. 0x5b is 91 degrees.

Can you pls confirm what else can you do in the app? You’ve said you can select temperature and time (in minutes?) for how long it should keep the selected temperature?

So I can set the temperature, tell how long it has to stay warm (in half hours, starting from 1 hour), tell if I want to boil the water and then let the water cool to the desired temperature, or let the water heat up to the desired temperature. There are two other buttons to prevent the water from boiling again, and to keep the water warm, even if you have already picked the kettle up and returned it to it’s base.

Great. As far as I can see… it also reports what’s happening, e.g. whether it is “Cooling”, “Boiling” etc

If you have a look at this sequence:
[71, 20, 83, 00, 9b, dd, 9f, 80, be, 7c, 08, 09, 05, 10, 02, 03, 5b]

The most important part is the last two numbers: 03 5b.
the very last byte is temperature.
the first one (03) I assume is status.

Could you please do some more experiments and see how that status byte changes? E.g. start boiling, make it to cool a bit etc… there might be some combinations like:

01 - boiling
02 - something?
03 - cooling

etc…

@Pim_Verschueren it basically should correspond what you see in the app under the temperature, eg.:
image

ED is the weather station.

I don’t have “online” channel linked, but the thing is online. I can check the channel as well, but for me it doubles functionality of thing’s status.

I wouldn’t say that, as I don’t have temp and hum values in OH :slight_smile:

Will try this once I get home.

I did this several times during my tests.

Hi All, I’ve discovered a major bug in the binding (when OH restarts, channels that are responsible for advertised data don’t get refreshed) and cut a new release with a fix for that bug. Also in this release the following features included:

  • Improved TRACE logging for TinyB and BluGiga transports (notifications and data reads)
  • Added Xiaomi Smart Kettle support (only temperature for now)

Current versions are:

  • Binding: 1.1.4
  • BlueGiga transport: 1.2.1
  • TinyB transport: 1.1.1

@Pim_Verschueren, could you please confirm that temperature for your Kettle is displayed correctly?

@druciak, could you please enable TRACE level for TinyB transport (this will show if TinyB returns any data)?

log:set TRACE org.sputnikdev.bluetooth.manager.transport.tinyb

Be careful, the TRACE level is very chatty, you may need to disable it as soon as you’ve done your tests.

Hi Vlad,

Do I change the GATT services and characteristics parsing strategy or do I leave it as all as binary?

Cheers,

Pim

Hi Vlad,

I think there’s something wrong with the binding as when I re-installed it, I’ve got a 500 error when I tried to open my control panel in the Paper UI and the Habpanel didn’t work at all.

Once I uninstalled the binding everything was working again.

Cheers.

Pim

I did see the temperature for the Kettle, although it stayed the same for the whole time so it didn’t looked like it was getting updated.

Hi @Pim_Verschueren, That’s strange. Do you see any errors in the karaf console?

Hi, no…but I re-installed everything and it seems to be working again.

I am gonna test the mikettle later on.