Announcement: HADashboard v2 Beta3!

No, follow the docs referenced at the top of the thread. The docs you linked are for the old HADashboard.

1 Like

Hi,
Can you tell me if thereā€™s a way to change the date format on the clock widget please?

P.S. thanks aimc and anyone else whoā€™s involved in making this. I canā€™t believe something this cool is freely available. You and the HA guys are legends!!

2 Likes

Check the dashboard.md doc - there are some options in there for customising the clock

Iā€™ve looked through but all I could find was options to change 12/24hr clock. Maybe Iā€™ve missed it, Iā€™ll have another look.
Cheers

you didnt miss it. dateformat isnt customisable (yet)
unless it can be changed with css (there is a lot possible with css, so i dont know if thats possible)

Thanks ReneTode. I can finally stop reading this DASHBOARD file now!! :smiley:

how would you like the date shown?

Iā€™d like the day before the month - dd/mm/yyyy.

I havenā€™t tested it much but the date format should be picked up from your locale.

Itā€™s currently displaying as m/d/yyyy. My RPi is set to ā€˜en_GB.UTF-8 UTF-8ā€™, which I would expect to use the dd/mm/yyyy format. Iā€™ll search around for the file that contains that info. Thanks for the new lead.

Iā€™ve run this command ā€˜date +%xā€™ and the output shows me that my current date format is ā€˜dd/mm/yyā€™. I think Iā€™ll have to concentrate on the css approach to adjust the format. Itā€™s not exactly a major problem as it is, itā€™s just confusing when Iā€™m blurry eyed and low on caffeine! :wink:

it isnt a solution for the long term, and it will be deleted the next time you update, but in the file

your_AD_root/appdaemon/appdaemon/widgets/baseclock/baseclock.js

you find a line which contains:

        self.set_field(self, "date", today.toLocaleDateString());

and on this webpage: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Date/toLocaleDateString

you can find which options you can set for the toLocaleDateString() function.

{please dont tell @aimc that i told you this :wink: )

1 Like

lol! Iā€™ll keep it to myself.

Thanks very much.

1 Like

Thatā€™s done it! Thanks for your help and donā€™t worry, the secret is safe with me!

2 Likes

A more European-friendly and/or user-definable date format is something Iā€™ve been meaning to ask for for quite some time now.
Something which Hass itself could do with as wellā€¦

i guess you could expect that local format should be what local people want :wink:
i dont use it so i have no idea what it would be for me.
in HA you can create a date sensor with any format you like.

but i am sure that a better customisable clock widget is on the list from Andrew for the future.

Sure you can format a sensor, but that doesnā€™t do much for the general UI - in e.g. Logbook, History, and the like. Not to mention the insistence on am/pm time formatā€¦
These things should be user-definable, and not rely on some systemwide setting. E.g. I run all my gear in (American) English, but that doesnā€™t mean I like American date/time formatsā€¦

i agree that there are more things that should be customisable in HA :wink:
i didnt think about dates in the UI because i dont use those parts :wink:

1 Like

Need help my Hadashboard stopped working with error -

sudo systemctl status appdaemon.service -l
ā— appdaemon.service - HA Dashboard
   Loaded: loaded (/etc/systemd/system/appdaemon.service; enabled)
   Active: failed (Result: exit-code) since Sat 2017-06-03 22:03:57 PDT; 4s ago
  Process: 31696 ExecStart=/usr/bin/python3 -m appdaemon.appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf -p /home/pi/appd$ (code=exited, status=1/FAILURE)
 Main PID: 31696 (code=exited, status=1/FAILURE)

Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 2237, in _find_and_load
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 2226, in _find_and_load_unlocked
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 1200, in _load_unlocked
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 1129, in _exec
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 1467, in exec_module
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 1570, in get_code
Jun 03 22:03:57 HaHome python3[31696]: File "<frozen importlib._bootstrap>", line 656, in _compile_bytecode
Jun 03 22:03:57 HaHome python3[31696]: ValueError: bad marshal data (invalid reference)
Jun 03 22:03:57 HaHome systemd[1]: appdaemon.service: main process exited, code=exited, status=1/FAILURE
Jun 03 22:03:57 HaHome systemd[1]: Unit appdaemon.service entered failed state.

after deleating .pyc file using sudo find . -name *.pyc -delete now i am getting error -

ā— appdaemon.service - HA Dashboard
   Loaded: loaded (/etc/systemd/system/appdaemon.service; enabled)
   Active: failed (Result: exit-code) since Sat 2017-06-03 22:28:15 PDT; 3min 8s ago
  Process: 550 ExecStart=/usr/bin/python3 -m appdaemon.appdaemon -c /home/pi/appdaemon_dashboard/appdaemon/conf -p /home/pi/appd$ (code=exited, status=1/FAILURE)
 Main PID: 550 (code=exited, status=1/FAILURE)

Jun 03 22:28:15 HaHome python3[550]: exec(code, run_globals)
Jun 03 22:28:15 HaHome python3[550]: File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdaemon.py", line 27, in <module>
Jun 03 22:28:15 HaHome python3[550]: import appdaemon.appdash as appdash
Jun 03 22:28:15 HaHome python3[550]: File "/home/pi/appdaemon_dashboard/appdaemon/appdaemon/appdash.py", line 2, in <module>
Jun 03 22:28:15 HaHome python3[550]: from aiohttp import web
Jun 03 22:28:15 HaHome python3[550]: File "/usr/local/lib/python3.4/dist-packages/aiohttp/__init__.py", line 6, in <module>
Jun 03 22:28:15 HaHome python3[550]: from .client import *  # noqa
Jun 03 22:28:15 HaHome python3[550]: TypeError: source code string cannot contain null bytes
Jun 03 22:28:15 HaHome systemd[1]: appdaemon.service: main process exited, code=exited, status=1/FAILURE
Jun 03 22:28:15 HaHome systemd[1]: Unit appdaemon.service entered failed state.

Can someone help me resolve this error, please? It seems to not want to load the ā€˜helloā€™ dashboard. I wanted to fix this before attempting to make a dashboard for my HA setup.

The only change I made to appdash.py was this change for rpi by @quadportnick.

Also ā€˜$ ls -a /usr/src/appā€™ is empty and none of: /conf/compiled/html/default, /conf/compiled/html, /conf/compiled, and /conf exist.

2017-06-04 01:04:14.064150 INFO AppDaemon Version 2.0.0beta3.5 starting
2017-06-04 01:04:14.064692 DEBUG get_ha_config()
2017-06-04 01:04:19.232728 DEBUG Entering run()
2017-06-04 01:04:19.300221 DEBUG Creating worker threads ...
2017-06-04 01:04:19.301515 DEBUG Done
2017-06-04 01:04:19.302572 DEBUG Done
2017-06-04 01:04:19.303907 DEBUG Done
2017-06-04 01:04:19.304947 DEBUG Done
2017-06-04 01:04:19.305954 DEBUG Done
2017-06-04 01:04:19.306924 DEBUG Done
2017-06-04 01:04:19.307878 DEBUG Done
2017-06-04 01:04:19.308958 DEBUG Done
2017-06-04 01:04:19.309981 DEBUG Done
2017-06-04 01:04:19.311101 DEBUG Done
2017-06-04 01:04:19.311771 DEBUG Calling HA for initial state
2017-06-04 01:04:19.312120 DEBUG Refreshing HA state
2017-06-04 01:04:19.312426 DEBUG get_ha_state: entity is None
2017-06-04 01:04:19.338773 INFO Got initial state
2017-06-04 01:04:19.339282 DEBUG Reading Apps
2017-06-04 01:04:19.339698 INFO App initialization complete
2017-06-04 01:04:19.340001 DEBUG Starting timer thread
2017-06-04 01:04:19.340896 INFO Starting dashboard
2017-06-04 01:04:19.356916 INFO HADashboard Started
2017-06-04 01:04:19.357415 INFO Listening on ('0.0.0.0', 5050)
2017-06-04 01:04:19.369559 INFO Connected to Home Assistant 0.45.1
2017-06-04 01:07:10.841895 INFO Compiling dashboard 'hello'
2017-06-04 01:07:11.283821 WARNING Dashboard 'hello' not found
2017-06-04 01:07:11.284447 INFO function [compile_dash] finished in 460 ms
2017-06-04 01:07:11.285165 WARNING ------------------------------------------------------------
2017-06-04 01:07:11.286302 WARNING Unexpected error in CSS file
2017-06-04 01:07:11.286912 WARNING ------------------------------------------------------------
2017-06-04 01:07:11.289623 WARNING Traceback (most recent call last):
  File "/usr/src/app/appdaemon/appdash.py", line 105, in _load_dash
    with open(include_path, "r") as include_file:
FileNotFoundError: [Errno 2] No such file or directory: '/conf/compiled/html/default/hello_head.html'

Hereā€™s my appdaemon.cfg if it helps

[AppDaemon]
ha_url = http://192.168.1.110:8123
ha_key = xxxxxxxxx
logfile = STDOUT
errorfile = STDERR
app_dir = /home/pi/appdaemon_dashboard/appdaemon/conf/apps
threads = 10
dash_url = http://192.168.1.110:5050
# Apps
[hello_world]
module = hello
class = HelloWorld

Any help is appreciated :slight_smile: