Wall Mounted Dashboard (now known as HADashboard)

I wish YAML was easier to understand.

sorry this geany has only one master :stuck_out_tongue:

LOL - not sure of the relevance of that to the dashboard, but I certainly agree which is why I created AppDaemon :wink:

1 Like

He said our wish was his command, thought I would take him up on it. :smile:

2 Likes

Ahh, all makes sense now :slight_smile:

1 Like

In case anyone is wondering, link to the thread to share your dashboards

https://community.home-assistant.io/t/share-your-hadashboard-setups/9567?u=sentinel82

How did you change the text color in the clock? I tried to change data-color but mine is always purple! the sample page has #ff0000 which is red but it still shows Purple… what is the tricks to get White like yours?

you can edit clock.scss in widgets for that

Yes! thank you, I found that under widgets folder!!

Hi, I got my hadashboard config and it displays data from homeassistant but I can’t get the hapush.py to work…here’s the error, can you help me to the right direction to fix this?

My hapush.cfg:

ha_url = "https://[ha-name].duckdns.org"
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"

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

See,s to be a problem with your SSL setup - can you access HA via the duckdns URL OK?

Yeah… I can hit the duckdns.org domain 100% fine… and in the ha_conf for Hadashboard, I specified the url there too… and it works… but just not on hapush.

That is why I got confused.

@vnguyen972 Does HAPush work for you if you try connecting through an internal address? (eg 192.168.1.111 if it is on the same machine as HADashboard)

If your HADashboard install and Home Assistant install are on the same subnet (or same computer for that matter, as is the case for many people), you can safely use the internal IP address for ‘ha_url’. Also, along the same lines, if all of your traffic is internal (and if you trust your network - (eg: in a home situation vs a dorm or shared living space)), you can try without SSL (just use ha_url = “http://192.168.x.x”)

If there is a reason you need HAPush to connect to Home Assistant via the open Internet, rather than internally, then disregard. Otherwise, you may just be trying to solve a problem that you could just work around, instead.

Hey thanks so much for jumping in on this.

I setup SSL so I could access it remotely. For the HADashboard, it doesn’t need to, but other times when I am away, I’d like to be able to access it for any reason. That’s why I setup SSL :slight_smile:

Yeah, I tried the following but it didn’t work, I guess once you setup SSL, you can’t access without SSL? I am not so sure about that!

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

but it keeps saying unable to connect

2017-01-16 11:50:10,323 INFO Reading dashboard: /home/pi/hadashboard/dashboards/example.erb
2017-01-16 11:50:10,332 INFO Reading dashboard: /home/pi/hadashboard/dashboards/main.erb
2017-01-16 11:50:10,377 WARNING Unable to connect to Home Assistant, retrying in 5 seconds

So I read more into this and I wrote a test.py just to see if SSEClient works and I can’t get it to work, either…

if I hit the URL https://192.168.1.111:8123/api/stream?api_password=<pasword_here>, it works, I got a Ping and it’s streaming… on the browser just fine…

but I couldn’t get it to work via Python…and I checked and I think sseclient is uptodate… I’m not sure whatelse to do…

I think I got it WORKING!

After a lot of reading and researching… turns out I have an older version of pyOpenSSL (0.13.1)

so I did

sudo pip3 uninstall pyOpenSSL
sudo pip3 install pyOpenSSL

That would uninstall the older and install the latest…

and it seems to works… I could run hapush.py without any error…

UPDATE: Okay, no error, but I don’t see anything printing out… weird… will look into that next.

I finally got it working! The pyOpenSSL took most of my time but I’m glad I resolved it…

Now off to learn more about dashboard configurations…

I need to learn coffee script and more CSS :slight_smile:

I wonder if there’s a resource to learn about those coffee script syntax and stuff.

I want to try to change the text color on Hatemp when the temperature is on certain range… I can’t figure out how… I need more examples :slight_smile:

Excellent - glad you figured it out - if you make any cool changes don;t forget to let us know :slight_smile:

There is an example of color changing based on value further up the thread. (#510 by @jgon. He linked his code here ). What you are looking to do seems possible, just needs some tweaking for your uses.

Glad you got it working! Now go forth and hack :slight_smile:

Thanks. Yes… that was the one I looked at and inspired the idea but there are so much to learn and figure out so I could modify to my liking :slight_smile: