Ahh, all makes sense now
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
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
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
Excellent - glad you figured it out - if you make any cool changes don;t forget to let us know
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
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
Good Evening!
I am at a complete and utter loss here. I have HaDashboard running and configured appropriately, but absolutely nothing works. I have Darksky running well and it offers a plethora of information in the HASS UI, but does absolutely nothing for HADB. I have properly configured one switch as a test before I went through the trouble of adding the rest, but alas it doesn’t do anything, I could click on it all day long but it wouldn’t change anything.
I have hapush.cfg configured, and hapush.py running, I have config.ru configured, and ‘dashing start’ initiated. I feel like there may be a better way to implement this than ~14 hours of configuration and manual loss of all my head hair!
That’s strange.
After my initial setup and ran it for the first time, I ran the example.erb, then I copied it to main.erb and started editing it… I edited one square at a time by plugging in my HA component. and hit reload to verify if it gets the right info (compared with HA UI)… it should be that simple.
For example:here’s my dark sky component:
<li data-row="1" data-col="3" data-sizex="1" data-sizey="1">
<div data-id="dark_sky_temperature" data-view="Hatemp" data-unit="°F" data-title="Temperature"> </div>
</li>
data-id should be my sensor name without the “sensor” as in HA UI shown “sensor.dark_sky_temperature”
you say you have config.ru configured.
but with what, because it doesnt need configuring.
did you configure /lib/ha_conf.rb right?
yes, that is what I meant, it was a long night of trying my hardest not to throw a brick through my virtual server lol. I need to verify that hapush is passing messages properly, as that seems to be the only link that I can see as possibly malfunctioning. HA UI runs like a dream, and while the HADB runs, it doesn’t respond to any changes (button presses).
I’ll try changing my data-id from “weather” (as described in the documentation https://home-assistant.io/ecosystem/hadashboard/dash_config/#weather-requires-darksky ) to “dark_sky_XXX” per suggestion and see how that works