Giter Club home page Giter Club logo

Comments (14)

chpego avatar chpego commented on September 27, 2024

Hi,
I think it's because you're using HA 2021.10 version, see this issue
it's fix in 2021.11 version

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

Hi,
after update HA to 2021.11.5 same behaviour.
Any other idea?

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

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:

vol.Optional("address", default=user_input.get("address", "")): cv.string,

So I assume this error is raised by hass and not by the integration itself?
Best Regards!

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

@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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

HI, thanks for coming back on this one:
That's my curl command

  • curl -X GET --header 'Accept: application/json' --header 'Authorization: Bearer API_KEY_HERE' 'https://api.nuki.io/smartlock'
    which yields:
    [{"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

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

After updating I receive 2 devices and 15 entiteties:
Device 1: Nuki Haustuer
Device 2: Nuki Web API

Device 1:
Nuki Haustuer

Device 2:
Nuki Web API

Door Open sensor is not available
Bildschirmfoto zu 2021-12-10 20-33-05

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

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

@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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

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.

Tür9_50

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

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

@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

from hass_nuki_ng.

kvj avatar kvj commented on September 27, 2024

@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

from hass_nuki_ng.

rectangular-starchaser avatar rectangular-starchaser commented on September 27, 2024

@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:
Nuki12-12

Next mission is to test the workaround.

Edit:
Manualy calling the service works. Thanks a lot.

Regards

from hass_nuki_ng.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.