Agree! (10 characters)
Getting this lovely error when starting up hapush, but I only see it when I ctrl+c
pi@homeassistant:~/hadashboard/hapush $ ./hapush.py hapush.cfg
^C2016-07-17 20:43:36,888 CRITICAL Unexpected error:
2016-07-17 20:43:36,889 CRITICAL ------------------------------------------------------------
2016-07-17 20:43:36,898 CRITICAL Traceback (most recent call last):
File "./hapush.py", line 244, in run
for msg in messages:
File "/usr/local/lib/python3.4/dist-packages/sseclient.py", line 61, in __next__
nextchar = next(self.resp_iterator)
File "/usr/local/lib/python3.4/dist-packages/requests/utils.py", line 368, in stream_decode_response_unicode
for chunk in iterator:
File "/usr/local/lib/python3.4/dist-packages/requests/models.py", line 664, in generate
for chunk in self.raw.stream(chunk_size, decode_content=True):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/response.py", line 349, in stream
for line in self.read_chunked(amt, decode_content=decode_content):
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/response.py", line 498, in read_chunked
self._update_chunk_length()
File "/usr/local/lib/python3.4/dist-packages/requests/packages/urllib3/response.py", line 444, in _update_chunk_length
line = self._fp.fp.readline()
File "/usr/lib/python3.4/socket.py", line 371, in readinto
return self._sock.recv_into(b)
KeyboardInterrupt
2016-07-17 20:43:36,899 CRITICAL ------------------------------------------------------------
^CTraceback (most recent call last):
File "./hapush.py", line 327, in <module>
main()
File "./hapush.py", line 322, in main
run()
File "./hapush.py", line 253, in run
time.sleep(5)
KeyboardInterrupt
And this when âdashing startâ
I can see the dashboard, but nothing is working.
2016-07-17 20:36:50 - NoMethodError - 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:153:in `block in <top (required)>'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1611:in `block in compile!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `[]'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (3 levels) in route!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:994:in `route_eval'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:975:in `block (2 levels) in route!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1015:in `block in process_route'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `catch'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1013:in `process_route'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:973:in `block in route!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `each'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:972:in `route!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1085:in `block in dispatch!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1082:in `dispatch!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `block in call!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `block in invoke'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `catch'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1067:in `invoke'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:907:in `call!'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:895:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/xss_header.rb:18:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/path_traversal.rb:16:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/json_csrf.rb:18:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/base.rb:49:in `call'
/var/lib/gems/2.1.0/gems/rack-protection-1.5.3/lib/rack/protection/frame_options.rb:31:in `call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/logger.rb:15:in `call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/commonlogger.rb:33:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:219:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:212:in `call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/head.rb:11:in `call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/methodoverride.rb:21:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/show_exceptions.rb:25:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:182:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:2013:in `call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `block in call'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1787:in `synchronize'
/var/lib/gems/2.1.0/gems/sinatra-1.4.7/lib/sinatra/base.rb:1487:in `call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/urlmap.rb:65:in `block in call'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `each'
/var/lib/gems/2.1.0/gems/rack-1.5.5/lib/rack/urlmap.rb:50:in `call'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/connection.rb:86:in `block in pre_process'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/connection.rb:84:in `catch'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/connection.rb:84:in `pre_process'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/connection.rb:53:in `process'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/connection.rb:39:in `receive_data'
/var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run_machine'
/var/lib/gems/2.1.0/gems/eventmachine-1.2.0.1/lib/eventmachine.rb:194:in `run'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/backends/base.rb:73:in `start'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/server.rb:162:in `start'
/var/lib/gems/2.1.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:87: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)>'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `load'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:63:in `kernel_load'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli/exec.rb:24:in `run'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli.rb:304:in `exec'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/command.rb:27:in `run'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/invocation.rb:126:in `invoke_command'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor.rb:359:in `dispatch'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/vendor/thor/lib/thor/base.rb:440:in `start'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/cli.rb:11:in `start'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/exe/bundle:27:in `block in <top (required)>'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/lib/bundler/friendly_errors.rb:98:in `with_friendly_errors'
/var/lib/gems/2.1.0/gems/bundler-1.12.5/exe/bundle:19:in `<top (required)>'
/usr/local/bin/bundle:23:in `load'
/usr/local/bin/bundle:23:in `<main>'
Then stop hitting ctrl-c
Seriously, there is no graceful way to exit as we are always waiting for updates for home assistant. Hapush is meant to run as a daemon, and you will see those errors if you hit ctrl-c when running on the command line .
So itâs âworking??â
The weather is not populating. That was the first thing I set up to test.
RPi3 Jessie full
Everything running on the same pi.
I was responding to your first post about hitting ctrl-c - it is known behavior. I am looking at your second post now - being sarcastic is not helpful, obviously it is not âworkingâ.
From the stack trace it looks like you are not setting up an api_key in ha-conf.rb. If you donât have an api key set, just try setting it to some random value, or ââ.
Sorry if I came off harsh, was not my intention.
Ctrl+c is my favorite key bind to press!
Anyways, I do have an api_key listed in my ha_conf.rb. It is also in the hapush.cfg
Itâs nothing too crazy just 8 chars.
$ha_url = "http://192.168.1.108:8123"
$ha_apikey = "sexy_apikey_here"
$news_feeds = {
"Traffic" => "http://api.sr.se/api/rss/traffic/2863",
"News" => "http://feeds.bbci.co.uk/news/rss.xml",
}
ha_url = "http://192.168.1.108:8123"
ha_key = sexy_apikey_here
dash_host = "192.168.1.108:3030"
dash_dir = "/srv/hass/src/hadashboard/dashboards"
logfile = "/etc/hapush/hapush.log"
EDIT: Those are not one file, for some reason it wonât separate the code out.
OK, sorry that I took that the wrong way
So the hapush config is not relevant here, it seems to revolve around the ha_conf.rb
Looks like you have everything in place, but the only thing that could cause a problem on that line in the stack trace is the value of $ha_apikey
perhaps it is too sexy ?
Do you have any unusual characters in it?
Negative. Letters and numbers.
Took the apikey out. And left the value at $ha_apikey = ââ
Still nothing.
Still the exact same error message?
Hey Guys, happy to see this topic is so busy! Iâve used dashing with Openhab prior to moving to Home Assistant and it worked great for me. The pull I have seems to be working ok too â exceptâŚ
In my hallway I have three linked bulbs. I have them in a group called group.hallway (includes light.hallway1, etc)
How can a trigger a âgroupâ to go on and off? I put in hallway as my trigger item but doesnât seem to work. I also need to pull the latest since I see lots of changes have been made but this question should still apply.
Thx!
Hi there - actually we discussed this a few posts up - I didnât originally add support for groups as I never use them, but @jwl173305361 is working on adding support so watch this space!
But wouldnât a group be synonymous to a scene? Or now that I think about it while typing this, you may want the group to be part of the scene⌠hmmmâŚ
Actually thatâs a good workaround, you could use a scene to turn on a group. Another possibility would be to make a widget that calls homeassistant.on
which would work with everything but would sacrifice specific functions like dimming (and color if I ever get around to it).
I just finished a group widget. It is using homeassistant/turn_* as the POST and like you mentioned there is going to be some caveats to this. It will not work in every scenario. Are you interested in putting this in still? If so, Iâll put it up and request a pull.
EDIT: and the entity_idâs are now group.
Yes please
What types of locks do you use? I am thinking about getting someâŚ
Now noticed no one replied to your request. This is something that may be possible for me to do but unfortunately, life is getting in the way I am still due to roll out the dimmer widget I will try my best to clear up some timeâŚ