If you have https configured you must yous the full name that is in the cert not the IP address or you will get errors.
@aimc
Sorry I should have said I have changed the address for pubic reasonsā¦ I forgot that with HTTPS tags it would appear wrong.
hapush.cfg
ha_url = "https://hass.domain.com:8123" ha_key = API-Key-Here dash_host = "http://10.3.6.250:3030" dash_dir = "/home/pi/hadashboard/dashboards" logfile = "/etc/hapush/hapush.log"
ha_confi.rb
$ha_url = "https://hass.domain.com:8123"
$ha_apikey = "API-Key-Here"
$news_feeds = {
"Traffic" => "http://api.sr.se/api/rss/traffic/2863",
"News" => "http://feeds.bbci.co.uk/news/rss.xml",
}
I get the error in hapush regardless if Iām using HTTP or HTTPS and with or without an API key.
Edit: Doing a full wipe and reinstall of everything again to see if it fixes it (on my backup SD)
I am getting error on version 1.9.0 any idea?
scheduler caught exception:
undefined method `gsub' for nil:NilClass
/home/home/hadashboard/jobs/homeassistant.rb:308:in `block in <top (required)>'
/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in `trigger_block'
/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in `block in trigger'
/var/lib/gems/2.3.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_job'
Looks like you don;t have sensor.dark_sky_icon
configured in your hass instance.
Not sure you are replying to me or not. If you are then where do you see the dark_sky_icon in my posted error? I donāt have any trigger set on that sensor. Again sorry if you are not replying to me.
I was For the dashboard it is a requirement to have many of the dark sky sensors configured - the docs should have details. It wasnāt in the error, it was in the code (lines 307 and 308):
response = ha_api("states/sensor.dark_sky_icon", "get")
icon = response["state"].gsub(/-/, '_')
I assume I can ignore that error if I donāt want weather on my dashboard correct?
I read history.md about this in breaking changes:
Breaking Changes:
Weather will not work unless Home Assistant is updated to use the Dark Sky component
Thanks
if you dont want darksky weather (like me) you can edit homeassistant.rb in the jobs directory.
at the bottom you can take out the whole weather schedule part.
Update report: rebuilt the Raspberry Pi from the ground up and in doing so discovered the error and it wasnāt until I looked at the default config for hapush that I discovered it
The error was in my hapush config and now I see it it was so simple, shame it took me 3 days to work it out!!!
My original hapush.cfg
ha_url = "https://hass.domain.com:8123" ha_key = API-Key-Here dash_host = "http://10.3.6.250:3030" dash_dir = "/home/pi/hadashboard/dashboards" logfile = "/etc/hapush/hapush.log"
The correct config for hapush.cfg
> ha_url = āhttps://hass.domain.com:8123ā
> ha_key = API-Key-Here
> dash_host = ā10.3.6.250:3030ā
> dash_dir = ā/home/pi/hadashboard/dashboardsā
> logfile = ā/etc/hapush/hapush.logā
ādash_host=ā cannot be HTTP:// or HTTPS://.
Thanks to everyone that helped out, Iām just glad to have got it working. On a plus note I now have a nice clean install with regular backups. Special thanks to @aimc for bringing the community this content
Glad you figured it out - I should have made it a bit more consistent I guess
Need a little help. Running on Ubuntu 14.04 - I get errors when I execute ādashing startā, but the dashboard is accessible on port 3030. Unfortunately, only the clock widget works though. I did verify the state data is available via the API from HA.
Any ideas what is missing and causing the errors based upon the following:
udooer@udooneo:~/hadashboard$ dashing start
scheduler caught exception:
undefined method gsub' for nil:NilClass /home/udooer/hadashboard/jobs/homeassistant.rb:308:in
block in <top (required)>ā
/var/lib/gems/2.0.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in call' /var/lib/gems/2.0.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:230:in
trigger_blockā
/var/lib/gems/2.0.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/jobs.rb:204:in block in trigger' /var/lib/gems/2.0.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in
callā
/var/lib/gems/2.0.0/gems/rufus-scheduler-2.0.24/lib/rufus/sc/scheduler.rb:430:in `block in trigger_jobā
Thin web server (v1.6.4 codename Gob Bluth)
Maximum connections set to 1024
Listening on 0.0.0.0:3030, CTRL+C to stop
bundler: failed to load command: thin (/usr/local/bin/thin)
RuntimeError: no acceptor (port is in use or requires root privileges)
/var/lib/gems/2.0.0/gems/eventmachine-1.2.1/lib/eventmachine.rb:530:in start_tcp_server' /var/lib/gems/2.0.0/gems/eventmachine-1.2.1/lib/eventmachine.rb:530:in
start_serverā
/var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/backends/tcp_server.rb:16:in connect' /var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/backends/base.rb:63:in
block in startā
/var/lib/gems/2.0.0/gems/eventmachine-1.2.1/lib/eventmachine.rb:194:in call' /var/lib/gems/2.0.0/gems/eventmachine-1.2.1/lib/eventmachine.rb:194:in
run_machineā
/var/lib/gems/2.0.0/gems/eventmachine-1.2.1/lib/eventmachine.rb:194:in run' /var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/backends/base.rb:73:in
startā
/var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/server.rb:162:in start' /var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/controllers/controller.rb:87:in
startā
/var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/runner.rb:200:in run_command' /var/lib/gems/2.0.0/gems/thin-1.6.4/lib/thin/runner.rb:156:in
run!ā
/var/lib/gems/2.0.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ām also a little confused on where I specify the sensor name to tie the widget to the HA sensor. Do I change the erb file or the widget files to make the sensor names match?
Thanks in advance,
No blame to be had - just one of those thingsā¦
At least now I have documented every working step and every working command from new Base image to working hadashboard and hapush.
Just the final step now getting to run at boot and document the process this bit should be easy though its been covered multiple times in this thread
Iāll make a backup just in case though
@aimc Is it be possible to get hadashboard to work on https?
Iāve never done it but I don;t see why not - the underlying webserver thin
supports SSL, but youād need to figure out how to add certificates etc. Another possibility would be to use nginx
to proxy it for you.
i had that same error when i first started using dashboard.
i ended up taking out the weather part in homeassistent.rb (because i didnt use it anyway)
Perfect, I will do that, thanks.
You can fix the weather widget loading issue like this:
Be aware I have split my configuration.yaml into separate *.yaml files as shown below. So you may need to add it to your configuration.yaml
sensor: !include sensor.yaml
i dont think its wise to add unwanted sensors to hass and hide them, just to get dashboard running without errors.
i think that taking it out of the job is more wise.
@aimc in a future release could the weather be optional? (a check if it exists, and if not ignore to avoid errors)
To be honest i donāt really hide them, I just donāt display them any where, oneday maybe theyāll have a use
if you dont hide them they show up in the frontend. that would annoy me
Thanks noodlemctwoodle and ReneTode - I use Yahoo Weather so I will play around to see if I can get it to work.
I did get a few of my other sensors to display properly in the dashboard so I think you folks were āspot-onā with the weather widget being my issue.
Thanks again for you help!!