Invalid bridge API response -> Home assistant integration broken

After some un-pairing i had to pair bridge with lock again. All works fine in phone and Nuki app. BUT. Integration to Home assistant is broken now and i know why. This is JSON response from my bridge (list service) and i think it is broken:

		"deviceType": 16,
		"nukiId": my-id,
		"name": "Můj Nuki zámek"
		"deviceType": 0,
		"nukiId": my-id,
		"name": "Můj Nuki zámek",
		"firmwareVersion": "1.7.3",
		"lastKnownState": {
			"mode": 2,
			"state": 1,
			"stateName": "locked",
			"batteryCritical": false,
			"timestamp": "2019-05-06T08:02:22+00:00"

I see some problems:

  • Some strange duplicity lock on first place in array - this is that critical issue which broke my HA integration!
  • Undefined field “deviceType”.
  • Undefined field “mode”

Why my bridge returns this broken response after re-paring my lock? How to fix problem? Why API doc is not actual?

This has been introduced here:

Thanks for your feedback on this. We wanted to update the documentation with the Nuki Opener release, but I agree that it should go live as soon as possible as we pushed this live on the Bridge firmware.

Very strange; I can’t reproduce this here. Did you already try to reset the Bridge?

EDIT: Could you also send me your Bridge ID via PM?

Bridge ID sent in PM. I think YOU should know what is that strange deviceType 16. :wink:

At least our firmware developer found a fix which was just deployed with an update (1.12.6/2.2.9). :wink:

Please restart the Bridge (+1h till automatic update) or call /fwUpdate . If this doesn’t help a bridge reset should solve it in any case.

I did fw update to 1.12.6 and it works! List json response is correct again and HA integration is fixed.

[{"deviceType": 0, "nukiId": xxx, "name": "Můj Nuki zámek", "firmwareVersion": "1.7.3", "lastKnownState": {"mode": 2, "state": 3, "stateName": "unlocked", "batteryCritical": false, "timestamp": "2019-05-06T10:46:24+00:00"}}]

1 Like