Skip to content
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

Add support for Huawei scales #80

Open
vkolotov opened this issue Feb 5, 2019 · 5 comments
Open

Add support for Huawei scales #80

vkolotov opened this issue Feb 5, 2019 · 5 comments

Comments

@vkolotov
Copy link
Contributor

vkolotov commented Feb 5, 2019

Ok, did a reboot, and now it can stay with ConnectionControl ON.

However, trying to connect to my Huwei AN100/CN100 I get the following:

2019-02-05 20:39:48.036 [vent.ItemStateChangedEvent] - ScaleCH100_Connected changed from OFF to ON
==> /var/log/openhab2/openhab.log <==
2019-02-05 20:39:48.749 [ERROR] [.manager.transport.tinyb.TinyBDevice] - Services resolved notification execution error
java.lang.NullPointerException: null
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.validate(BluetoothGattSpecificationReader.java:304) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.addCharacteristic(BluetoothGattSpecificationReader.java:294) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.spec.BluetoothGattSpecificationReader.getCharacteristicByUUID(BluetoothGattSpecificationReader.java:131) ~[?:?]
	at org.sputnikdev.bluetooth.gattparser.BluetoothGattParser.isKnownCharacteristic(BluetoothGattParser.java:86) ~[?:?]
	at org.sputnikdev.esh.binding.bluetooth.handler.AutomaticPinCodeAuthProvider.lambda$discoverPinCodeCharacteristic$1(AutomaticPinCodeAuthProvider.java:64) ~[?:?]
	at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) ~[?:?]
	

If I connect to the CH100 with the BLE Scanner app I actually see some apparently nice GATT fields, so I was hoping to get it to work i OpenHAB. I am still on Bluez 5.43. Again, any help would be appreciated.

–Jesper

@jesperldk
Copy link

I was actually running with GATT parsing strategy "Recognised + System + Unknown + unrecognised as binary" when I got the stack trace. I have tried with "Recognised only" and "All as binary" as well but that gives same stack trace.

@vkolotov
Copy link
Contributor Author

vkolotov commented Feb 5, 2019

Ok, what stack trace? Could you please remove your "thing", set "All as binary" and re-add your device from the inbox again?

@jesperldk
Copy link

Ok, I removed my thing, set "All as binary" and re-added, and set connection control to ON. The scale connects and then still makes the same stack trace as in the first message in the openhab log, and I get no extra channels. The stack trace starts with BluetoothGattSpecificationReader.validate() as you can see above.

@vkolotov
Copy link
Contributor Author

vkolotov commented Feb 5, 2019

Interesting. It tries to perform authentication and fails for some reason. Looks like your scales does not require any authentication, so you could try to disable "auto authentication" here:

image

Disable connection control, wait until it disconnects, and stays disconnected, then disable auth and enable connection control again.

@jesperldk
Copy link

sorry, same result: stack trace

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants