I want to try develop some changes to AppDaemon, I need to make changes to dashboard.js (in the future to py files most probably), but I don’t know how to do it technically. By now I have AppDaemon installed into hassio from community hassio store.
Creating custom widgets was simple. When I need to make change to “official” widget I make my own custom copy and modified this. But now I need to go deeper and I have no idea how to make this running. Any help?
first you need to realise that when you start to change things in AD itselve, you wont be able to follow updates anymore.
second you might want to rethink if you want to stay using hassio. because hsiois not really a platform to do advanced stuff like you want.
if you want to stay on hassio, you need to create your own copy from appdaemon, modify what you want and then create your own addon.
but that wont be an easy way to develop and test what you want.
another option would be to install appdaemon on another device that runs python and develop it there.
what are the changes you like to make and for what reason?
yes, I’m aware that once I touch AD I’m out of updates. And as you expect - it is not something I want for my “production” system. On the other hand trying to modify/improve/extend something is (in my opinion) the best way to learn something. And this is my primary motivation! There are additional things to that. I think my ideas should be not so difficult to implement and could be of interest to more users than me (I know, each one thinks so about his ideas ) and I’m going to try to offer them (once ready) as pull requests…
What is now annoying me most and I’d like to try to change:
- Add click (navigate) functionality to “all” widgets as basic functionality (of course if widget is clickable this new function should be suppressed)
- No need to specify return address to all those navigate buttons (return to calling address)
- Support for dashboard instances (parameter in URL?) and sending event just to particular named instance (having multiple dashboards in multiple rooms independent)
This for the beginning. I know, not racket science…
So back to the business: you recommend to install AD on another device. Do I understand it correctly it could be even normal PC and just connect to hassio box for data during tests?
i recommend an other device but preferably with linux installed.
windows has some problems with a few libs.
but you can connect from any device to yout HA.
but i think its not really neccesary in your case.
adding navigate to non-clickable widgets can be done by changing widgets (custom widgets
the return address can also be given as option by the navigate so that can also be done on custom widget level
communicating with specific dashboards is bit more tricky. first of all must the dashboard send something back to AD (ip for instance) before AD can make distinction between dashboards/devices.
i would welcome that option, but if you want to develop such a thing you better talk it over with Andrew (and perhaps me) how you want to tackle that problem.
that increases the chance that its actually helpfull for other and will be implemented.
i think @aimc would love help in development, but thats best done after talking things over.
are you on discord? if yes then please contact me there and we can add andrew so we can talk things over.
I avoid linux for 25 years of my professional programmer career but it seems he finally catch me:) But it makes sense what you wrote. I’m limited with what I can install on my company notebook so I’ll buy another RPI3 when I’m back from holiday. Seems I have to learn a little bit more.
I know navigation could be done by creating (copy+change) custom widget. I was just thinking about a more general solution.
Sorry, I’m not on discord, to be honest - never heard about it before.
hmm, you sound a little like me.
i also always avoided linux and programmed on a windows environment.
i started working and programming about 35 years ago when i was 15.
how would you filter (navigate) commands on the client side?
by the way i also never heard from discord untill i started helping out andrew
its a chat site thats also used for chatting about HA development.
ill think youll figure it out and like it.
untill then you can reach me on PM or here.
Filtering of events on the client side looks for me (now) as easiest part of all of this. I’m going to make this in dashboard.js in ha_status method. AD is taking care of rest of the business if I understand python code correctly (hassplugin.py[get_updates] -> appdaemon.py [state_update] -> rundash.py [ws_update] ) Could be most probably filtered on server side as well in rundash.py [ws_update] but I’m not confident enough (this is my first contact with python)
Second part of whole this business is setting “instance name” of each page. My plan is to introduce it as (optional) URL parameter (like skin) and ensure it’s preserved during navigation between dashboards.
BTW: develop RPI3 is on the way, should arrive tomorrow