Closed rectangular-starchaser closed 2 years ago
Hi, I think it's because you're using HA 2021.10 version, see this issue it's fix in 2021.11 version
Hi, after update HA to 2021.11.5 same behaviour. Any other idea?
Hi,
The error is misleading, I know, but it says there were no devices fetched via Web API. Do you have any other errors in logs? @rectangular-starchaser
Hi, I changed my log level to debug and verified my api token externally with curl which works flawlessly. No further error logs are reported within hass logs. When setting up the integration the "user input is malformed" error remains until I fill in the form "Nuki bridge hostname or IP Address"
This behavior seems unexpected because in the setup method this parameter is set as optional: https://github.com/kvj/hass_nuki_ng/blob/16193216929746f8910ef46168404a1a60764781/custom_components/nuki_ng/config_flow.py#L78
So I assume this error is raised by hass and not by the integration itself? Best Regards!
@rectangular-starchaser
and verified my api token externally with curl which works flawlessly
Could you please share the output? The integration should work without a bridge, but something is missing in the output
HI, thanks for coming back on this one: That's my curl command
[{"smartlockId":$id,"accountId":$accountid,"type":4,"lmType":0,"authId":$authid,"name":"Haustuer","favorite":false,"config":{"name":"Haustür","latitude":%lat_data,"longitude":$long_data,"autoUnlatch":true,"liftUpHandle":false,"pairingEnabled":true,"buttonEnabled":true,"ledEnabled":false,"ledBrightness":1,"timezoneOffset":0,"daylightSavingMode":0,"fobPaired":false,"fobAction1":4,"fobAction2":0,"fobAction3":0,"singleLock":false,"advertisingMode":0,"keypadPaired":false,"homekitState":1,"timezoneId":37,"deviceType":4,"wifiEnabled":true},"advancedConfig":{"totalDegrees":696,"singleLockedPositionOffsetDegrees":0,"unlockedToLockedTransitionOffsetDegrees":0,"unlockedPositionOffsetDegrees":0,"lockedPositionOffsetDegrees":0,"detachedCylinder":false,"batteryType":1,"autoLock":false,"autoLockTimeout":300,"autoUpdateEnabled":true,"lngTimeout":20,"singleButtonPressAction":1,"doubleButtonPressAction":5,"automaticBatteryTypeDetection":true,"unlatchDuration":3},"webConfig":{"batteryWarningPerMailEnabled":false},"state":{"mode":2,"state":3,"trigger":0,"lastAction":3,"batteryCritical":false,"batteryCharging":false,"batteryCharge":60,"keypadBatteryCritical":false,"doorsensorBatteryCritical":false,"doorState":0,"ringToOpenTimer":0,"nightMode":false},"firmwareVersion":196648,"hardwareVersion":2817,"serverState":0,"adminPinState":0,"virtualDevice":false,"creationDate":"2021-11-25T18:49:46.524Z","updateDate":"2021-12-10T15:53:02.527Z"}]
I've censored all privacy related date by replacing it with $var_name
Great, thanks for the output, very helpful. Nuki reports a new device type, which wasn't supported/expected. The value isn't documented yet, but other values look good.
I've pushed the change adding support of a new type. Please update to the latest version and try again
After updating I receive 2 devices and 15 entiteties: Device 1: Nuki Haustuer Device 2: Nuki Web API
Device 1:
Device 2:
Door Open sensor is not available
In Device 1 some sensores are not available. Is there a possibility to open and close the device with the help of the integration?
regards
@rectangular-starchaser Please update the integration once again. I've pushed some extra changes. It's a bit tough to add support without having a real device and with missing documentation
Thank's a lot for your support!! If you need more or more precise input from our side let us know.
I have updatetd the integration, some sensors are available others still not.
The real state at this time was locked. "Control" and "Sensor" section fine, "State" of "Diagnostic" section wrong. Door Open sensor or control not available. And still an additional remark to the initial setup: I had to insert at least one character in the field: "Nuki Bridge Host Name or IP Adress". Without this character I received the reported error code "User input malformed".
Regards
@rectangular-starchaser
Door Open sensor or control not available
Now I better understand what's happening. Do you actually have the door sensor installed and configured?
In the JSON output you've shared, "doorState":0
state means that the door sensor is unavailable. Do you get this value every time you call the API?
@kvj
The additional external door sensor to validate if the door is realy closed or opened is not installed. I only have the pure and naked Nuki 3.0 Pro installed. So if doorState is triggerd by the external sensor it is logical that is not available. If "Door Open" in the "Sensor" section and "Door Stae" and "State" in the "Diagnostic" section depend on this externel door sensor then it is clear.
With the "Lock" switch in the "Controles" section, I am able to lock and unlock the door. But there is no way to realy open the door. Is this "Open" switch missing or is this functionality not given in the integration or over the web API. With the Android APP connected to the Nuki Wep API it is possible.
Regards
@rectangular-starchaser
Ok, got it. In case of Nuki 2.0, door sensor (quite unreliable) was included into package. With Nuki 3.0, it's optional and pricey. Your setup doesn't have it, therefore those entities should not be added. I've pushed some changes, please update the component and re-add it. I've also adjusted optional config input handling, you won't need to add any chars to make Web API only setup working.
Regarding the open/unlatch function, it's supported, but unfortunately there's no Lovelace UI for that. I've adjusted the README.md with workarounds https://github.com/kvj/hass_nuki_ng#openunlatch-nuki-lock-via-ui
@kvj I updated in HACS; Deleted the former integration and did a new setup. I still had to enter a character in the field: "Nuki Bridge Host Name or IP Adress". Without this character I received the reported error code "User input malformed" again. Result of new set up:
Next mission is to test the workaround.
Edit: Manualy calling the service works. Thanks a lot.
Regards
I'm using home assistant version 2021.10.6 as a container. When I try to install a Nuki 3.0 Pro without a bridge but with web access and web token as described in your tutorial, I receive the following error message:
Can you advise what to do?
regards