Giter Site home page Giter Site logo

tileboard-addon's People

Contributors

akloeckner avatar ivanivanov884 avatar n3rdix avatar rchl avatar renovate[bot] avatar romkabouter avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

tileboard-addon's Issues

History

Since CORS bug is not being fixed by anyone at HA, perhaps we could use proxy_pass in the add-on to fix history popups?

Can't access Tilboard outside Hassio

Description

Trying to access TileBoard from outside of Hassio shows a blank screen and the following error in the console:

DOMException: An invalid or illegal string was specified Possibly unhandled rejection: {}

This error seems to be an issue with the web sockets failing to connect. Debugging the code it appears that the window.WS_URL_OVERRIDE is set to null/api/websocket and will ignore any wsUrl value provided in the config file.

Steps to Reproduce

  1. Install the TileBoard Addon
  2. In the Configuration section, under Network add a valid port
  3. Access the TileBoard using <hassio-ip-or-url>:<port-from-step-3>

Notes

When looking at the page source it seems there is a line in the index.html file that is setting the url override: window.WS_URL_OVERRIDE = "null/api/websocket"; but looking at the TileBoard source this should be window.WS_URL_OVERRIDE = null;. If I put a breakpoint in the JS and change the override URL to null the page loads correctly.

Searching through this repository there is the direct.gtpl file that seems like it's supposed to handle the direct connection to TileBoard (as opposed to the ingress connection). In this file there is this chunk of code which seems like the culprit:

{{ if .websocket_url }}
    sub_filter 'WS_URL_OVERRIDE = null' 'WS_URL_OVERRIDE = "{{ .websocket_url }}/api/websocket"';
{{ end }}

But it seems like this shouldn't be executing as I haven't set .websocket_url as far as I know.

Environment

Below are my settings and the config I'm trying to get loading on my device.

config.js

var CONFIG = {
    serverUrl: "http://homeassistant.local:8123",
    wsUrl: 'ws://homeassistant.local:8123/api/websocket',
    authToken: "nOtMyReAlToKeN",
    pages: [
        {
            title: 'Home Page',
            icon: 'mdi-home-outline',
            header: DEFAULT_HEADER,
            groups: [
                {
                    title: 'Test Group',
                    items: [
                        
                    ]
                }
            ]
        }
    ]
}

Addon Settings

image

Loading History-Graph fails

Hi!

as switching to the AddOn, I do get the following errors on my history-graph-tiles:

[Error] Preflight response is not successful [Error] XMLHttpRequest cannot load https://xxxx.ui.nabu.casa/api/history/period/2x021-09-02T19:15:20.359Z?end_time=2021-09-09T19:15:20.359Z&filter_entity_id=sensor.bl_berlin_weekincidence due to access control checks. [Error] Failed to load resource: Preflight response is not successful (2021-09-02T19:15:20.359Z, line 0)

any Idea, why tailboard tries to load the data over nabucasa and not locally?
thanks in advance,
Michael

edit: I'm not using ingress, but a configured port for using it with my old android tablets!

question about tile-board.sh (changing language)

Hi there,

In https://github.com/resoai/TileBoard-addon/blob/main/addon/rootfs/etc/cont-init.d/tile-board.sh is a loop:

for f in /config/$CONFIG_FOLDER/*;
do

This symlinks all files in the $CONFIG_FOLDER (default 'tileboard') to tileboard like this:
ln -s /config/$CONFIG_FOLDER/$FILENAME /var/www/tileboard/$FILENAME

Is there a reason for this? Because this does not work if you want a different locale.
The locale file should be in locales folder, but if you add a angular-locale_xx-xx.js files in it does not matter where you put it.
It always ends up in /var/www/tileboard/$FILENAME, but the locale file should be in /var/www/tileboard/locales/$FILENAME

Changing the language is therefore not possible in the add-on.

Addon Out Of Date

Looking at the main repository it seems like the addon is quite out of date. Is this intentional for some breaking reason or has there just not been enough time to update the addon to the newest version?

Custom.css file not copied during startup

During startup I got this error:

[20:37:26] INFO: Symlink files to dist folder
rm: can't remove '/var/tileboard/styles/custom.css': No such file or directory
[cont-init.d] tile-board.sh: exited 1.

Curl not found

Hi, I get this error (curl not found) at startup...
On Raspberry pi4 with raspbian 32 bit
Homeassistant Version core-2021.2.3
Hassio Version supervisor-2021.02.6

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing...
/usr/lib/bashio/api.sh: line 47: curl: command not found
[00:18:08] ERROR: Something went wrong contacting the API
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing...
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] nginx.sh: executing...
[cont-init.d] nginx.sh: exited 0.
[cont-init.d] tile-board.sh: executing...
[00:18:10] INFO: Symlink files to dist folder
[cont-init.d] tile-board.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[00:18:10] INFO: Starting NGinx server...

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Warning

These dependencies are deprecated:

Datasource Name Replacement PR?
npm standard-version Available

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

dockerfile
.devcontainer/Dockerfile
addon/Dockerfile
github-actions
.github/workflows/on_push.yaml
  • actions/checkout v3
  • docker/login-action v2
.github/workflows/on_tag.yaml
  • actions/checkout v3
  • docker/login-action v2
.github/workflows/on_tileboard_release.yaml
  • actions/checkout v3
  • actions/setup-node v3
npm
package.json
  • standard-version ^9.1.0

  • Check this box to trigger a request for Renovate to run again on this repository

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.