[Custom Component] tedee Doorlock

Hi,
it doesn’t work, either.
I have installed a complete new VM as recommended, and after copying, restarting the new system, exactly the same error appears.

What do you think about the following points?

  • I have no folder __pycache__
  • you wrote !secret beyond the username / password - if I do so, I have additional errors
  • Do you know, if there are any restrictions for the password, e.g. special character
  • what if, the password / username is not accepted - is there the same error?
  • Are there any open ports necessary on the host-pc to get the system able to reach the tedee-server?

it’s frustrating…

Hello Peter, I understand that it is frustrating…
I think the pycache folder is created once the python package is executed, to store data for future request. It’s some Python inbuild feature, not made from me. It implies that HA never executes or finds the library. Are you sure that the files are stored in correct folder hierarchy? In the config folder there must be beside custom_components folder configuration.yaml and also secrets.yaml and others.
Also, if you are Windows user, can it be that the files are stored without correct permission? The vm is based on Linux, and Linux files are also case sensitive.
The !secret means, that the user and password are stored in the secrets.yaml file and user and password are imported from there.
What is your vm host program? VirtualBox? Vmware? I could test it on a Windows machine, but only with VirtualBox. Actually I do my work on a Linux machine.

yes, also my VM runs on Oracle VM VirtualBoxManager, and yes, it seems to me like that integration is not installes well, too.


remark: These are the folders and contents of my “System 1”, not on the second test-system.

Just tried a new copy-process by the file-editor (not over samba-share).
also, I renamed all files to non-capitalized letters. The integration is still not found.

I tried it on a Window host, and yes it works.
If the component is started with wrong user/password, there is another error message:

Dieser Fehler wurde von einer benutzerdefinierten Integration verursacht
Authentication not successfull

What I see in your screenshots: The file sizes are wrong. E.g. lock.py has normally 5.8 kbytes and manifest.json 266 bytes. Something must be wrong with your copy process.
You can also create empty text files lock.py, manifest.json and __init__.py and copy the content from the github files in there. But please use an editor that can store for Linux systems, like Programmer’s Notepad and deselect Tools - Use Tabs and select Tools - Line Endings - Unix

:partying_face: :100:
it works!
i just copied the code into empty files created by the file editor (HA-integration) and restarted.

Many, many thanks for that great help!
(now, I also will test your cards and further developments!)

Fine, that it works now!

Hi Jörg,
as the first step of Lock-Integrations finally worked with your greatful help,
Now, I’m not able to integrate your “pytedee 0.0.2” with the required additional entities.

I deleted the old installation and did the new one by the terminal-command python3 setup.py install and it seems to have finished without errors (I also did some homework :innocent:).
Also, I placed my Tedee-credentials to the example.py and deleted the configuration.yaml entries.

But still no entities or helpers after restart - but also no errors or config-faults.

Would you be so kind to advice me once again?
ADD: of course, the file-size is correct, now!

Peter, you don’t need to install pytedee. It installs when HA first time finds the custom component in folder tedee_lock. You only need three files there, lock.py, manifest.json and __init__.py. Nothing else.

ok, Jörg, I got it - no entities available for additional features, but attributes which can be read.
Many thanks again!

Hi,

I’m Kamil from Tedee Team and I have an update for you.

The ROPC authentication flow which is currently used in pytedee is deprecated and will be removed in Q1 2022. If you want to keep your integration working, please migrate to the new Personal Access Keys authentication.

The new Personal Access Key authentication gives you better control over who and how has access to your devices and does not expose your password.

Note: Currently PAK management is available only via Tedee API. By the end of the year, we will provide a user-friendly interface to our web application so that the user can easily generate keys.

I’ve created PR in pytedee repository which is changing deprecated ROPC authentication to new PAK authentication. You can check it here: https://github.com/joerg65/pytedee/pull/6

@joerg65 - I did not update the custom component repository, because it is hard to test for me the changes - I would really appreciate if you can adjust the code in the custom component repository to handle the new TedeeClient and new PAK authentication.

If you have any questions, feel free to contact me.

Best regards
Kamil

1 Like

Thank you for your effort. Actually I am too busy to look into this. There will come some free days over Christmas time I can do it. Stay tuned…

Joerg65 did You change the code to login PAK?

I have prepared, but I am waiting for a correction of the pull request of @klucyszy (Kamil). I can go forward, but it wouldn’t follow the right process.

I have updated everything to support PAK authentication.
So please update tedee_lock in custom_components and get a token from Tedee and do this change in configuration.yaml:

lock:
  - platform: tedee
    access_token: !secret tedee_pak

After restart HA, the correct version v0.0.3 of pytedee will be installed.

2 Likes

Got my tedee today and spent the evening to start integrating this custom component into HACS.

Also updated the docs accordingly and created a pull request to add the tedee icon and logo into home assistant brand repo. @klucyszy @Konrad-Tedee I hope this is fine for you.

2 Likes

Great news! I really appreciate your help in developing Tedee’s integration with Home Assistance. If you need our help, please write.

@joerg65 + @patrickhilker Thank you

I took some time and did a bigger refactoring of this custom component, including implementing a config flow (so no more yaml-config is needed :rocket:) and an entry in the device registry. Sadly I am not able to test it with more than one lock. Does anyone own more than one lock and would be willing to check it out? :slight_smile:

@joerg65 do you have enough time to review the changes in the next time? Or should I maintain my own fork for now?

@Konrad-Tedee From the docs I do not really understand what to do to receive push notifications to enable realtime updates of the lock. Could you point me in the right direction? Maybe I could register a webhook or something like that…?

1 Like

Unfortunately, there is no way now to receive push notifications. In the next quarter, we will introduce webhooks. I will let you know directly when this will be available. @patrickhilker , I can share with you my lock so you can check multiple lock scenarios. Please give me (on priv) your tedee account email.

1 Like