Git Product home page Git Product logo

qr-code-generator's People

Contributors

deermaximum avatar dependabot[bot] avatar iainphay avatar misa1515 avatar tjorim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

qr-code-generator's Issues

Home Assistant 2023.8.0 Beta

Not Loaded
image

Logger: homeassistant.setup
Source: setup.py:209
First occurred: 20:52:53 (1 occurrences)
Last logged: 20:52:53

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==9.5.0'].

Generating Guest WiFi QR Code

It just doesn't work when I enter the content below

WIFI:T:WPA;S:guest;P:{{ states('input_text.guest_wifi_password')}};H:0

The error message

Logger: homeassistant.components.camera
Source: custom_components/qr_generator/camera.py:120 
Integration: Camera (documentation, issues) 
First occurred: 8:05:39 PM (4 occurrences) 
Last logged: 8:07:16 PM

Error adding entities for domain camera with platform qr_generator
Error while setting up qr_generator platform for camera
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 428, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 691, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 776, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/qr_generator/camera.py", line 92, in async_added_to_hass
    self._refresh()
  File "/config/custom_components/qr_generator/camera.py", line 120, in _refresh
    code = pyqrcode.create(
  File "/usr/local/lib/python3.10/site-packages/pyqrcode/__init__.py", line 111, in create
    return QRCode(content, error, version, mode, encoding)
  File "/usr/local/lib/python3.10/site-packages/pyqrcode/__init__.py", line 161, in __init__
    self.data = content.encode(self.encoding)
UnicodeEncodeError: 'latin-1' codec can't encode character '\u201d' in position 13: ordinal not in range(256)

Use case as/with tag

Hi, I'm just wondering is this can help me achieve such a scenario:

I have working face recognition using my door camera, and want to unlock the doors with it, but i am aware of false positive, so my idea is to generate one minute valid qr-code and send it to recognized person phone. Then person have to scan it using my door camera.

I believe that generated tag have to be added to home assistant tags, and removed on scan or validity ends
Is qr-code-generator a way to go ?

Pillow dependency

Not working on Home Assistant 2022.12.0b0.

Version of the custom_component

v1.0.1

Describe the bug

Can not set up QR code generator integration.

Debug log

Logger: homeassistant.util.package
Source: util/package.py:98
First occurred: 9:14:44 AM (3 occurrences)
Last logged: 9:14:47 AM

Unable to install package pillow==9.2.0: ERROR: Cannot install pillow==9.2.0 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip available: 22.3 -> 22.3.1 [notice] To update, run: pip install --upgrade pip

Logger: homeassistant.setup
Source: setup.py:202
First occurred: 9:14:47 AM (1 occurrences)
Last logged: 9:14:47 AM

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==9.2.0'].

Save image service only work on one QR Code

Debug log


websocket_api script: Error executing script. Error for call_service at pos 1: Could not find entity image.qr3 from integration
qr_generator
websocket_api script: Error executing script. Error for call_service at pos 1: Could not find entity image.qr_oborudovaniia from integration qr_generator
websocket_api script: Error executing script. Error for call_service at pos 1: Could not find entity image.otp from integration qr_generator

Save to local path

I would like to send generated QRCodes as attachment in notifications, and it seems the image entity is not appropiate for that.

Therefore, I think a service or configuration option to download current image (much like the camera.snapshot service) will be necessary.

Thanks!

HowTo and example to start with the integration

Hi,

could you add a HowTo (Install the component) and some examples how to add a QR-code to the UI.
The start would be much easier

thanks a lot

Edit: please ignore this issue, just saw the closed issues.

Cheers

ReadMe.Md to include wifi syntax

Is your feature request related to a problem? Please describe.
Recommend updating your ReadMe.MD with am example to generate your guest wifi password.

Describe the solution you'd like
In the "content" field add if you want display guest wifi:

WIFI:T:WPA2;S:MyNetworkName;P:ThisIsMyPassword;H:true;

Describe alternatives you've considered
Ultimately, in long run the user will want store secret in a secrets manager like hashi vault or at minimum base64 or call it from CSP secret . However, for home network and lockdown Home assistant little risk.

Example Configuration

I know it's an early release, would it be possible to add an example into the ReadMe.md for configuration?
Much Appreciated for those that don't python that much!

Requirements for qr_generator not found: ['pillow==9.5.0']

I'm receiving this error after updating Home Assistant.

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==9.5.0'].

Home Assistant 2023.4.5
Supervisor 2023.04.0
Operating System 10.0
Frontend 20230411.1 - latest

Template sample

It would be great if you could provide a working dynamic template sample.

Thanks in advance!

New Beta

Logger: homeassistant.setup
Source: setup.py:185
First occurred: 00:08:32 (1 occurrences)
Last logged: 00:08:32

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==10.0.1'].

Diacritics

Version of the custom_component

2.0

Describe the bug

Hi please add diacritics to QR Code Generator
image

Pillow dependency - take 2

Not working on Home Assistant 2023.02.0b0.

Version of the custom_component

v1.0.2

Describe the bug

Can not set up QR code generator integration.

Debug log

Logger: homeassistant.util.package
Source: util/package.py:100
First occurred: 11:17:03 PM (3 occurrences)
Last logged: 11:17:19 PM

Unable to install package pillow==9.3.0: ERROR: Cannot install pillow==9.3.0 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts [notice] A new release of pip available: 22.3 -> 22.3.1 [notice] To update, run: pip install --upgrade pip
Logger: homeassistant.setup
Source: setup.py:205
First occurred: 11:17:19 PM (1 occurrences)
Last logged: 11:17:19 PM

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==9.3.0'].

Request: Example on how to send data to template configuration through an automation

Is your feature request related to a problem? Please describe.
Reading through the README.md I am unable to understand how I am supposed to populate the template in an automated way.

The README.md currently contains the following example:

For wifi access with template
Name: My wifi access
Content: WIFI:T:WPA2;S:MyNetworkName;P:{{states("input_text.wlan_password")}};H:true;

but the README.md does not describe how {{states("input_text.wlan_password")}} is supposed to be sent to the integration to achieve the dynamic update of the QR Code.

Describe the solution you'd like
I would like an example, showing an automation in Home Assistant that update the QR Code image by sending new data to its template .

No module named 'png'

Version of the custom_component

v.2.0.1

Describe the bug

Can't generate the png file

Getting an error that 'png' python module is missing. I am using Home Assistant from the offical docker image. I can install the png module with a command in the Dockerfile but don't see any requirements in your readme.

log

Logger: homeassistant.components.image
Source: custom_components/qr_generator/image.py:126
Integration: Image (documentation, issues)
First occurred: 10:37:42 PM (8 occurrences)
Last logged: 10:41:03 PM

Error adding entities for domain image with platform qr_generator
Error while setting up qr_generator platform for image
Traceback (most recent call last):
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 510, in async_add_entities
    await asyncio.gather(*tasks)
  File "/usr/src/homeassistant/homeassistant/helpers/entity_platform.py", line 750, in _async_add_entity
    await entity.add_to_platform_finish()
  File "/usr/src/homeassistant/homeassistant/helpers/entity.py", line 1003, in add_to_platform_finish
    await self.async_added_to_hass()
  File "/config/custom_components/qr_generator/image.py", line 94, in async_added_to_hass
    await self._refresh()
  File "/config/custom_components/qr_generator/image.py", line 126, in _refresh
    code.png(
  File "/usr/local/lib/python3.11/site-packages/pyqrcode/__init__.py", line 462, in png
    builder._png(self.code, self.version, file, scale,
  File "/usr/local/lib/python3.11/site-packages/pyqrcode/builder.py", line 1266, in _png
    import png
ModuleNotFoundError: No module named 'png'

Deprecation Home Assistant 2024.5

Version of the custom_component

2.1.8

Version of Home Assistant

2024.5.0b0

Describe the bug

Logger: homeassistant.helpers.frame
Source: helpers/frame.py:190
First occurred: 22:12:52 (5 occurrences)
Last logged: 22:15:23

Detected that custom integration 'qr_generator' calls `async_track_state_change` instead of `async_track_state_change_event` which is deprecated and will be removed in Home Assistant 2025.5 at custom_components/qr_generator/image.py, line 108: async_track_state_change(, please create a bug report at https://github.com/DeerMaximum/QR-Code-Generator/issues

Integration does not work with HA 2023.10

Logger: homeassistant.setup
Source: setup.py:185
First occurred: 21:54:28 (1 occurrences)
Last logged: 21:54:28

Setup failed for custom integration qr_generator: Requirements for qr_generator not found: ['pillow==10.0.0'].

V1.0.3 on Install Wizard doesn't load

Describe the bug

Using recommended install method, HACS repo on v1.0.3. After Home instant reboot and integration added the wizard spins with no success.

Only fix was to use v1.0.2

Debug log

None

Options are not available to be set

First of all, thank you for such simple and nice integration!

Version of the custom_component

V.2.0.0

Describe the bug

In README.md file there is "Details" section which contains "Options" and "Attributes".
I've found attributes in images entity. But I couldn't find "Options". Where can I set them? As I understand, I can't just change attribute of image, and then it will be re-rendered..

As I guessed, those "Options" can be set while creating image entity on page of "QR-Code Generator" integration. And there is an "Advanced settings" checkbox, but clicking on it does nothing. Here are screenshots with checked and unchecked "Advanced settings" checkbox:

Screenshot 2023-07-11 at 11 06 26 Screenshot 2023-07-11 at 11 06 14

Debug log

Any related logs (related because of "qr_generator:1" link) , I've found in browser console is here
Google Chrome. latest for now: Version 114.0.5735.198 (Official Build) (x86_64)


Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "mini-graph-card" has already been used with this registry
qr_generator:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "button-card-action-handler" has already been used with this registry
qr_generator:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "my-slider" has already been used with this registry
qr_generator:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "light-entity-card-editor" has already been used with this registry
qr_generator:1 Uncaught DOMException: Failed to execute 'define' on 'CustomElementRegistry': the name "auto-entities-editor" has already been used with this registry

And logs from home assistant:
Home Assistant 2023.7.1
Supervisor 2023.07.1
Operating System 10.3
Frontend 20230705.1 - latest

2023-07-11 11:33:36.227 WARNING (SyncWorker_0) [homeassistant.loader] We found a custom integration qr_generator which has not been tested by Home Assistant. This component might cause stability problems, be sure to disable it if you experience issues with Home Assistant
2023-07-11 11:33:58.858 INFO (MainThread) [homeassistant.bootstrap] Setting up stage 2: {'media_source', 'stt', 'map', 'file_upload', 'script', 'person', 'homeassistant_alerts', 'mobile_app', 'co2signal', 'auth', 'schedule', 'template', 'input_datetime', 'fully_kiosk', 'config', 'sensor', 'energy', 'input_boolean', 'samsungtv_smart', 'stream', 'panel_custom', 'input_number', 'openweathermap', 'dlna_dmr', 'esphome', 'persistent_notification', 'device_automation', 'hardware', 'xiaomi_miio', 'switch_as_x', 'mqtt', 'ffmpeg', 'upnp', 'default_config', 'image_upload', 'application_credentials', 'system_health', 'history', 'timer', 'assist_pipeline', 'wyoming', 'search', 'speedtestdotnet', 'browser_mod', 'blueprint', 'zone', 'trace', 'group', 'radio_browser', 'onboarding', 'homekit', 'repairs', 'localtuya', 'tag', 'hacs', 'automation', 'met', 'scene', 'input_select', 'sun', 'switch', 'counter', 'ui_lovelace_minimalist', 'utility_meter', 'input_button', 'tts', 'diagnostics', 'conversation', 'logbook', 'input_text', 'lovelace', 'qr_generator', 'my', 'analytics', 'samsungtv'}
2023-07-11 11:34:04.567 INFO (MainThread) [homeassistant.setup] Setting up qr_generator
2023-07-11 11:34:04.568 INFO (MainThread) [homeassistant.setup] Setup of domain qr_generator took 0.0 seconds
2023-07-11 11:34:07.736 INFO (MainThread) [homeassistant.components.image] Setting up image.qr_generator
2023-07-11 11:34:07.805 DEBUG (MainThread) [custom_components.qr_generator] Print "Test wifi" with: WIFI:S:changed NAME;T:WPA;P:some text;;
2023-07-11 11:36:26.040 ERROR (MainThread) [frontend.js.latest.202307051] https://fakehainstanceaddress/config/integrations/integration/qr_generator:0:0 Uncaught 
2023-07-11 11:36:26.081 ERROR (MainThread) [frontend.js.latest.202307051] https://fakehainstanceaddress/config/integrations/integration/qr_generator:0:0 Uncaught 
2023-07-11 11:36:26.084 ERROR (MainThread) [frontend.js.latest.202307051] https://fakehainstanceaddress/config/integrations/integration/qr_generator:0:0 Uncaught 
2023-07-11 11:36:26.192 ERROR (MainThread) [frontend.js.latest.202307051] https://fakehainstanceaddress/config/integrations/integration/qr_generator:0:0 Uncaught 
2023-07-11 11:36:26.267 ERROR (MainThread) [frontend.js.latest.202307051] https://fakehainstanceaddress/config/integrations/integration/qr_generator:0:0 Uncaught 
2023-07-11 11:37:20.041 INFO (MainThread) [homeassistant.components.image] Setting up image.qr_generator
2023-07-11 11:37:20.046 DEBUG (MainThread) [custom_components.qr_generator] Print "Test wifi" with: WIFI:S:changed NAME;T:WPA;P:some text;;

Pillow outdated

They just bumped the Pillow version in beta 8/9. The HA release from tonight will break this integration.

Component stop working after HA Core 2023.8.0

Version of the custom_component

2.0.0

Describe the bug

Component not running because of dependency problem

Debug log


Logger: homeassistant.util.package
Source: util/package.py:107
First occurred: 05:49:01 (3 occurrences)
Last logged: 05:49:04

Unable to install package pillow==9.5.0: ERROR: Cannot install pillow==9.5.0 because these package versions have conflicting dependencies. ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/topics/dependency-resolution/#dealing-with-dependency-conflicts

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.