Skip to content

Commit

Permalink
Update to Evergine v2021.11.17.2-preview
Browse files Browse the repository at this point in the history
  • Loading branch information
vicfergar committed Nov 28, 2021
1 parent d96fdca commit 6cb0efe
Show file tree
Hide file tree
Showing 425 changed files with 890 additions and 18,082 deletions.
1 change: 1 addition & 0 deletions .mdlrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rules "~MD024"
66 changes: 66 additions & 0 deletions .yamllint
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
---
rules:
braces:
level: error
min-spaces-inside: 0
max-spaces-inside: 1
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
brackets:
level: error
min-spaces-inside: 0
max-spaces-inside: 0
min-spaces-inside-empty: -1
max-spaces-inside-empty: -1
colons:
level: error
max-spaces-before: 0
max-spaces-after: 1
commas:
level: error
max-spaces-before: 0
min-spaces-after: 1
max-spaces-after: 1
comments:
level: error
require-starting-space: true
min-spaces-from-content: 2
comments-indentation:
level: error
document-end:
level: error
present: false
document-start:
level: error
present: true
empty-lines:
level: error
max: 1
max-start: 0
max-end: 1
hyphens:
level: error
max-spaces-after: 1
indentation:
level: error
spaces: 2
indent-sequences: true
check-multi-line-strings: false
key-duplicates:
level: error
line-length:
ignore: |
.github/support.yml
level: warning
max: 120
allow-non-breakable-words: true
allow-non-breakable-inline-mappings: true
new-line-at-end-of-file:
level: error
new-lines:
level: error
type: unix
trailing-spaces:
level: error
truthy:
level: error
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2020 Víctor Ferrer García
Copyright (c) 2021 Víctor Ferrer García

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
44 changes: 24 additions & 20 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Home Assistant Community Add-on: Wave Engine Sample
# Home Assistant Community Add-on: Evergine Sample

[![GitHub Release][releases-shield]][releases]
![Project Stage][project-stage-shield]
Expand All @@ -13,26 +13,30 @@
![Project Maintenance][maintenance-shield]
[![GitHub Activity][commits-shield]][commits]

Sample add-on that hosts a WebGL2 sample application made with Wave Engine 3.0 Preview.
Sample add-on that hosts a WASM WebGL wiewer made with [Evergine](https://evergine.com/).

## About

This add-on is sample that hosts a WebGL2 sample application made with Wave Engine 3.0 Preview.
It is designed to be used as a startup structure for Add-ons based on [Evergine](https://evergine.com/).

It is designed to be used as a startup structure for Add-ons based on [Wave Engine](https://waveengine.net/).
Using Evergine brings the possibility of developing web 3D graphics apps integrated within Home Assistant.

Using Wave Engine brings the possibility of developing web graphics apps integrated within Home Assistant.
This add-on is still under development.

This add-on is using Ingress to embed its interface securely into Home Assistant.

[:books: Read the full add-on documentation][docs]

## Installation

1. Go to your Home Assistant web UI, "Supervisor" > "Add-on Store", Click 3-dots menu at upper right > "Repositories" and add this repository URL: [https://github.com/vicfergar/addon-wave-sample](https://github.com/vicfergar/addon-wave-sample)
1. Scroll down the page to find the new repository, and click the new add-on named "Wave Engine Sample"
1. Go to your Home Assistant web UI, "Supervisor" > "Add-on Store",
Click 3-dots menu at upper right > "Repositories" and add this
repository URL: [https://github.com/vicfergar/addon-evergine-sample](https://github.com/vicfergar/addon-evergine-sample)
1. Scroll down the page to find the new repository, and click the
new add-on named "Evergine Sample"
1. Click "Install" and give it a few minutes to finish downloading.
1. Click "Start", give it a few seconds to spin up, and then click the "Open Web UI" button that appears.
1. Click "Start", give it a few seconds to spin up, and then click
the "Open Web UI" button that appears.

## Contributing

Expand All @@ -59,7 +63,7 @@ our [GitHub Repository][repository].

MIT License

Copyright (c) 2020 Victor Ferrer
Copyright (c) 2021 Victor Ferrer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -83,19 +87,19 @@ SOFTWARE.
[amd64-shield]: https://img.shields.io/badge/amd64-yes-green.svg
[armhf-shield]: https://img.shields.io/badge/armhf-yes-green.svg
[armv7-shield]: https://img.shields.io/badge/armv7-yes-green.svg
[commits-shield]: https://img.shields.io/github/commit-activity/y/vicfergar/addon-wave-sample.svg
[commits]: https://github.com/vicfergar/addon-wave-sample/commits/master
[contributors]: https://github.com/vicfergar/addon-wave-sample/graphs/contributors
[docs]: https://github.com/vicfergar/addon-wave-sample/blob/master/wave-sample/DOCS.md
[commits-shield]: https://img.shields.io/github/commit-activity/y/vicfergar/addon-evergine-sample.svg
[commits]: https://github.com/vicfergar/addon-evergine-sample/commits/main
[contributors]: https://github.com/vicfergar/addon-evergine-sample/graphs/contributors
[docs]: https://github.com/vicfergar/addon-evergine-sample/blob/main/evergine-sample/DOCS.md
[vicfergar]: https://github.com/vicfergar
[gitlabci-shield]: https://gitlab.com/vicfergar/addon-wave-sample/badges/master/pipeline.svg
[gitlabci]: https://gitlab.com/vicfergar/addon-wave-sample/pipelines
[gitlabci-shield]: https://gitlab.com/vicfergar/addon-evergine-sample/badges/main/pipeline.svg
[gitlabci]: https://gitlab.com/vicfergar/addon-evergine-sample/pipelines
[i386-shield]: https://img.shields.io/badge/i386-yes-green.svg
[issue]: https://github.com/vicfergar/addon-wave-sample/issues
[license-shield]: https://img.shields.io/github/license/vicfergar/addon-wave-sample.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2020.svg
[issue]: https://github.com/vicfergar/addon-evergine-sample/issues
[license-shield]: https://img.shields.io/github/license/vicfergar/addon-evergine-sample.svg
[maintenance-shield]: https://img.shields.io/maintenance/yes/2021.svg
[project-stage-shield]: https://img.shields.io/badge/project%20stage-production%20ready-brightgreen.svg
[reddit]: https://reddit.com/r/homeassistant
[releases-shield]: https://img.shields.io/github/release/vicfergar/addon-wave-sample.svg
[releases]: https://github.com/vicfergar/addon-wave-sample/releases
[releases-shield]: https://img.shields.io/github/release/vicfergar/addon-evergine-sample.svg
[releases]: https://github.com/vicfergar/addon-evergine-sample/releases
[repository]: https://github.com/hassio-addons/repository
17 changes: 8 additions & 9 deletions wave-sample/DOCS.md → evergine-sample/DOCS.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# Home Assistant Community Add-on: Wave Engine Sample
# Home Assistant Community Add-on: Floorplan 3D

This add-on is sample that hosts a WebGL2 sample application made with Wave Engine 3.0 Preview.
This add-on is a sample that hosts a WebGL sample application made with [Evergine](https://evergine.com/).

It is designed to be used as a startup structure for Add-ons based on [Wave Engine](https://waveengine.net/).
It is designed to be used as a startup structure for Add-ons based on [Evergine](https://evergine.com/).

## Configuration

Expand All @@ -15,7 +15,6 @@ log_level: info
ssl: false
certfile: fullchain.pem
keyfile: privkey.pem

```

**Note**: _This is just an example, don't copy and past it! Create your own!_
Expand All @@ -30,7 +29,7 @@ dealing with an unknown issue. Possible values are:
- `debug`: Shows detailed debug information.
- `info`: Normal (usually) interesting events.
- `warning`: Exceptional occurrences that are not errors.
- `error`: Runtime errors that do not require immediate action.
- `error`: Runtime errors that do not require immediate action.
- `fatal`: Something went terribly wrong. Add-on becomes unusable.

Please note that each level automatically includes log messages from a
Expand Down Expand Up @@ -69,7 +68,7 @@ check [the contributor's page][contributors].

MIT License

Copyright (c) 2020 Victor Ferrer
Copyright (c) 2021 Victor Ferrer

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand All @@ -89,7 +88,7 @@ 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.

[contributors]: https://github.com/vicfergar/addon-wave-sample/graphs/contributors
[contributors]: https://github.com/vicfergar/addon-evergine-sample/graphs/contributors
[vicfergar]: https://github.com/vicfergar
[issue]: https://github.com/vicfergar/addon-wave-sample/issues
[releases]: https://github.com/vicfergar/addon-wave-sample/releases
[issue]: https://github.com/vicfergar/addon-evergine-sample/issues
[releases]: https://github.com/vicfergar/addon-evergine-sample/releases
43 changes: 43 additions & 0 deletions evergine-sample/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
ARG BUILD_FROM=ghcr.io/hassio-addons/base/amd64:10.2.3
# hadolint ignore=DL3006
FROM ${BUILD_FROM}

# Set shell
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# Setup base
# hadolint ignore=DL3003
RUN \
apk add --no-cache \
nginx=1.20.2-r0

# Copy root filesystem
COPY rootfs /

# Build arguments
ARG BUILD_ARCH
ARG BUILD_DATE
ARG BUILD_DESCRIPTION
ARG BUILD_NAME
ARG BUILD_REF
ARG BUILD_REPOSITORY
ARG BUILD_VERSION

# Labels
LABEL \
io.hass.name="${BUILD_NAME}" \
io.hass.description="${BUILD_DESCRIPTION}" \
io.hass.arch="${BUILD_ARCH}" \
io.hass.type="addon" \
io.hass.version=${BUILD_VERSION} \
maintainer="Victor Ferrer <[email protected]>" \
org.opencontainers.image.title="${BUILD_NAME}" \
org.opencontainers.image.description="${BUILD_DESCRIPTION}" \
org.opencontainers.image.vendor="Home Assistant Community Add-ons" \
org.opencontainers.image.authors="Victor Ferrer <[email protected]>" \
org.opencontainers.image.licenses="MIT" \
org.opencontainers.image.source="https://github.com/${BUILD_REPOSITORY}" \
org.opencontainers.image.documentation="https://github.com/${BUILD_REPOSITORY}/blob/main/README.md" \
org.opencontainers.image.created=${BUILD_DATE} \
org.opencontainers.image.revision=${BUILD_REF} \
org.opencontainers.image.version=${BUILD_VERSION}
7 changes: 7 additions & 0 deletions evergine-sample/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
build_from:
aarch64: ghcr.io/hassio-addons/base/aarch64:10.2.3
amd64: ghcr.io/hassio-addons/base/amd64:10.2.3
armhf: ghcr.io/hassio-addons/base/armhf:10.2.3
armv7: ghcr.io/hassio-addons/base/armv7:10.2.3
i386: ghcr.io/hassio-addons/base/i386:10.2.3
36 changes: 36 additions & 0 deletions evergine-sample/config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
name: Evergine Sample
version: dev
slug: evergine_sample
description: Sample add-on that add-on that hosts a WASM WebGL wiewer made with Evergine
url: https://github.com/vicfergar/addon-evergine_sample
ingress: true
ingress_stream: true
panel_icon: mdi:floor-plan
init: false
homeassistant: 0.92.0b2
arch:
- aarch64
- amd64
- armhf
- armv7
- i386
ports:
80/tcp: null
ports_description:
80/tcp: Web interface (Not required for Ingress)
hassio_api: true
hassio_role: homeassistant
homeassistant_api: true
auth_api: true
map:
- ssl
options:
ssl: true
certfile: fullchain.pem
keyfile: privkey.pem
schema:
log_level: list(trace|debug|info|notice|warning|error|fatal)?
ssl: bool
certfile: str
keyfile: str
Binary file added evergine-sample/icon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added evergine-sample/logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
26 changes: 26 additions & 0 deletions evergine-sample/rootfs/etc/cont-init.d/nginx.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/usr/bin/with-contenv bashio
# ==============================================================================
# Home Assistant Community Add-on: Evergine Sample
# Configures NGINX
# ==============================================================================

# Generate Ingress configuration
bashio::var.json \
interface "$(bashio::addon.ip_address)" \
port "$(bashio::addon.ingress_port)" \
| tempio \
-template /etc/nginx/templates/ingress.gtpl \
-out /etc/nginx/servers/ingress.conf

# Generate direct access configuration, if enabled.
if bashio::var.has_value "$(bashio::addon.port 80)"; then
bashio::config.require.ssl
bashio::var.json \
certfile "$(bashio::config 'certfile')" \
keyfile "$(bashio::config 'keyfile')" \
port "^$(bashio::addon.port 80)" \
ssl "^$(bashio::config 'ssl')" \
| tempio \
-template /etc/nginx/templates/direct.gtpl \
-out /etc/nginx/servers/direct.conf
fi
8 changes: 8 additions & 0 deletions evergine-sample/rootfs/etc/nginx/includes/ssl_params.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
ssl_protocols TLSv1.2 TLSv1.3;
ssl_prefer_server_ciphers off;
ssl_ciphers ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:DHE-RSA-AES128-GCM-SHA256:DHE-RSA-AES256-GCM-SHA384;
ssl_session_timeout 10m;
ssl_session_cache shared:SSL:10m;
ssl_session_tickets off;
ssl_stapling on;
ssl_stapling_verify on;
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,6 @@ pcre_jit on;
# Write error log to the add-on log.
error_log /proc/1/fd/1 error;

# Load allowed environment vars
env SUPERVISOR_TOKEN;
env DISABLE_HA_AUTHENTICATION;

# Load dynamic modules.
include /etc/nginx/modules/*.conf;

# Max num of simultaneous connections by a worker process.
events {
worker_connections 512;
Expand All @@ -31,17 +24,11 @@ events {
http {
include /etc/nginx/includes/mime.types;

log_format homeassistant '[$time_local] $status '
'$http_x_forwarded_for($remote_addr) '
'$request ($http_user_agent)';

access_log /proc/1/fd/1 homeassistant;
access_log off;
client_max_body_size 4G;
default_type application/octet-stream;
gzip on;
keepalive_timeout 65;
lua_load_resty_core off;
lua_shared_dict auths 16k;
sendfile on;
server_tokens off;
tcp_nodelay on;
Expand All @@ -52,8 +39,6 @@ http {
'' close;
}

include /etc/nginx/includes/resolver.conf;
include /etc/nginx/includes/upstream.conf;

include /etc/nginx/servers/*.conf;
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
types {
application/wasm wasm;
}

server {
server_name hassio.local;
listen 7080 default_server;
Expand Down
Loading

0 comments on commit 6cb0efe

Please sign in to comment.