I also tried to get the camera-widget to work, but no matter what i do, i can’t get it to write a new file, is that your case too?
I also tried to modify the unifiVideo widget to use hass camera api (/api/camera_proxy/camera.outdoor?token=19391345504), but still no luck, can’t write anything to the image folder, wondering if its permission issue, is there any error log in dashing so I can track down the errors?
Guys, found the log file and looked at the errors, and I finally got the camera widget working, stay tune, will test it thoroughly then upload here soon.
almost there, now the camera widget is working with hass camera api without SSL, can someone help to enable https in this function?
def fetch_image(host,old_file,new_file, cam_port, cam_user, cam_pass, cam_url) rm #{old_file} mv #{new_file} #{old_file}
Net::HTTP.start(host,cam_port) do |http|
req = Net::HTTP::Get.new(cam_url)
if cam_user != “None” ## if username for any particular camera is set to ‘None’ then assume auth not required.
req.basic_auth cam_user, cam_pass
end
response = http.request(req)
open(new_file, “wb”) do |file|
file.write(response.body)
end
end
new_file
end
Finally got it working using the hass api, so if your camera work on hass interface, now you can use it on hadashboard too. code based on the broken grubernaut/camera-widget
So now, what’s the best way to upload the code or if anyone want it at all, seems like I was talking to myself on all the post above, hahaha
OK, I had some time to go back to the CSS refactoring again today to fix the issue where the application doesn’t work if you don’t have the optional CSS override files (oops…). Unfortunately SASS limitations make it slightly less elegant, but it’s still pretty easy. The branch has been updated. I’m going to open a pull request. New instructions on customizing (from the README):
If you want to customize the styles of your dashboard and widgets, there are two options:
A. You can edit the application.scss file (and the individual widget .scss files) directly (not recommended; if you pull down updates from the master repository, your changes might conflict/be overwritten)
B. Create override files (recommended)
Create a couple of additional files in the assets/stylesheets directory: _application_custom.scss and _variables_custom.scss.
Open _application.scss and go to the bottom of the file. Uncomment the @import line.
Open _variables.scss and go to the bottom of the file. Uncomment the @import line.
Write your own SASS styles in _application_custom.scss (for general style customization) and _variables_custom.scss (for colors). You can customize those files without worrying about your changes getting overwritten if you pull down an update. The most you may have to do, if you update, will be to uncomment the @import lines again from steps 2 and 3.
_Note: The _variables.scss file (and your customizations from _variables_custom.scss) get imported into nearly every widget’s SCSS file, so it is a best practice to define varaibles for colors in _variables.scss or variables_custom.scss and reference those variables in the widget SCSS.
Just quickly learned how to use github and not sure if this is the correct way to do it, but here you go.
This is a dumb version just to get the camera widget to work, many things is hard coded, including the camera api link, http and https, so pleae improve it if you can. I am not a programmer, just getting lucky to get all the code working.
Yes, I also used the link from my ip cam to get the jpg to test the script then I decided to use the api from HASS as not all my cameras support the jpg from weblink.
Huge thanks for this project! Absolutely brilliant!
Two questions: is it possible to get a 24 hr clock? I tried to edit the clock.coffee but nothing happened, even after restart (and re-run) of the Docker container. I’m now re-building the container but it takes forever and a day so I’d rather not be doing that every time I want to change something (I’m not well versed in neither Linux nor programming so I’m probably missing something obvious here). Second question, is it possible to use other icons than Font Awesome and how would I go about finding/adding those?
Is it normal that each time after dashing restart, the dashboard interface require 10+ secs to load again? The problem I got is that I have a routine to restart the Raspberry pi server everyday, so who ever try to use the dashboard the 1st time after the server restart will need to wait for the page to load before they can turn on any light.
It will be good if this process can be forced behind the scene as soon as dashing is restarted.
This is expected behavior - Dashing recompiles all the CSS the first time it is started. I am not aware of an easy way to fix this in the product itself, but you could try running a wget command against your dashboard shortly after startup to get the process running. You should be able to automate this via startup scripts or a cron job.