same error, nothing changed…
I have a test.py I wrote to test SSEClient when I had the same issue… give it a try to see if you still get the same error:
- Create a new file test.py
- Copy the following content
- Save and close the file
- chmod 755 test.py
- Run it: ./test.py https://xxxx.duckdns.org/api/stream?api_password=xxxxx → replace xxx with your own info
- Wait for ha updates, it’d print on screen, without doing anything else…
You probably will get the same error but you’d know that your SSEClient has problem.
That was how I found out and upgraded my SSEClient to latest version.
#!/usr/bin/python3 import sys,pprint from sseclient import SSEClient
def process_message(msg): global logger global widgets
if msg.data == "ping": return print(msg.data)
def main(argv): if (len(argv) == 2): testSSEClient(argv[1])
def testSSEClient(host): messages = SSEClient(host) print("*** Connected to stream ... ***") for msg in messages: process_message(msg)
if __name__ == "__main__": main(sys.argv)
Yup, you`re right, same error. I guess is the SSEClient, care to share how did u manage to find a resolution? thx
Make sure you have the latest pyOpenSSL
do this to see what version you have
$ pip show pyOpenSSL
Mine shows:
Name: pyOpenSSL Version: 16.2.0 Summary: Python wrapper module around the OpenSSL library Home-page: https://pyopenssl.readthedocs.io/ Author: Hynek Schlawack Author-email: [email protected] License: Apache License, Version 2.0 Location: /usr/local/lib/python3.4/dist-packages Requires: cryptography, six
lates one
Name: pyOpenSSL
Version: 16.2.0
Summary: Python wrapper module around the OpenSSL library
Home-page: https://pyopenssl.readthedocs.io/
Author: Hynek Schlawack
Author-email: [email protected]
License: Apache License, Version 2.0
Location: /usr/local/lib/python3.4/dist-packages
Requires: six, cryptography
Finally after hours it`s working:
*** Connected to stream … ***
thank so much for helping me around. Had to uninstall and reinstall pyOpenSSL several times
Awesome! I’m glad I could help out. I was able to help since I ran into the EXACT issue couple of days ago
I`m pretty sure that are more ppl in the same spot, would be a great ideea to start a new post with this info. thx again
Hello I was asked to post here instead of github!
Repost:
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?
And to add to your question, there is nothing written to the log file, full output from my terminal is as follows when in the HA web switching the input back and forth:
(hapush) username@host:~/hapush/hadashboard/hapush$ ./hapush.py hapush.cfg
2017-01-22 23:26:53,284 INFO Reading dashboard: /home/username/hapush/hadashboard/dashboards/example.erb
2017-01-22 23:26:53,285 INFO Reading dashboard: /home/username/hapush/hadashboard/dashboards/main.erb
2017-01-22 23:27:26,803 INFO script.home_status_evening → night
2017-01-22 23:27:34,219 INFO script.home_status_evening → evening
Just thought that i should add that the scripts are executing as one would expect, it’s just that the icons stays lit
Thanks for reposting
So the fact that hapush sends the notification to both scripts is expected - what is strange is that it is sending a different event to both, it should be the same, e.g. The new value of the input_select after the push of the button changes it.
Edit: to clarify, both scripts should be notified for each state change and I only see one being notified.
I notice in your dashboard, the lines end with </$
instead of </>
- is that a cut and paste error?
Should it list 2 events?
Because i get 1 line per “switch” so to speak! (aka 1 button press gives me 1 event in hapush)
See my edited response above
Seems like hapush is only seeing one of your scripts which would explain the behavior
It seems i had some broken div tags, good catch! I have been staring at this config for several hours and it seems i even reset my z-wave devices while pulling my hair out
It works as expected now, hugh thanks!
First of all… Thanks a ton for this awesome project… Home assistant is an awesome project itself and this wall mounted dashboard stuff is just the right ornament to enrich home-assistant. My heartiest thanks to the devs for this specially @aimc and @KRiS
I am not a dev nor very good at Linux so my apology if my question sounds too silly. So far, Dashing and Hapush both are working fine; following the Documentation provided by Andrew I guess; Thanks a lot man for your great work.
Right now my questions/concerns are as below:
In the weather widget I didn’t understand this quoted line “The data-id of the Haweather widget must be set to weather or the widget will not work”. But I followed the example anyway with no luck. The widget is there with no Information shown. However, if I use Hasensor and follow the standard sensor definition, then its working as intended. Do I need to do any tweak to get Haweather working ? I really loved that summary view of weather information.
Another trouble regarding Dark Sky component ; I want to use the “Daily_summary” with 2X2 tile if the Haweather doesnt work at all. But Daily summary has very large font which I can’t fit into a 2x2 rather it requires 2x4 which actually consume the space for the News Widget. Is there any way to change the font-size ?
After the dashboard setup as my need, I found if I accidentally touch on an icon a bit longer, it moves across and give me option to save the new layout; which could be very beneficial in some cases but its annoying if my intention was not doing that. Is there any method to lock the position of the tiles ?
News & Traffic : For News I am using “Sydney Morning Herald - Latest News” which is working fine but I couldn’t make Traffic to work. Did anyone around Australia figured out a working link ?
Thanks again guys for the excellent piece of work.
Hi there
Can you post your ERB file please? Also, are you getting any errors in thin.log or on the command line?
At the momnent you could edit the widget css file but that would change the font size for all instances. If you create an issue on github for this I’ll look into it for the next release.
Never looked into this - it isn;t a big problem for me. It is underlying Dashing behavior I’ll take a look and see if it can be disabled.
After the dashboard setup as my need, I found if I accidentally touch on an icon a bit longer, it moves across and give me option to save the new layout; which could be very beneficial in some cases but its annoying if my intention was not doing that. Is there any method to lock the position of the tiles ?
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"
Great - I’ll add this in the next release
Thanks a lot @BlizzWave . It worked flawlessly though the segment you mentioned was not in the application.coffee ; however, I added those lines there which seems to solve the problem.
Thanks a lot for your kind and elaborate reply. Please find the relevant lines from the main.erb file below:
…
<li data-row="1" data-col="7" data-sizex="2" data-sizey="4">
<div data-id="dark_sky_daily_summary" data-view="Hasensor" data-bgcolor="#643ECF" data-color="#00FF00"></div>
</li>
<li data-row="1" data-col="5" data-sizex="2" data-sizey="2">
<div data-id="weather" data-view="Haweather" data-unit="°C" data-color="#FF0000"></div>
</li>
…
These 2 lines got troubles. In the first one, it provides the data but as I said, the font size it way too big to fill all 2X4 tile which would be nice if can be fitted into 2X2 tile. Then the second segment is about the weather widget from dark sky, if this works, then I wont require the first one indeed. This one gives me a tile with Headers but no information at all. My dark_sky yaml configuration is below:
‘’’
- platform: darksky
api_key: xxxxxxxxxxxxxxxxxxxxxxxx
units: auto
update_interval: ‘00:30:00’
monitored_conditions:- summary
- icon
- precip_intensity
- precip_probability
- temperature
- apparent_temperature
- wind_speed
- wind_bearing
- humidity
- pressure
- daily_summary
- temperature_max
- temperature_min
- apparent_temperature_max
‘’’
Thanks again for your kind support.