GithubHelp home page GithubHelp logo

resoai / tileboard Goto Github PK

View Code? Open in Web Editor NEW
1.6K 1.6K 279.0 13.22 MB

A simple yet highly configurable Dashboard for HomeAssistant

License: MIT License

JavaScript 55.98% HTML 13.02% Less 24.74% EJS 6.08% Shell 0.05% Dockerfile 0.14%

tileboard's People

Contributors

airthusiast avatar akloeckner avatar alexarch21 avatar alphasixtyfive avatar bjw-s avatar brmo avatar cgarwood avatar danhounshell avatar dependabot[bot] avatar evgeny- avatar foosel avatar frankwah avatar gerard33 avatar inxaos avatar jeroenterheerdt avatar jiayuandeng avatar mariuszluciow avatar mathijsmeulendijks avatar mikyjazz avatar mouth4war avatar mpopti0n avatar mrsbh avatar rchl avatar refineryx avatar renovate[bot] avatar rogersmj avatar rosskyl avatar sbrandsborg avatar sgoudsme avatar timota 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  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  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  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  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

tileboard's Issues

MDI toggle icons don't display properly

I have the following config:

{
                     position: [1, 1],
                     width: 1,
                     title: 'Guests',
                     classes: [CLASS_BIG],
                     type: TYPES.INPUT_BOOLEAN,
                     id: 'input_boolean.guests',
                     icons: {
                        on: 'mdi-toggle-switch',
                        off: 'mdi-toggle-switch-off-outline'
                     },
                     states: {
                        on: "On",
                        off: "Off"
                     }
                  }

This is how the tile renders for on, which isn't quite right:
image

And off it doesn't show anything:
image

The correct markup is in the html, but it just doesn't show the icon:
image

Camera will not show fullscreen

Here is the issue you asked me to create.

and part of my config that contains the cameras.

pages: [
      {
         title: 'Main page',
         bg: 'images/bg1.jpeg',
         icon: 'mdi-home-outline', // home icon
         head: 'head.html', // clock
         groups: [
            {
               title: '',
               width: 2,
               height: 3,
               items: [
                  {
					 position: [4, 0],
					 id: 'camera.koket',
					 type: TYPES.CAMERA_THUMBNAIL,
					 bgSize: 'cover',
					 width: 2,
					 state: false,
					 fullscreen: {
					 type: TYPES.CAMERA,
					 refresh: 1500, // can be number in milliseconds
					 bgSize: 'contain'
					 },
					 refresh: function () { // can also be a function
					 return 3000 + Math.random() * 1000
					 }
				  },
				  {
					 position: [2, 0],
					 id: 'camera.clara',
					 type: TYPES.CAMERA_THUMBNAIL,
					 bgSize: 'cover',
					 width: 2,
					 state: false,
					 fullscreen: {
					 type: TYPES.CAMERA,
					 refresh: 1500, // can be number in milliseconds
					 bgSize: 'contain'
					 },
					 refresh: function () { // can also be a function
					 return 3000 + Math.random() * 1000
					 }
				 }

               ]
            },

           

Input_Number not following changes in other interfaces

When I move the slider in TileBoard, the new setting is reflected in Home Assistant dashboard (value and slider position), but when the silder is moved in Home Assistant, only the value is changed in TileBoard, the slider stays the same.
It can be a configuration problem or is it a bug?

Feature_request: color customization

Would be nice to be able to assign text/icon color for specific tiles/entities. For example my Sonos media_players use albumpictures as background and when its a light background the controls are hard to see.

Feature_request: Define Unit_of_Measurement for sensor

Trying to implement my SNMP bandwith montoring sensors but cant figure out how to customize my code to get it to work. Would be nice to be able to define this for sensors

https://www.home-assistant.io/components/sensor.snmp/

{
   position: [7, 2],
   width: 2,
   height: 1,
   title: '',
   id: {}, // since we are binding each list item to different sensor, so we simply use an empty object
   type: TYPES.TEXT_LIST,
   state: false,
   list: [
      {
         title: 'Internet Speed IN',
         icon: 'mdi-speedometer',
         value: '&sensor.internet_speed_in.state'
      },
	  {
         title: 'Internet Speed OUT',
         icon: 'mdi-speedometer',
         value: '&sensor.internet_speed_out.state'
      },
	  {
         title: 'WAN Download Average',
		 icon: 'mdi-download',
         value: '&sensor.wan_traffic_in_mean.attributes.unit_of_measurement',
	  },
	  {
         title: 'WAN Upload Average',
         icon: 'mdi-upload',
         value: '&sensor.wan_traffic_out_mean.state'
      },
      ]
},

console
unit_of_measurements
unit_of_measurements_ha

Equivalent for sub_entity?

I use it for a sensor, but maybe it can be applied to other widgets types.
Is there a similar function?

Map slideshow zoom levels

Another enhancement request from me :)
The zoom levels on maps are not very useful for my family, especially zoom level 9. I would be good if it could be configured. Also the first blank/grey view in the slideshow should be removable.

screenshot_2018-06-28-17-40-11

Feature Request: Tile opacity and 'group' backgrounds

Feature Request:

Consider allowing each tile background image to have an opacity set within the config.js

Consider allowing a background image to be defined in config.js for each group and for that too to have an optional opacity value.

XML Parsing Error: not well-formed in tile.html

I'm seeing this error on the console with the demo TileBoard

XML Parsing Error: not well-formed
Location: file:///C:/Users/zzz/Documents/Dev/TileBoard/tile.html
Line Number 45, Column 46:

It appears to be pointing to this line:

      <div ng-if="!hasTrackerCoords(entity) && entity.attributes.entity_picture"
           class="item-background" ng-style="trackerBg(entity)"></div>

Cross origin errors: failed to load head and tile

I'm trying to run TileBoard locally on my Mac, just by opening up index.html in my browser (as suggested in the Community thread) and have it talk to Hass.io running on a RPi. It is receiving events from HA just fine.

However, it's throwing errors about cross-origin requests and I don't get anything showing on my board:

image

I'm guessing this is because it's being run from a file:// protocol. If that's going to be a problem, the project should maybe be bundled with a really simple web server?

Node/npm project

I would like to suggest making this into a simple node/npm project. The benefits would be:

  • built-in web server that can be started easily (with npm start command for example)
  • possibility to not expose a configuration/password to the world
  • optional auto-reloading of tileBoard on configuration change
  • ...

It would complicate the code some as outgoing requests and incoming events would need to go through the TileBoard backend and then be passed to the client (or vice versa).

Possibly compatibility with just running html file from local drive could be kept but it would probably complicate things. And it's not really proper way to run it (triggers warnings and does not support get connecting to HA instance on the web).

State

New state attribute is not working if I define the states mapping.
I think the previous behavior was better.

RTL

I managed to align right a question, how do I change the position of the table (where my photos and my wife it will be on the right)

https://imgur.com/a/cvtgYxx

Feature Request: Widget Background Colors

It would be great to be able to define background colors for widgets with a function or state map. For example, if a door sensor is on or open have a red background, as opposed to a green background if it is off or closed

Likewise, being able to simply set background colors for different entities would be useful, for example, color coding light widgets based on room or type

TypeError: Cannot read property '_c' of undefined

I'm seeing one of these errors for each state change that comes by:

TypeError: Cannot read property '_c' of undefined
    at b.MainController.$scope.getSliderConf (main-controller.js:474)
    at fn (eval at compile (angular.min.js:241), <anonymous>:4:393)
    at m.$digest (angular.min.js:147)
    at updateView (main-controller.js:1298)
    at handleEvent (main-controller.js:1282)
    at handleMessage (main-controller.js:1270)
    at main-controller.js:1171
    at api.js:138

head / clock font size and margins

On an Amazon Fire HD8 tablet, the clock in the header is much too large for the screen. It also runs into the tiles. Removing the header by commenting out the head parameter in config.js works fine, however I was wondering if there are less drastic options. Could the font size and margin for the clock be configurable in config.js (similar to the groupMarginCss option)?

Feature_request: meta CSS settings for mobile devices

Would be really nice if it was possible to get some sample configuration for mobile devices.

Its way to zoomed in by default and menu icons lapse over tiles when scrolling.

Im not a CSS genius but to have meta site locked to for example 70% zoom would really help.

Cheers

Cover arrows are not representing state

The down/up arrow are still highlighted when cover is closed/open - that isn’t the case for a standard cover on HA which disables and dims the down/up arrows.

Feature Request: Support for fans

Add support for turning fans on/off and setting speed. Perhaps tapping the tile can toggle it on/off and holding on the tile can bring up a list to select the speed? Most (possibly all?) fan. entities have a defined list of speeds, it can't be set to an arbitrary number or % so I don't think a slider would work.

Here's a state/attribute dump from one of my fans:

state: on
speed_list: auto,lowest,low,medium,high
model_name: Ceiling Fan
supported_features: 5
friendly_name: Living Room Fan
device_manufacturer: home_decorators
manufacturer_device_model: home_decorators_home_decorators_fan
speed: low

Feature Request: Custom Events for Audio and Notifications

Another feature I hacked into my HADasboard setup...

Listen for a custom event on the Home Assistant event bus and play and audio file with an optional toast notification or modal popup.

I've used this feature to play a chime when a door opens or closes, as well as playing an alert tone if certain weather alerts are issued or a smoke/co detector goes off. A door chime could pop up a toast notification with which door was opened or closed, and something like a smoke alarm activation could pop up a larger modal dialog with more information.

Support for "range" style thermostats in auto mode

I have an ecobee 3 thermostat, and the current Climate tile doesn't work with it because the "temperature" attribute on the ecobee in HA is null if the thermostat is in Auto mode (more info here):

image

I am working on a solution for displaying the range of temps; I altered the climateTarget function to do this:

   $scope.climateTarget = function (item, entity) {
      var value = entity.attributes.temperature;

      if(value == null) {
        //This is a thermostat that has high/low target temps
        value = entity.attributes.target_temp_low + " - " + entity.attributes.target_temp_high;
      }

      if(item.filter) return item.filter(value);

      return value;
   };

Which works fine. The problem is handling the temperature adjustment. In Home Assistant it looks like this:

image

I don't think cramming two "+/-" button sets onto a single tile is a good idea. Too many opportunities for accidental taps. Interested in everyone's ideas on how to handle this...perhaps a popup with the adjustment buttons?

Issues with entity_picture and light background

Having an issue where my entity_pictures for device_tracker wont show.. maps shows just fine

also when i add a light i only see "title", no device shows, and log shows no errors.

no icon light and no entity_picture

Here is for example one of my device_trackers
ha

{
					 position: [2, 0],
					 type: TYPES.DEVICE_TRACKER,
					 id: 'device_tracker.micaela',
					 map: 'google',
					 states: {
					 home: "Home",
					 not_home: "Away",
					 },
					 slidesDelay: 2
				  },
				  {
					 position: [3, 0],
					 type: TYPES.DEVICE_TRACKER,
					 id: 'device_tracker.cjas_iphone_7',
					 map: 'google',
					 states: {
					 home: "Home",
					 not_home: "Away",
					 },
					 slidesDelay: 2
				  },

and here is the light config.

{
					 position: [2, 1],
					 title: 'Library',
					 subtitle: 'Lounge',
					 id: 'light.library',
					 type: TYPES.LIGHT,
					 states: {
						on: "On",
						off: "Off"
					 },
					 icons: {
						on: "mdi-lightbulb-on",
						off: "mdi-lightbulb"
					 },
					 sliders: [
					 {
					 title: 'Brightness',
					 field: 'brightness',
					 max: 255,
					 min: 0,
					 step: 5,
					 request: {
					 type: "call_service",
					 domain: "light",
					 service: "turn_on",
					 field: "brightness"
					 }
					},
					 {
					 title: 'Color temp',
					 field: 'color_temp',
					 max: 588,
					 min: 153,
					 step: 15,
					 request: {
					 type: "call_service",
					 domain: "light",
					 service: "turn_on",
					 field: "color_temp"
         }
      },

Cheers

size iPad

What is the size of the iPad?

I need to adjust the information to the iPad, you can direct me how to change the scale

Feature Request: RGB Slider or Wheel for lights

Hi Im not sure if this is possible already or not but having a slider or wheel to set the color of lights is about the only thing I am missing on this dashboard. Thanks for all the work you have put into this!

Feature Request: lock

I have an August lock. Could you add support for entity types of lock?

The two states are locked and unlocked. Let me know if there is any other information that would be useful. Once there is support for locks and covers (garage doors), then my whole house can be represented with this awesome dashboard! Can't wait!

image

Feature Request: Screensaver

Add a screensaver option. After x seconds of inactivity, switch to essentially a digital picture frame with a clock and possibly weather overlay. Tapping on the screen would take you back to either the main dashboard or the previous dashboard.

I hacked this in to my HADashboard install and it looked like this:
img_2923

Feed it a JSON list of pictures and it will loop through them every 5s or so. I did end up adding a full-screen weather slide at the beginning of the loop as well (that hides the big clock overlay) that includes the current weather conditions and forecast for the next couple days. I had issues with image retention on the Kindle Fire 8" screens where you'd see a faint outline of the clock. Adding the full-screen weather slide that hid the clock helped quite a bit with that.

I'm willing to share code or help program it in, but I've never worked with Angular before, so that will be a bit of a learning curve.

Feature request: functions for list values

I want to be able to render other text in the list for sensors that have "on/off" state. For example:

{
                           title: 'Garage (1)',
                           icon: 'mdi-garage',
                           value: function() {
                             var val='&binary_sensor.garage_single_bay.state';
                             if(val=="On") {
                               return "Open";
                             } else {
                               return "Closed";
                             }
                           }
                        }

This doesn't seem to work right now, it just tries to render the function as a string:

image

Having this would be a very powerful addition to lists.

TEXT_LIST and unit_of_measurement

When setting up a text_list that includes sensors, there's no way to include the unit_of_measurement as part of the value:

edit: #55 could be a solution for this

Feature Request: Javascript Tile

A standard tile like a light, script, switch, etc tile, but when tapped fires a custom defined Javascript function.

I would use this in combination with Fully Kiosk Browser to launch other apps, such as Netflix or Plex, from my dashboard, or to add a button to turn on/off the tablet's motion detection or screen.

Google Maps API key

using google maps for locator does not work. Every request fails with http 403 (forbidden).

The detailed message (from developer tools) is: "The Google Maps Platform server rejected your request. You must use an API key to authenticate each request to Google Maps Platform APIs. For additional information, please refer to http://g.co/dev/maps-no-account"

So bottom line, there has to be a place where a user can add an API key in config.js

Customized state not added as css class

I have the following on my climate device:

{
  position: [0, 0],
  width: 2,
  type: TYPES.CLIMATE,
  id: "climate.hallway",
  title: 'Thermostat',
  state: function () {
    return this.states['sensor.hallway_thermostat_hvac_state'].state;
  }
},

The actual state of climate.hallway is cool, the state of this.states['sensor.hallway_thermostat_hvac_state'].state is cooling

The generated HTML tag contains the state of climate.hallway, but not the state generated by the state: function() {} statement.

<div ng-style="itemStyles(item, entity)" class="item ng-scope -climate -cool -th-climate" ng-click="entityClick(page, item, entity)" on-long-press="entityLongClick($event, page, item, entity)" ng-if="entity = getItemEntity(item)" ng-class="itemClasses(item)" style="width: 286px; height: 140px; left: 0px; top: 0px;">

Scene type tile not showing

Im having trouble setting up a scene tile. I have a scene titled Movie_Night in home assistant and added the following to config.js
{
position:[0,1],
id: 'scene.Movie_Night',
type: TYPES.SCENE,
state: false,
icon: 'mdi-movie-roll',
},
however when I load the dashboard no tile shows up. Any ideas?

Feature Request: Turn_on_action for media_players

For my TV i use a command called Turn_on_action which basicly launches a WOL script i wrote.

Can this field be implemented into a media_player as optional?

turn_on_action:
  service: switch.turn_on
  data:
    entity_id: switch.LGTV

Cheers

RTL

Is it possible to add code to rtl?

Placeholder page for unavailable media_players

One of my mediaplayers is configured like this:

        {
          position: [0, 0],
          width: 2,
          id: 'media_player.kodi_bedroom',
          type: TYPES.MEDIA_PLAYER,
          state: '@attributes.media_title',
          bgSuffix: '@attributes.entity_picture', // show picture of current media as a background
          bgOpacity: 0.5,
        },

This works, however, if it is offline it shows a transparant tile and the title is set to @attributes.media_title since there is none.
It would be nicer if we could have configure some kind of placeholder instead (like HA webinterface has)

sensors.js missing

According to index.html it's used in development, but it's not included in the git repo.

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.