Giter Club home page Giter Club logo

hadashboard's Introduction

Please note: This version of HADashboard is now deprecated. It will no longer be developed and there will be no further bugfixes. HADashboard has been completely re-written and is now part of AppDaemon. For further details see the HADashboard page on the Home Assistant Website.

For Reference, here is the old content. It should still work, but the new version is much more performant, has additional finctions and is being actively maintained. You have been warned!

Description

HADashboard is a dashboard for Home Assistant that is intended to be wall mounted, and is optimized for distance viewing.

UI

HADashboard was originally created by the excellent work of FlorianZ for use with the SmartThings Home Automation system, with notable contributions from the SmartThings Community. I would also like to acknowledge contributions made by zipriddy. This is my port of hadashboard to Home Assistant.

Full installation and configuration instructions are found here.

hadashboard's People

Contributors

acockburn avatar adgelbfish avatar chanders avatar gussyh avatar marijngiesen avatar mezz64 avatar rhooper avatar robbiet480 avatar rogersmj avatar snizzleorg 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

hadashboard's Issues

hapush issue with SSL

I posted on homeassistant forum but maybe I should post here..

My hapush.cfg:

ha_url = "https://192.168.1.111:8123"
ha_key = "api_key_goes_here"
dash_host = "192.168.1.111:3030"
dash_dir = "/home/pi/hadashboard/dashboards"
logfile = "/home/pi/hadashboard/hapush/hapush.log"

But I got this error when running hapush...

pi@raspberrypi:~/hadashboard/hapush $ ./hapush.py hapush.cfg
2017-01-15 22:45:30,385 INFO Reading dashboard: /home/pi/hadashboard/dashboards/example.erb
2017-01-15 22:45:30,392 INFO Reading dashboard: /home/pi/hadashboard/dashboards/main.erb
2017-01-15 22:45:30,546 CRITICAL Unexpected error:
2017-01-15 22:45:30,547 CRITICAL ------------------------------------------------------------
2017-01-15 22:45:30,556 CRITICAL Traceback (most recent call last):
  File "./hapush.py", line 264, in run
    messages = SSEClient(ha_url + "/api/stream", verify = False, headers = headers, retry = 3000)
  File "/usr/local/lib/python3.4/dist-packages/sseclient.py", line 38, in __init__
    self._connect()
  File "/usr/local/lib/python3.4/dist-packages/sseclient.py", line 46, in _connect
    self.resp = requester.get(self.url, stream=True, **self.requests_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 70, in get
    return request('get', url, params=params, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/api.py", line 56, in request
    return session.request(method=method, url=url, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 488, in request
    resp = self.send(prep, **send_kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/sessions.py", line 609, in send
    r = adapter.send(request, **kwargs)
  File "/usr/local/lib/python3.4/dist-packages/requests/adapters.py", line 423, in send
    timeout=timeout
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 594, in urlopen
    chunked=chunked)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 350, in _make_request
    self._validate_conn(conn)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connectionpool.py", line 835, in _validate_conn
    conn.connect()
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/connection.py", line 311, in connect
    cert_reqs=resolve_cert_reqs(self.cert_reqs),
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/util/ssl_.py", line 267, in create_urllib3_context
    context.set_ciphers(ciphers or DEFAULT_CIPHERS)
  File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/contrib/pyopenssl.py", line 385, in set_ciphers
    self._ctx.set_cipher_list(ciphers)
TypeError: must be str, not bytes

Max of 3 page navigation icons on additional pages

I am editing this issue as I fixed the problem I was having... it was a typing error on my part.

Thanks again for adding background colors for all tiles, now we just need sliders or up and down buttons for setting values like temperature on a thermostat and this will be a complete replacement for me! I see a dimmer widget that you are working on, so hopefully there can be something for setting temperature in a similar way.

Thanks again!!! Awesome job!!!

Hamode does not update properly

So my issue is that when changing an input_select, either via hadashboard or on the HA page, if i refresh the dashboard manually it will highlight the correct one, but not when changing the input from the dashboard (both will light up) or from the HA web page, (the previous one will stay lit and the other one will not light up)

Until a refresh of the web-page when the correct status icon will be lit.

Script section in HA config:

script:
  home_status_evening:
    alias: "evening status"
    sequence:
     - service: input_select.select_option
       data:
         entity_id: input_select.home_status
         option: "evening"
  home_status_night:
    alias: "night status"
    sequence:
     - service: input_select.select_option
       data:
         entity_id: input_select.home_status
         option: "night"

input_select section in HA config:

input_select:
  home_status:
    name: "home status"
    options:
      - evening
      - night
    initial: night

Snip from my .erb:

</li>
<li data-row="4" data-col="5" data-sizex="2" data-sizey="1">
  <div data-id="home_status_evening" data-view="Hamode" data-title="Kväll" data-icon="moon-o" data-changemode="evening" data-input="home_status"</$
</li>
<li data-row="4" data-col="7" data-sizex="2" data-sizey="1">
  <div data-id="home_status_night" data-view="Hamode" data-title="Natt" data-icon="star-o" data-changemode="night" data-input="home_status"</$
</li>

I should also pointout that all other changes are detected from HA like device-tracker. (both ways)

What i "feel" is weird, from the hapush.py when changing the input_select:

2017-01-22 21:48:49,721 INFO script.home_status_evening -> evening
and the same for switching to night
2017-01-22 21:48:49,721 INFO script.home_status_evening -> night

But should it not be script.home_status_night?

anyways, let me know if you need anything else!

Prevent tiles from being moved

Easy to fix.
Go into your assets/javascripts/application.coffee file
Where it says draggable you need to add this line items: "none"

draggable:
stop: Dashing.showGridsterInstructions
start: -> Dashing.currentWidgetPositions = Dashing.getWidgetPositions()
items: "none"

Add CSS to allow the whole widget to be targeted for 'active' and 'inactive' states

Idea: Update widgets so that their top-level containers will have 'active' or 'inactive' class, if applicable, so that custom CSS can be used to easily change the background color (or text color, or anything else inside it) of a widget depending on state.

For example, a user might want to have the option to have an entire tile light up red when a door is open, instead of just the icon changing color.

Need to think about the most extensible way to do this -- can it be done in a more DRY way than updating every widget's coffee file with CSS manipulation?

EDIT: I'm dropping this here because there's no "Projects" spot for this repo. Let me know if you have a preferred way of managing backlog ideas.

scheduler caught exception: undefined method `gsub' for nil:NilClass

Hi!
I get this error when starting dashing. Could you please help?

Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop

scheduler caught exception:
undefined method gsub' for nil:NilClass /home/pi/hadashboard/jobs/homeassistant.rb:234:inblock in <top (required)>'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in call' /var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:intrigger_block'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in block in trigger' /var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:incall'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'

Hagroup support dimming multiple light bulbs

Would it be possible to have the hagroup widget support the dimming of multiple lights at one time? In home assistant it is possible to dim multiple lights at the same time I wasn't sure if you could do that in this.

Docker error after install

Hi,

I've followed the instructions 3 times for the Raspberry PI docker install.

I can get dashing start to work and have it working outside of docker but this is the error I get when I try to start it after a fresh install and copy of the config files that worked:

pi@cm0front00:~/hadashboard$ docker start hadashboard
Error response from daemon: oci runtime error: container_linux.go:247: starting container process caused "process_linux.go:359: container init caused "rootfs_linux.go:54: mounting \"/home/pi/hadashboard/lib/ha_conf.rb\" to rootfs \"/var/lib/docker/overlay2/fe81bf20c7502a1425c1ef9a5a9c30365912384f75ddd5c931c72a5d67e1d16d/merged\" at \"/var/lib/docker/overlay2/fe81bf20c7502a1425c1ef9a5a9c30365912384f75ddd5c931c72a5d67e1d16d/merged/app/lib/ha_conf.rb\" caused \"not a directory\"""
: Are you trying to mount a directory onto a file (or vice-versa)? Check if the specified host path exists and is the expected type

Any ideas or suggestions?

Moving docs to home-assistant.io

Hi @acockburn,

We are about to add a new section to home-assistant.io titled "Ecosystem". It's a place where any external tools can share their documentation in an official and easy to reference capacity. I think that HADashboard would be a great fit. The PR to add this section should be merged tonight or tomorrow and docs can start being written shortly thereafter. I don't think you would need to do anything more than taking the existing README.md and splitting it up into pages for easy linking.

Obviously you don't have to do this but we thought we'd let you know.

The PR that needs to be merged is here.

Thanks!

Error when starting dashing

Hello, I follow the tutorial and i'm running into this issue when trying to start Dashing,

$ dashing start
bundler: failed to load command: thin (/usr/local/bin/thin)
Errno::ENOENT: No such file or directory - config.ru
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/rack/adapter/loader.rb:32:in `read'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/rack/adapter/loader.rb:32:in `load'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:in `start'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/thin/runner.rb:200:in `run_command'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/lib/thin/runner.rb:156:in `run!'
  /home/arriflex/.gem/ruby/gems/thin-1.6.4/bin/thin:6:in `<top (required)>'
  /usr/local/bin/thin:23:in `load'
  /usr/local/bin/thin:23:in `<top (required)>'

I tryed googling the issue there is some solution for dashing but i can't seem to make it work

Clarification of Pi instructions please

Hi,

Wondering if you can confirm my steps on Jessie?
git clone https://github.com/home-assistant/hadashboard.git
cd hadashboard
docker build -f Docker-raspi/Dockerfile -t hadashboard . (took 5hrs on PiB with no errrors)

Copied the ha_conf.rb.example file to ha_conf.rb and edit settings
Copied dashboards/example.erb and called it 'main.erb'

docker run --name="hadashboard" -d -v /home/pi/hadashboard/dashboards:/app/dashboards -v /home/pi/hadashboard/lib/ha_conf.rb:/app/lib/ha_conf.rb -v /home/pi/hadashboard/hapush:/app/hapush --net=host hadashboard

Last line returns 0aac704f2093dd10ff0413f0e77c50769c5c569ee25fd57cb67ee1d338e51f3b so assume containing is running.

And then this is what I get:

pi@raspberrypi:~ $ cd hadashboard
pi@raspberrypi:~/hadashboard $ dashing start                                    
-bash: dashing: command not found
pi@raspberrypi:~/hadashboard $

How do I debug that? Is there a problem with my paths in my docker run command?

Weather widget can only display temp in F?

My forecast.io is all in Centigrade, but the Haweather widget always shows F.

I tried adding data-unit="°C" like some of the other widgets use but this didn't seem to work.

hameter values don't update..

Hi,

i just noticed this .. the hameter widget values don't update, i think the reason is a missing mapping between hameter and sensor. if i add "Hameter": "sensor" to translateview here it does update.. i'm guessing it's missing ?

Problem with Docker instructions for Raspberry Pi

I've been trying to get this running on a Raspberry Pi using Docker. I'm on an RPi3 with Jessie Lite.

I installed Docker using the officially provided Raspbian packages, with apt-get install docker docker.io. Everything seemed to go fine.

But when I attempt to run the command specified in your instructions for the RPi, I get the following:

$ docker build -f Docker-raspi/Dockerfile -t hadashboard .
flag provided but not defined: -f

Usage: docker build [OPTIONS] PATH | URL | -

Build a new image from the source code at PATH

  --force-rm=false     Always remove intermediate containers, even after unsuccessful builds
  --no-cache=false     Do not use cache when building the image
  -q, --quiet=false    Suppress the verbose output generated by the containers
  --rm=true            Remove intermediate containers after a successful build
  -t, --tag=""         Repository name (and optionally a tag) to be applied to the resulting image in case of success

It seems that the "-f" flag isn't recognized. What is that flag supposed to do? Any ideas why my system wouldn't recognize it?

Looks like I have Docker version 1.3.3, build d344625.

nil exception on gsub in jobs/homeassistant.rb

on starting hadashboard I get:

scheduler caught exception:
undefined method `gsub' for nil:NilClass
/home/rawdlite/hadashboard/jobs/homeassistant.rb:356

Problem seems to be located here.
response = ha_api("states/sensor.dark_sky_icon", "get")
icon = response["state"].gsub(/-/, '_')

I have not looked into what the api call actually returns, but I think the missing key exception should be catched in the code.

regards
tom

How can i change theme to default dashing theme?

How can i change theme to default dashing theme?

Is possible to use dashing template:
dashing/templates/project/assets/stylesheets/application.scss
to hadashing:
hadashboard/assets/stylesheets/application.scss

1:1 ?

Thanks

EDIT:
It seems, there is problem with docker version.

It should be possible to add docker volume like <path_to_hadashboard>/assets :/app/assets to have persistent configuration for custom themes.

Can anyone update dockerfile?

scheduler caught exception: can't convert nil into Float

Anyone else seeing this? I've been tailing my log for an hour and 15 minutes and it has happened on six occasions. I've always noticed it, but never have been concerned with it as everything that I've tested works!

scheduler caught exception:
can't convert nil into Float
/var/opt/hadashboard/jobs/homeassistant.rb:232:in `Float'
/var/opt/hadashboard/jobs/homeassistant.rb:232:in `block in <top (required)>'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `call'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `call'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'

Hagroup does not support all_devices

Hello, Would it be possible for Hagroup to not only compare on on/off, but also home/not_home? This way it would work for all_devices as well.

Thanks.

Decimal portion of hasensor?

hasensor value is currently rounded to the nearest whole number. It would be nice to be able to specify the number of decimal points. For example the sabnzbd_speed sensor reports in MB/s and as my figure hovers around 1.5 to 4.0, it would be nice to have one decimal place. It reports one decimal place in the homeassistant web frontend.

Not a priority issue, more a suggestion.

Background colors for all widgets?

Do you have any plans to add the bgcolor option for all widgets? The default gray is absolutely horrid and very hard on the eyes. I understand you like it, but man, that is the worst look ever.

Anyway, thanks for porting this over, its hard to operate HA from the standard web interface when using a wall mounted tablet, but this makes it a lot easier... just looking forward to being able to change the color.

Thanks! :)

scheduler caught exception: undefined method `content' for nil:NilClass

Hi!
I have another error regarding News widget. However, RSS feeds on Example dashboard are working but I cannot add new one. If I add new widget, the RSS feeds are not displayed. It is very strange that if I put empty variable $news_feeds {} in ha_conf.rb file the Traffic and News RSS feeds are still displayed! It looks like URLs are saved elsewhere.

Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop

scheduler caught exception:
undefined method content' for nil:NilClass /home/pi/hadashboard/jobs/news.rb:38:inrescue in block (2 levels) in latest_headlines'
/home/pi/hadashboard/jobs/news.rb:35:in block (2 levels) in latest_headlines' /home/pi/hadashboard/jobs/news.rb:33:ineach'
/home/pi/hadashboard/jobs/news.rb:33:in block in latest_headlines' /usr/lib/ruby/2.1.0/open-uri.rb:153:inopen_uri'
/usr/lib/ruby/2.1.0/open-uri.rb:704:in open' /usr/lib/ruby/2.1.0/open-uri.rb:34:inopen'
/home/pi/hadashboard/jobs/news.rb:31:in latest_headlines' /home/pi/hadashboard/jobs/news.rb:66:inblock (2 levels) in <top (required)>'
/home/pi/hadashboard/jobs/news.rb:65:in each' /home/pi/hadashboard/jobs/news.rb:65:inblock in <top (required)>'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in call' /var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:intrigger_block'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in block in trigger' /var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:incall'
/var/lib/gems/2.1.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'

HAPush and HAGroup Not triggering updates


Solved by correcting the case of the Entity IDs.
In my instance this was the case
Correct: bathroomlight
Wrong: BedroomLight

Hello,

I thought this was working but it seems it's not now. First a quick breakdown of the environment. I've got 3 Hue Bulbs, each as are in their own HAGroups. I can use the HAGroup to toggle a light that works. but if I use the default ALL_Lights gorup with HAGroups an toggle that one. It's not updating the state of the individual groups.
Watching the HAPush I'm seeing states pushing for the all_lights group and the individual switchs but not the groups anymore. Any suggestions on where I should look?

At this point I'm wondering if I'm crazy and the groups never actually worked right for notifying like this. Or if something changed...

Toggle all_lights off through HADashboard and the following happens in HAPush:

2017-02-06 15:04:05,486 INFO switch.bedroom -> state = off, brightness = 30
2017-02-06 15:04:05,567 INFO switch.bathroom -> state = off, brightness = 30
2017-02-06 15:04:05,660 INFO group.all_lights -> off

Turn off off the toggles individually nothing changes of course.

Turn the lights on individually from Home Assistant. I see the following:

2017-02-06 15:04:31,076 INFO group.all_lights -> on
2017-02-06 15:04:31,818 INFO switch.bathroom -> state = on, brightness = 80
2017-02-06 15:04:32,688 INFO switch.utility -> state = on, brightness = 100

HADashboard erb Items.

      <div data-id="all_lights" data-view="Hagroup" data-title="All Lights" data-icon="lightbulb-o"></div>
    </li>

    <li data-row="1" data-col="7" data-sizex="1" data-sizey="1">
      <div data-id="UtilityLight" data-view="Hagroup" data-title="Utility" data-icon="lightbulb-o"></div>
    </li>

    <li data-row="1" data-col="8" data-sizex="1" data-sizey="1">
      <div data-id="BathroomLight" data-view="Hagroup" data-title="Bathroom" data-icon="lightbulb-o"></div>
    </li>

    <li data-row="1" data-col="9" data-sizex="1" data-sizey="1">
      <div data-id="BedroomLight" data-view="Hagroup" data-title="Bedroom Lamp" data-icon="lightbulb-o"></div>
    </li>

Home Assistant Group yaml

  BedroomLight:
    entities:
      - light.bedroom
  BathroomLight:
    entities:
      - light.bathroom
  UtilityLight:
    entities:
      - light.utility

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.