Wall Mounted Dashboard (now known as HADashboard)

This may be related to your version of the requests library - what platform and version of python and requests are you using?

All this really does is prevent some messages in the logfile about insecure SSL sessions - as a workaround you can comment out lines 21 and 22 and you should be able to get up and running with no changes to actual functionality.

Thanks Andrew. I did update Requests last night to the last version (2.10 I believe). I’m not sure on python, but can check tonight. If not I will just comment out 21 and 22 and see if that works.

Appreciate your help!

I’ll look into making sure the JSON is updated as an INT.

Your modification works perfectly though :slight_smile:

Thanks!

Excellent! As I said, it never hurts to have more robust code so I am happy :slight_smile:

Here is my layout at the moment.

3 Likes

Very nice and thanks for sharing - love the traffic addition :slight_smile:

Just popping back in here to say thanks for your work on this. Been playing around with it for a couple days and its working good (running on a pine64 with ubuntu).

Questions:

  • Is it possible to change the color of the page tile to indicate which page your currently on? I’ve tried “style=“background-color:#085C61;”” and “style=“color:#aaff00;”” with no changes.

  • Some images from Font Awesome are not working. Any idea? Example: data-icon=“low-vision”

  • I took a look at hadevicetracker and was curious how hard it would be to include an additional icon. Basically, looking to change the icon based on Home, Work, Away

I have a lot of organization and items to add, but so far I’m happy.

Main:

Living Room:

Sensors:

Phone Dashboard:

@aimc

It seems like for HAdimmer, when an item is generated on the dashboard the default brightness label is 30%. If the light is switched on the label changes to the actual brightness. if the light is then switched off, the label goes back to 30%.

Is this by design? May I suggest using 0% instead of 30%? That way when the light is off or is turned off, the label always 0% and not 30%.

Let me know your thoughts.

Did you build a Traffic Widget? Do you mind sharing?

Here’s where I am so far. See if you spot anything different :wink:

I just used the the rss-widget for dashing and added an rss-feed with traffic info for my region.

You can find the widget here:

1 Like

Hi there - this is looking good :slight_smile:

To change the background color you can do this globally by editing:

``hadashboard\assets\stylesheets/aplication.scss`

Change the line that says:

$background-color: #222

To whatever you want - I don;t know of a way to do this per dashboard however.

No idea on the font-awesome icons - maybe there is a newer set than the ones I am using?

Regarding the device tracker - with the existing widget it would be hard to code this in a way that would work well for arbitary zones unless you used a text representation. I would be willing to write that if you would like, but since all HA installations can have many different zones, there would have to be a mapping in the coffescript to support that along with multiple additional tags in the dashboard - it may be possible to support say up to 5 I guess, let me think about it …

Since we don;t store the brightness attribute in HA there is really no right answer here - setting it to 30% is intended to be a default brightness when turning on from the dashboard. Setting it to 0 would mean I would have to hard code that, plus it would be wrong for everyone but me. Maybe I could make it configurable in the dashboard?

This comes about because in the original incarnation of this, when working against Smart Things, ST did have a notion of a persistent brightness which would be the brightness used next time the light was turned on, which kind of makes sense.

1 Like

Nice!

Di you write a new widget for that or just change some attributes?

In general I am happy to try and pull changes back into my code so everyone can benefit from your changes - if you think it is widely applicable, feel free to make a PR :slight_smile:

Also like the idea of double-wide dimmers - less fiddly!

This looks cool - would you like to make PR so I can include it back into my code?

I adapted the code from the existing meter widget that comes with dashing. Works very well and is animated!

I would to love to share the code. I am not sure the process with Git for a push request. I have modified the code elsewhere and I am afraid a push may end up making inadvertent unintended changes (that was specific to me)? (I’m not sure).

If you can give me some guidance I’ll send it up. If not, I can always zip it up and post a link.

I think I’ve read through all 117 posts here and have tried all that has been suggested, but can’t seem to get “dashing start” to complete successfully. I’m seeing an error that was posted 8 days ago and fixed with “gem install sinatra”…

root@hadashboard:/var/opt/hadashboard# dashing start
bundler: failed to load command: thin (/usr/local/bin/thin)
NoMethodError: undefined method `+' for nil:NilClass
  /var/opt/hadashboard/jobs/homeassistant.rb:6:in `<top (required)>'
  /var/lib/gems/2.1.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require'
  /var/lib/gems/2.1.0/gems/backports-3.6.8/lib/backports/std_lib.rb:9:in `require_with_backports'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing/app.rb:171:in `block in require_glob'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing/app.rb:170:in `each'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing/app.rb:170:in `require_glob'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing/app.rb:181:in `<top (required)>'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing.rb:3:in `require'
  /var/lib/gems/2.1.0/gems/dashing-1.3.6/lib/dashing.rb:3:in `<top (required)>'
  config.ru:1:in `require'
  config.ru:1:in `block in <main>'
  /var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `instance_eval'
  /var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/builder.rb:55:in `initialize'
  config.ru:1:in `new'
  config.ru:1:in `<main>'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `eval'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/rack/adapter/loader.rb:33:in `load'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:182:in `load_rackup_config'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:72:in `start'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in `run_command'
  /var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/runner.rb:156:in `run!'
  /var/lib/gems/2.1.0/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’ve ran:

root@hadashboard:/var/opt/hadashboard# gem install sinatra thin dashing bundler
Successfully installed sinatra-1.4.7
Building native extensions.  This could take a while...
Successfully installed thin-1.7.0
Successfully installed dashing-1.3.6
Successfully installed bundler-1.12.5
4 gems installed

and:

root@hadashboard:/var/opt/hadashboard# type thin
thin is /usr/local/bin/thin

and bundler seems to work:

root@hadashboard:/var/opt/hadashboard# bundle
Don't run Bundler as root. Bundler can ask for sudo if it is needed, and installing your bundle as root will break this application for all non-root users on this machine.
Using addressable 2.3.8
Using backports 3.6.8
Using bcrypt 3.1.11
Using coffee-script-source 1.10.0
Using execjs 2.0.2
Using daemons 1.2.3
Using rack 1.5.5
Using thread_safe 0.3.5
Using sass 3.2.19
Using tilt 1.4.1
Using multi_json 1.12.1
Using hike 1.2.3
Using eventmachine 1.2.0.1
Using thor 0.19.1
Using fastercsv 1.5.5
Using json 1.8.3
Using json_pure 1.8.3
Using stringex 1.5.1
Using uuidtools 2.1.5
Using multipart-post 2.0.0
Using hashie 3.4.4
Using jwt 1.5.1
Using mime-types 1.25.1
Using multi_xml 0.5.5
Using oa-core 0.3.2
Using ruby-openid 2.7.0
Using bundler 1.12.5
Using dm-core 1.2.1
Using data_objects 0.10.17
Using bcrypt-ruby 3.1.5
Using coffee-script 2.2.0
Using rack-protection 1.5.3
Using rack-test 0.6.3
Using tzinfo 1.2.2
Using sprockets 2.10.2
Using thin 1.6.4
Using faraday 0.9.2
Using omniauth 1.3.1
Using rest-client 1.6.9
Using rack-openid 1.3.1
Using ruby-openid-apps-discovery 1.2.0
Using dm-aggregates 1.2.0
Using dm-constraints 1.2.0
Using dm-migrations 1.2.0
Using dm-serializer 1.2.2
Using dm-timestamps 1.2.0
Using dm-transactions 1.2.0
Using dm-validations 1.2.0
Using dm-do-adapter 1.2.0
Using do_postgres 0.10.17
Using do_sqlite3 0.10.17
Using dm-types 1.2.2
Using sinatra 1.4.7
Using rufus-scheduler 2.0.24
Using oauth2 1.1.0
Using unirest 1.1.2
Using oa-openid 0.3.2
Using dm-postgres-adapter 1.2.0
Using dm-sqlite-adapter 1.2.0
Using data_mapper 1.2.0
Using sinatra-contrib 1.4.7
Using omniauth-oauth2 1.4.0
Using dashing 1.3.6
Using omniauth-heroku 0.2.0
Bundle complete! 10 Gemfile dependencies, 64 gems now installed.
Use `bundle show [gemname]` to see where a bundled gem is installed.

Any ideas what I’m missing?

i got it working but when i connect to it on port 3030, looks good but I only see a blank dark screen in the browser not the exmaple dashboard I would expect, any tips?

`
127.0.0.1 - - [30/Jun/2016 15:55:30] “GET /main HTTP/1.1” 200 41962 0.2142

scheduler caught exception:
undefined method strip' for nil:NilClass /usr/lib/ruby/2.1.0/net/http/header.rb:17:in block in initialize_http_header’
/usr/lib/ruby/2.1.0/net/http/header.rb:15:in each' /usr/lib/ruby/2.1.0/net/http/header.rb:15:in initialize_http_header’
/home/pi/hadashboard/jobs/homeassistant.rb:21:in ha_api' /home/pi/hadashboard/jobs/homeassistant.rb:175: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’

127.0.0.1 - - [30/Jun/2016 16:00:46] “GET /main HTTP/1.1” 200 41962 0.2009

`

Pull Requests are easier for me and it’s a good thing to learn to do - I learned how by submitting changes to the Smart Things version of this :slight_smile:

You will need a clean copy from my repository, then add just the changes you made. Typically you would do this my using a new git branch for your changes. Also, if you haven’t already I would want the meter option to be a new widget type for sensors, not a change to my version which I would like to keep.

If this is too much of a learning curve, get me the widgets via a Zip and I’ll see what I can do.

OK, the code in question is:

$ha_api = $ha_url + "/api/"

So if I had to guess I would say that you haven’t got a value for $ha_url in lib/ha_conf.rb