TileBoard - New dashboard for Homeassistant

What do you see in the log?

@diggerdanh Thanks for that, it gets me closer. For me, the “opacity: 0.8” and “grayscale filter” values are always applied no matter what my device_tracker status is in HA.

E.g., when I copy your code (but change the id value to my phone tracker and remove the map value), if my phone is in the ‘Home’ state and I load my Tileboard page, my entity picture is grayed out and at 0.8 opacity.

If I go from ‘Home’ to ‘Away’, my picture is still grayed out, and if I go from ‘Away’ back to ‘Home’, it still stays grayed out. Seems like Tileboard always grabs the first settings it finds and ignores the if statement. Weird.

I tried swapping the if/else conditions; similar effect as above except now my entity picture is always opacity 1 and no grayscale for both ‘Home’ and ‘Away’ states:

position: [0, 0],
type: TYPES.DEVICE_TRACKER,
id: 'device_tracker.myphone',
states: {
    home: "Home",
    not_home: "Away",
},
bgSuffix: '@attributes.entity_picture',
slidesDelay: 2,
zoomLevels: [ 9 ],
customStyles: function (item, entity) {
    if (entity.state !== 'Away') {
        return {
            'opacity': 1,
            'filter': '',
        };
    }
    else {
        return {
            'opacity': 0.8,
            'filter': 'grayscale()',
        };
    }
}

Should the opacity change every time my phone’s state in HA goes from Home to Away, or are the values set only when the page is first loaded?

1 Like

obviously entitySize is already set to ENTITY_SIZES.SMALL,

but despite being the smallest option, everything is still too large.

other question about this topic. is there a way to get state info into the text_list type?
i tried value: '&states.switch.sproeier_1.last_changed'

You can use custom.css to change font and other size of the elements for your specific resolution.

attributes?

Hi,

Thanks for the nice dashboard on this. Pretty cool!

Just curious, is this dashboard is mobile friendly, as the phone size is much smaller than this?

Thanks.

It works on any phone with a browser, I use it on a Samsung Note and it works great, you just need to have less tiles on the screen at once

1 Like

thats did the trick. thank you

I have two folders under www, 1 called tileboard which I use for tablets and 1 called tilemobile for my mobile phones, different config.js for the different layouts, just change the url to hit the one you want
Works a treat

2 Likes

Some tips here on making the configuration more mobile-friendly.

2 Likes

Thanks for sharing!

Thanks for the link!

that should be ‘not_home’ or ‘home’ for you, or whatever state it is that your HA device tracker uses.

1 Like

This is the code that is working great for me.

states: {
                    home: "Home",
                    not_home: "Away",
                },
                zoomLevels: [],
                bgSuffix: '@attributes.entity_picture',
                hideEntityPicture: false, //hide entity pic, if you need only map
                slidesDelay: 2,
                customStyles: function (item, entity) {
                    if (entity.state !== 'home') {
                        return {
                            'opacity': 0.8,
                            'filter': 'grayscale()',
                        };
                    } else {
                        return {
                            'opacity': 1,
                            'filter': '',
                        };
                    }
                }

Ah, so it’s the state from HA that counts, not the mapping in the states{} block for device tracker tiles. That fixed it! Thanks for the help!

Strange issue.

On a 3rd Gen iPad, I have a saved bookmark to my TileBoard on the home screen. If I use an iframe it makes it full screen, no matter what size tile I have set. This is a problem especially with motion eye, since it removed all TileBoard items. If I use it for another website it still goes full screen inside all the headers. Anyone know how to prevent the iframe from going full screen? If it helps, here is my code. I tried with motion eye, then I tried with a different site.

// motioneye \\
//                {
//                    position: [0, 0],
//                    type: TYPES.IFRAME,
//                    id: {},
//                    width: 4,
//                    height: 3,
//                    refresh: '',
//                    url: 'https://10.191.30.52:8765'
//                }
// Here comes the bus! \\
              {
                  position: [0, 0],
                  type: TYPES.IFRAME,
                  id: {},
                  width: 4,
                  height: 3,
                  refresh: '',
                  url: 'https://login.herecomesthebus.com/Map.aspx',
              }
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('tileboard', '{"command": "open_doorentry"}', 'LOCAL', '2019-04-09 23:36:07.920703', '2019-04-09 23:36:08.020939', '100555d286fe403db2fcb9a17f749377', 'b90c729bd770473bb016205ea3c38611')]
(Background on this error at: http://sqlalche.me/e/4xp6)
2019-04-09 23:36:08 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('state_changed', '{"entity_id": "script.1554852687446", "old_state": {"entity_id": "script.1554852687446", "state": "off", "attributes": {"last_triggered": "2019-04-09 ... (525 characters truncated) ... -09T23:36:07.922903+00:00", "context": {"id": "100555d286fe403db2fcb9a17f749377", "parent_id": null, "user_id": "b90c729bd770473bb016205ea3c38611"}}}', 'LOCAL', '2019-04-09 23:36:07.923065', '2019-04-09 23:36:08.045877', '100555d286fe403db2fcb9a17f749377', 'b90c729bd770473bb016205ea3c38611')]
(Background on this error at: http://sqlalche.me/e/4xp6)
2019-04-09 23:36:08 ERROR (Recorder) [homeassistant.components.recorder] Error saving event: <Event state_changed[L]: entity_id=script.1554852687446, old_state=<state script.1554852687446=off; last_triggered=2019-04-09T23:32:03.740940+00:00, friendly_name=open_door @ 2019-04-09T23:31:27.991352+00:00>, new_state=<state script.1554852687446=off; last_triggered=2019-04-09T23:36:07.914257+00:00, friendly_name=open_door @ 2019-04-09T23:31:27.991352+00:00>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/recorder/__init__.py", line 298, in run
    session.flush()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2451, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2589, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2549, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
    uow,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
    insert,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1120, in _emit_insert_statements
    statement, params
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
    distilled_params,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('state_changed', '{"entity_id": "script.1554852687446", "old_state": {"entity_id": "script.1554852687446", "state": "off", "attributes": {"last_triggered": "2019-04-09 ... (525 characters truncated) ... -09T23:36:07.922903+00:00", "context": {"id": "100555d286fe403db2fcb9a17f749377", "parent_id": null, "user_id": "b90c729bd770473bb016205ea3c38611"}}}', 'LOCAL', '2019-04-09 23:36:07.923065', '2019-04-09 23:36:08.045877', '100555d286fe403db2fcb9a17f749377', 'b90c729bd770473bb016205ea3c38611')]
(Background on this error at: http://sqlalche.me/e/4xp6)
2019-04-09 23:36:30 ERROR (Recorder) [homeassistant.components.recorder.util] Error executing query: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('state_changed', '{"entity_id": "sun.sun", "old_state": {"entity_id": "sun.sun", "state": "below_horizon", "attributes": {"next_dawn": "2019-04-10T05:21:52+00:00", "ne ... (960 characters truncated) ... :00", "last_updated": "2019-04-09T23:36:30.008441+00:00", "context": {"id": "ac637ba079a4441fa1a97efa5b891b81", "parent_id": null, "user_id": null}}}', 'LOCAL', '2019-04-09 23:36:30.008599', '2019-04-09 23:36:30.022640', 'ac637ba079a4441fa1a97efa5b891b81', None)]
(Background on this error at: http://sqlalche.me/e/4xp6)
2019-04-09 23:36:30 ERROR (Recorder) [homeassistant.components.recorder] Error saving event: <Event state_changed[L]: entity_id=sun.sun, old_state=<state sun.sun=below_horizon; next_dawn=2019-04-10T05:21:52+00:00, next_dusk=2019-04-10T21:34:36+00:00, next_midnight=2019-04-10T01:28:05+00:00, next_noon=2019-04-10T13:28:14+00:00, next_rising=2019-04-10T06:14:43+00:00, next_setting=2019-04-10T20:41:45+00:00, elevation=-14.64, azimuth=331.16, friendly_name=Sun, hidden=True @ 2019-04-09T23:13:41.679429+00:00>, new_state=<state sun.sun=below_horizon; next_dawn=2019-04-10T05:21:52+00:00, next_dusk=2019-04-10T21:34:36+00:00, next_midnight=2019-04-10T01:28:05+00:00, next_noon=2019-04-10T13:28:14+00:00, next_rising=2019-04-10T06:14:43+00:00, next_setting=2019-04-10T20:41:45+00:00, elevation=-14.69, azimuth=331.41, friendly_name=Sun, hidden=True @ 2019-04-09T23:13:41.679429+00:00>>
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
sqlite3.DatabaseError: database disk image is malformed

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/homeassistant/components/recorder/__init__.py", line 298, in run
    session.flush()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2451, in flush
    self._flush(objects)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2589, in _flush
    transaction.rollback(_capture_exception=True)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/langhelpers.py", line 68, in __exit__
    compat.reraise(exc_type, exc_value, exc_tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 129, in reraise
    raise value
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/session.py", line 2549, in _flush
    flush_context.execute()
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 422, in execute
    rec.execute(self)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/unitofwork.py", line 589, in execute
    uow,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 245, in save_obj
    insert,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/orm/persistence.py", line 1120, in _emit_insert_statements
    statement, params
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 988, in execute
    return meth(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/sql/elements.py", line 287, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1107, in _execute_clauseelement
    distilled_params,
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1248, in _execute_context
    e, statement, parameters, cursor, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1466, in _handle_dbapi_exception
    util.raise_from_cause(sqlalchemy_exception, exc_info)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 383, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/util/compat.py", line 128, in reraise
    raise value.with_traceback(tb)
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/base.py", line 1244, in _execute_context
    cursor, statement, parameters, context
  File "/usr/local/lib/python3.7/site-packages/sqlalchemy/engine/default.py", line 552, in do_execute
    cursor.execute(statement, parameters)
sqlalchemy.exc.DatabaseError: (sqlite3.DatabaseError) database disk image is malformed
[SQL: INSERT INTO events (event_type, event_data, origin, time_fired, created, context_id, context_user_id) VALUES (?, ?, ?, ?, ?, ?, ?)]
[parameters: ('state_changed', '{"entity_id": "sun.sun", "old_state": {"entity_id": "sun.sun", "state": "below_horizon", "attributes": {"next_dawn": "2019-04-10T05:21:52+00:00", "ne ... (960 characters truncated) ... :00", "last_updated": "2019-04-09T23:36:30.008441+00:00", "context": {"id": "ac637ba079a4441fa1a97efa5b891b81", "parent_id": null, "user_id": null}}}', 'LOCAL', '2019-04-09 23:36:30.008599', '2019-04-09 23:36:30.022640', 'ac637ba079a4441fa1a97efa5b891b81', None)]
(Background on this error at: http://sqlalche.me/e/4xp6)

It is hard to read it all from a phone but that message is definitely not a good sign :slight_smile:

Can you share the working version?