Code Monkey home page Code Monkey logo

virtual-keys's Introduction

virtual-keys

hacs_badge

Create login link for Home Assistant that you can share with guests.

image

Installation

HACS installation

You need to install HACS first.

Because HACS doesn't support both Integration and Plugin in the same repository, you need to install it twice, once as an Integration and once as a Plugin (Lovelace).

  • add "Custom repositories" to HACS, paste the URL of this repository and select "Lovelace" as category

  • go to HACS -> Frontend, Explore and Download Repositories, search for "virtual keys" and install it

  • in HACS "Custom repositories" delete the URL of this repository

  • add "Custom repositories" to HACS, paste the URL of this repository and this time select "Integration" as category

  • go to HACS -> Integrations, Explore and Download Repositories, search for "virtual keys" and install it

  • add to configuration.yaml:

virtual_keys:

panel_custom:
  - name: virtual-keys-panel
    require_admin: true
    url_path: virtual-keys
    sidebar_title: Virtual Keys
    sidebar_icon: mdi:key-variant
    module_url: /local/community/virtual-keys/virtual-keys.js
  • restart Home Assistant

Use case

I want to share a "virtual key" with my friends that is valid for a limited time and that they can use to access specific entities in Home Assistant like the fron gate. The key is actually a link to my Home Assistant that can be opened in a browser.

To make this work, I need to make some additional steps (after installing Virtual Keys):

  • create a new user in Home Assistant eg. "guest"

  • create a new group eg. "guests" and add the user "guest" to it, and also the devices you want to give access to, eg "cover.front_gate", instructions here

  • create a new View (tab) in the default Lovelace UI and add the entities you want to give access to, eg. "cover.front_gate", set the visibility to only show to user "guest".

  • install kiosk-mode and configure it set "kiosk" mode for user "guest"

Ths is it, you can now create Virtual Keys and share the link.

virtual-keys's People

Contributors

kcsoft avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

ouranos6

virtual-keys's Issues

No copy code

Hello, I've tried to use your add-on but it didn't give me a code... but instead I have this issue on the chrome debug console

image

Can you help me?

Virtual Keys UI isn't showing all fields and won't work

It's been a few months since I've used virtual keys, but I have a guest staying with me so I wanted to set one up. Unfortunately, when I visit the page to create a new virtual key most of the UI doesn't appear. I can see the option to select a user, but not a custom username or timeout. Because of this, I'm unable to create a virtual key.

image

I recently updated to 2024.5.0, but it's possible this was introduced in an earlier update since I haven't used virtual keys in a bit. To ensure the issue wasn't on my end, I've tried reinstalling virtual keys and double checking configuration.yaml. Everything appears to be in order and matches the instructions on GitHub.

Any idea how to fix this @kcsoft? Thanks in advance! I love this add-on.

Opening a specific HA URL?

Thanks for building this. Fount it while looking for guest access methods in HA. Love the overall concept and the massive workflow improvement. If it would redirect to the specific guest dashboard URL maybe with a ?kiosk flag after login, instead of the default lovelace, that will be a massive gain! Maybe an option for a custom url while generating the key? This in my view gives more control to the user.

Homeassistant app - no copy code

Hi,

When connecting through the homeassistant oficial app, copying the link doesn't work.
When using chrome web browser, it works as expected

Thanks in advance

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.