Giter Site home page Giter Site logo

ha-addons's Introduction

Home Assistant Add-on Repository for Cloudflared

Project Stage Maintenance License

About

Home Assistant allows anyone to create add-on repositories to share their add-ons for Home Assistant easily. This repository is one of those repositories, providing extra Home Assistant add-ons for your installation.

The primary goal of this repository is to provide an add-on to use Cloudflared. Additional add-ons might follow in the future.

Installation

Adding this add-ons repository to your Home Assistant instance is pretty straightforward. In the Home Assistant add-on store, a possibility to add a repository is provided.

Use the following URL to add this repository:

https://github.com/brenner-tobias/ha-addons

Add-ons provided by this repository

Latest Version Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

Use a Cloudflare Tunnel to remotely connect to Home Assistant without opening any ports

📚 Cloudflared add-on documentation

Releases

Releases are based on Semantic Versioning, and use the format of MAJOR.MINOR.PATCH. In a nutshell, the version will be incremented based on the following:

  • MAJOR: Incompatible or major changes.
  • MINOR: Backwards-compatible new features and enhancements.
  • PATCH: Backwards-compatible bugfixes and package updates.

Support

Got questions?

Open an issue here on GitHub. Note, we use a separate GitHub repository for each add-on. Please ensure you are creating the issue on the correct GitHub repository matching the add-on.

For a general repository issue or add-on ideas open an issue here

License

MIT License

Copyright (c) 2024 Tobias Brenner

Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

ha-addons's People

Contributors

brenner-bot avatar brenner-tobias avatar alecrust avatar elcajon avatar peyanski avatar

Stargazers

hide avatar Mojtaba Ebrahimi avatar Claus Bayer avatar  avatar Andrew G. Dunn avatar Bertrand Couture avatar  avatar Stephen avatar  avatar  avatar Eduardo Grigolo avatar Matheus Canela avatar  avatar  avatar Adam Klukowski avatar muhammad f huda avatar  avatar Michael Skrzypietz avatar Luan Bitar avatar  avatar  avatar  avatar  avatar  avatar Matthias Balke avatar Ivan avatar  avatar  avatar Abdulwahab Ali avatar Erik Claesson avatar  avatar  avatar Chester avatar  avatar Dlani avatar  avatar Roman Schmitz avatar Ryo Lambert avatar  avatar Karlo Kraljic avatar Samson Olufuwa avatar Andris Lukjanovics avatar Lorenzo Gallucci avatar  avatar  avatar  avatar Rishabh Desai avatar Filip Staffa avatar C Reimers avatar ondrej avatar  avatar  avatar Chris Williams avatar Gustavo avatar K.B.Dharun Krishna avatar Eugen avatar  avatar Sven avatar  avatar NelsonSu avatar  avatar Christoph avatar Miguel Alexandre avatar  avatar  avatar Raymond van der Werf avatar Alberto Forni avatar  avatar Mercedes Remesar Cortes avatar Sebastian avatar Charith Madhuranga avatar matAchu avatar  avatar Pedro Saratscheff avatar Marián Bednárik avatar  avatar  avatar  avatar srademac avatar  avatar  avatar Ehsan Golpayegani avatar Andri Óskarsson avatar  avatar Alexandru Anghel avatar Fer avatar  avatar Ethan avatar  avatar  avatar Simon Vallières avatar Jamison Kissh avatar Satish Kalantre avatar Karol avatar  avatar Pablo Azurduy avatar Koen Torfs avatar  avatar Willer Lee avatar  avatar

Watchers

Ulises Legarreta avatar  avatar Nuno Cardoso avatar  avatar  avatar  avatar  avatar

ha-addons's Issues

[Question] Manual installation

Hi,
it's just a question, not a feature request.

Is it possible to manually install the Cloudflared add-on, piece by piece, on a "core" HASS installation?
I'm still not very familiar with Home Assistant, but I can find my way into Linux systems.

My problem is that I have a tailored Debian 12 install on a Raspberry Pi 4 that I customized for my needs (i3 desktop with a bunch of scripts, multimedia stuff etc) where I run HASS core.

Thanks

failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.

I have added the Domain to cloudflare and authorized successfully it.
If I go to my Website the tunnel does not work.

I get following error message in the homeassistant logs:
failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Buffer-Sizes for details.

after that i get those informations:
2024-02-17T20:30:09Z INF Registered tunnel connection connIndex=0 connection=49c3d3d5-77a3-4f27-979b-415b75815133 event=0 ip=198.41.192.67 location=fra08 protocol=quic 2024-02-17T20:30:09Z INF Registered tunnel connection connIndex=1 connection=eefb7d36-0e15-4592-8e86-8715db929b31 event=0 ip=198.41.200.113 location=fra06 protocol=quic 2024-02-17T20:30:10Z INF Registered tunnel connection connIndex=2 connection=8f915324-84c4-4916-9a5e-7367304629de event=0 ip=198.41.192.57 location=fra11 protocol=quic 2024-02-17T20:30:11Z INF Registered tunnel connection connIndex=3 connection=4fba1ad1-2f7b-46c0-b211-4c0ff5ed95ff event=0 ip=198.41.200.23 location=fra07 protocol=quic

Is this the error why it does not work? How can I fix this?

Support for HA Core Running Inside Docker?

When I follow the steps for accessing the "Add-Ons" Store to add this extension it appears I am running HA Core due to installing in a Docker instance.

I get this error, "This redirect is not supported by your Home Assistant installation. It needs either the Home Assistant Operating System or Home Assistant Supervised installation method. For more information, see the documentation."

I'd love to be able to use this utility but I'm not sure the best path forward, I'm relatively new to Docker and virtualization, period...

I already have a separate RPi with debian running as a Wireguard Server with a DDNS utility for routing my Wireguard traffic through Cloudflare and resolving DNS since my ISP hasn't given me a static IP. I understand I could access my docker container this way but I'd like to connect my HA through cloudflare then use the native HA iOS app on my Apple devices.

Any suggestions or thoughts for development to assist in solving my issue?

Failed to save add-on configuration - additional_hosts

Describe the bug
I have this error:

Failed to save add-on configuration, Invalid list for option 'additional_hosts' in Cloudflared (_______). Got {'external_hostname': '', 'additional_hosts': '___.homes', 'tunnel_name': 'homeassistant'}

(redacted)

To Reproduce
Steps to reproduce the behavior:
on "Additional Hosts" add `

  1. Go to 'configuration'
  2. Add <domainname>.homes to "Additional Hosts"
  3. Hit save button
  4. See error

Add-On / Home Assistant Information (please complete the following information):

  • Add-On Version 4.1.8
  • Home Assistant 2023.6.2
  • Supervisor 2023.06.2
  • Operating System 10.3
  • Frontend 20230608.0 - latest
  • Devices Raspberry PI 3

How to add this add-on to Hassio Container?

I have tried to put the repository in the
/homeassistant/config ==> didnt work
/homeassistant/config/custom_components ==> didnt work

is there any way to able this addon?

for example i put localtuya in /homeassistant/config/custom_components is working (i can see my localtuya in my integration)

Existing tunnel error

Describe the bug
Get this error: FATAL: Failed to create tunnel. Please check the Cloudflare Zero Trust Dashboard for an existing tunnel with the name homeassistant and delete it: Visit https://one.dash.cloudflare.com, then click on Access / Tunnels

I don't have any tunnels with this name in my dashboard, but I already have another tunnel on another subdomain, to an Home Assistant installation in another location.

So this is an attempt to get a second Home Assistant (in another location / another IP) with another subdomain. Not sure if it's a limit for number of tunnels for each domain?

To Reproduce
Steps to reproduce the behavior:

  1. Completly new and fresh install of Home Assistant on an Odroid, without any other plugins, add-ons or similar.
  2. Install Cloudflare add-on.
  3. Add domain under configuration.
  4. Open URL in log for authorize and get a success message.
  5. Update log in add-on and see the error message.

Expected behavior
Not an error and a working tunnel.

Screenshots
If applicable, add screenshots to help explain your problem.

Add-On / Home Assistant Information:

-----------------------------------------------------------
 Add-on: Cloudflared
 Use a Cloudflare Tunnel to remotely connect to Home Assistant without opening any ports
-----------------------------------------------------------
 Add-on version: 4.2.9
 You are running the latest version of this add-on.
 System: Home Assistant OS 11.0  (aarch64 / odroid-n2)
 Home Assistant Core: 2023.10.3
 Home Assistant Supervisor: 2023.10.0
-----------------------------------------------------------
 Please, share the above information when looking for help
 or support in, e.g., GitHub, forums or the Discord chat.
-----------------------------------------------------------
[16:00:57] INFO: Checking add-on config...
[16:00:57] INFO: Checking for existing certificate...
[16:00:57] NOTICE: No certificate found
[16:00:57] INFO: Creating new certificate...
[16:00:57] NOTICE: 
[16:00:57] NOTICE: Please follow the Cloudflare Auth-Steps:
[16:00:57] NOTICE: 
Please open the following URL and log in with your Cloudflare account:

https://dash.cloudflare.com/argotunnel?aud=&callback=https%3A%2F%2Flogin.cloudflareaccess.org%2F-tF...

Leave cloudflared running to download the cert automatically.
You have successfully logged in.
If you wish to copy your credentials to a server, they have been saved to:
/root/.cloudflared/cert.pem
[16:01:12] INFO: Authentication successfull, moving auth file to the '/data' folder
[16:01:12] INFO: Checking for existing certificate...
[16:01:12] INFO: Existing certificate found
[16:01:12] INFO: Checking for existing tunnel...
[16:01:12] NOTICE: No tunnel file found
[16:01:12] INFO: Creating new tunnel...
failed to create tunnel: Create Tunnel API call failed: tunnel with name already exists
[16:01:13] FATAL: Failed to create tunnel.
    Please check the Cloudflare Zero Trust Dashboard for an existing tunnel with the name homeassistant and delete it:
    Visit https://one.dash.cloudflare.com, then click on Access / Tunnels
s6-rc: warning: unable to start service init-cloudflared-config: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
/run/s6/basedir/scripts/rc.init: fatal: stopping the container.

Unable to add your repository to HA

Describe the bug
A clear and concise description of what the bug is.

To Reproduce
Steps to reproduce the behavior:

  1. Go to: Add-on store
  2. Click on: Repositories
  3. Add https://github.com/brenner-tobias/ha-addons, then Add, and get below error
  4. See error:

Cmd('git') failed due to: exit code(128) cmdline: git clone -v --recursive --depth=1 --shallow-submodules -- https://github.com/brenner-tobias/ha-addons /data/addons/git/9074a9fa stderr: 'Cloning into '/data/addons/git/9074a9fa'... POST git-upload-pack (175 bytes) error: could not lock config file /data/addons/git/9074a9fa/.git/config: No such file or directory fatal: could not set 'core.repositoryformatversion' to '0' '

Expected behavior
I expected this to add the repository, but it fails with the error listed above.

Screenshots
If applicable, add screenshots to help explain your problem.

Add-On / Home Assistant Information (please complete the following information):

  • Add-On Version (e.g. 0.7)
  • Supervisor Version: 2024.06.0
  • Core Version: 2024.6.3
  • Operating System: 12.4
  • Devices: VM on Proxmox

Additional context
Add any other context about the problem here.

The webpage cannot be accessed after the Cloudflared version is updated to 4.1.7

Describe the bug
Check the log: failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github.com/quic-go/quic-go/wiki/UDP-Receive- Buffer-Size for details.

Expected behavior
After upgrading to the latest version 4.1.7, the webpage cannot be accessed. Check the log: failed to sufficiently increase receive buffer size (was: 208 kiB, wanted: 2048 kiB, got: 416 kiB). See https://github .com/quic-go/quic-go/wiki/UDP-Receive-Buffer-Size for details. But the previous version did not have this error

Add-On / Home Assistant Information (please complete the following information):
Current version: 4.1.7
supervisor-2023.05.dev1702
core-2023.5.4
Home Assistant Supervised
Raspberry Pi 3 Model B+

Unable to update addon

Hi @brenner-tobias thanks so much for this update. It work very well without anyissue.
I only have this issue that my installation cannot find the addon repository in order to update it to the new version.

Describe the bug
Unable to update the addon.

Expected behavior
The addon repository can be found from the list without saying Unknow.

Screenshots
addon
no-addon-repo

Add-On / Home Assistant Information (please complete the following information):

  • Add-On Version (e.g. 4.2.7)
  • Supervisor Version (e.g. supervisor-2023.10.1)
  • Core Version (e.g. core-2023.11.1)
  • Operating System (e.g. Home Assistant OS 11.1)
  • Devices (e.g. Raspberry Pi 4 Model B)

Addon keeps crashing

Running home assistant os on a Pi4

Was working without issue until yesterday and then failed after upgrade. Would no longer start. I uninstalled, rebooted home assistant, and reinstalled the addon. Now I'm getting this:

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service init-banner: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started

Add-on: Cloudflared
Use a Cloudflare Tunnel to remotely connect to Home Assistant without opening any ports

Add-on version: 3.0.0
You are running the latest version of this add-on.
System: Home Assistant OS 9.0 (aarch64 / raspberrypi4-64)
Home Assistant Core: 2022.9.7
Home Assistant Supervisor: 2022.09.1

Please, share the above information when looking for help
or support in, e.g., GitHub or forums.

s6-rc: info: service init-banner successfully started
s6-rc: info: service init-log-level: starting
s6-rc: info: service init-log-level successfully started
s6-rc: info: service init-cloudflared-config: starting
[07:59:36] INFO: Checking Add-on config...
[07:59:38] INFO: Checking for existing certificate...
[07:59:38] NOTICE: No certificate found
[07:59:38] INFO: Creating new certificate...
[07:59:38] NOTICE:
[07:59:38] NOTICE: Please follow the Cloudflare Auth-Steps:
[07:59:38] NOTICE:
Please open the following URL and log in with your Cloudflare account:
https://dash.cloudflare.com/argotunnel?callback=https%3A%2F%2Flogin.cloudflareaccess.org%2FX5mR-XPJNi7tHAMO5JFXEF_COa1DxKR8FFaGNuZSTi0%3D
Leave cloudflared running to download the cert automatically.
2022-09-28T15:00:33Z INF Waiting for login...
2022-09-28T15:01:32Z INF Waiting for login...
2022-09-28T15:02:25Z INF Waiting for login...
2022-09-28T15:03:20Z INF Waiting for login...
2022-09-28T15:04:13Z INF Waiting for login...
2022-09-28T15:05:06Z INF Waiting for login...
2022-09-28T15:05:59Z INF Waiting for login...
2022-09-28T15:06:52Z INF Waiting for login...
2022-09-28T15:07:45Z INF Waiting for login...
2022-09-28T15:08:38Z INF Waiting for login...
Failed to write the certificate due to the following error:
Failed to fetch resource
Your browser will download the certificate instead. You will have to manually
copy it to the following path:
/root/.cloudflared/cert.pem
Failed to fetch resource
s6-rc: warning: unable to start service init-cloudflared-config: command exited 1
/run/s6/basedir/scripts/rc.init: warning: s6-rc failed to properly bring all the services up! Check your logs (in /run/uncaught-logs/current if you have in-container logging) for more information.
prog: fatal: stopping the container.
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service init-log-level: stopping
s6-rc: info: service init-log-level successfully stopped
s6-rc: info: service init-banner: stopping
s6-rc: info: service init-banner successfully stopped
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Cant Install Add-On on hassio rpi

Add-On could not be installed. What can i do?

Add-on konnte nicht installiert werden
Can't install ghcr.io/brenner-tobias/cloudflared/aarch64:2.0.4: 500 Server Error for http+docker://localhost/v1.41/images/create?tag=2.0.4&fromImage=ghcr.io%2Fbrenner-tobias%2Fcloudflared%2Faarch64&platform=linux%2Farm64: Internal Server Error ("Get "https://ghcr.io/v2/brenner-tobias/cloudflared/aarch64/manifests/sha256:ba2cdb21f18dbfb93f6e81b971e2247bfab7da17f74b5d779bcab1ea51f69cb1": dial tcp 140.82.121.34:443: i/o timeout")

Broken Documentation Link

Describe the bug
Line 43 in the Add On docs links to a tunnel document that doesn't exist in the add-on repo. After some digging I noticed the brenner-tobias/addon-cloudflared repo which did have the doc.

To Reproduce
Steps to reproduce the behavior:

  1. From GitHub or Add on, navigate to docs
  2. Click "local or managed tunnel" link

Expected behavior
Link works

Screenshots
N/A

Add-On / Home Assistant Information (please complete the following information):

  • Add-On Version (e.g. 0.7)
  • Supervisor Version (e.g. supervisor-2021.10.8)
  • Core Version (e.g. core-2021.11.5)
  • Operating System (e.g. Home Assistant OS 6.6)
  • Devices (e.g. Raspberry Pi 4 Model B)

Additional context
Add any other context about the problem here.

Tunenl is not created

Describe the bug
A clear and concise description of what the bug is.

Just restart Cloudflare Addon

After restart tunnel is not established.

I removed tunnel and try to create it from scratch but I get an error

Failed to validate requested hostname *.mydomain.com: Get "https://i.api.cloudflare.com/v4/zones?name=%2A.mydomain.com&page=1&per_page=100&status=active": net/http: request canceled (Client.Timeout exceeded while awaiting headers) (Code: 1010)

To Reproduce
Steps to reproduce the behavior:

  1. restart cloudflare addon

Expected behavior
Tunnel created and established.

Add-On / Home Assistant Information (please complete the following information):

Everything in the newest versions

  • Add-On Version (e.g. 4.2.9)
    Home Assistant Core: 2023.11.0
    Home Assistant Supervisor: 2023.10.1

Samba

I have a local Samba server and would like to see if that can be add into the config to tunnel into my SMB thru my domain.

Provide option to change default protocol

Is your feature request related to a problem? Please describe.
I observed that my connection is very slow and laggy with Cloudflare's default setting on QUIC, but it fast being set on HTTP2.

Describe the solution you'd like
Please add addon configuration to set the default setting as described here

Describe alternatives you've considered
I don't see any.

Additional context

Home Assistant Cloudflare addon fail to connect

Cloudflare add on 5.1.1
Home assistant full updated
Suddenly start to fail to connect to the tunnel, continuously loosing the connection
Error log

ERR Serve tunnel error error="failed to accept QUIC stream: timeout: no recent network activity" connIndex=1 event=0 ip=198.41.200.43
After few minutes connection resume and then lose again after a while
Other tunnel perfectly working

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.